Skip to content

Commit

Permalink
add: more providers
Browse files Browse the repository at this point in the history
  • Loading branch information
hexdecimal16 committed Aug 22, 2024
1 parent faa83b5 commit 32399ff
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 21 deletions.
1 change: 1 addition & 0 deletions src/assets/fandango.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/ign.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/peacock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 18 additions & 20 deletions src/assets/rt_fresh.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 13 additions & 1 deletion src/utils/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,19 @@ export const Providers: ManifestConfig[] = [{
key: 'providers',
title: 'Select Providers to Fetch Ratings From',
type: 'multiselect' as any,
options: ["all", "imdb", "rotten_tomatoes", "metacritic", "crunchyroll", "filmaffinity", "times of india", "common sense media"] as any,
options: [
"all",
"imdb",
"rotten_tomatoes",
"metacritic",
"crunchyroll",
"filmaffinity",
"times of india",
"common sense media",
"peacock",
"fandango",
"ign",
] as any,
default: 'all',
required: true as any
}]
3 changes: 3 additions & 0 deletions src/utils/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ function getSVGFilePath(key: string, value: string) {
if (key === 'imdb') return path.join(__dirname, '../assets', 'imdb.svg');
if (key === 'common_sense_media') return path.join(__dirname, '../assets', 'common_sense_media.svg');
if (key === 'times_of_india') return path.join(__dirname, '../assets', 'toi.svg');
if (key === 'ign') return path.join(__dirname, '../assets', 'ign.svg');
if (key === 'peacock') return path.join(__dirname, '../assets', 'peacock.svg');
if (key === 'fandango.svg') return path.join(__dirname, '../assets', 'fandango.svg.svg');
if (key === 'rotten_tomatoes') return value > '60'
? path.join(__dirname, '../assets', 'rt_fresh.svg')
: path.join(__dirname, '../assets', 'rt_rotten.svg');
Expand Down

0 comments on commit 32399ff

Please sign in to comment.