diff options
| author | ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com> | 2023-02-07 09:23:26 -0500 |
|---|---|---|
| committer | ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com> | 2023-02-07 09:23:26 -0500 |
| commit | 28424d0e881c8595bbc5797b9ef46e98103fe6d6 (patch) | |
| tree | 7873b99372f0ce26db4b90b12063821ad7865c31 | |
| parent | d6dd341594cc837001ed57cbea3103d22c9988c1 (diff) | |
| download | invidious-28424d0e881c8595bbc5797b9ef46e98103fe6d6.tar.gz invidious-28424d0e881c8595bbc5797b9ef46e98103fe6d6.tar.bz2 invidious-28424d0e881c8595bbc5797b9ef46e98103fe6d6.zip | |
Ignore casing for trending type in api
| -rw-r--r-- | src/invidious/trending.cr | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/invidious/trending.cr b/src/invidious/trending.cr index 1f957081..d164c37f 100644 --- a/src/invidious/trending.cr +++ b/src/invidious/trending.cr @@ -4,11 +4,14 @@ def fetch_trending(trending_type, region, locale) plid = nil - if trending_type == "Music" + trending_type ||= "default" + trending_type = trending_type.downcase + + if trending_type == "music" params = "4gINGgt5dG1hX2NoYXJ0cw%3D%3D" - elsif trending_type == "Gaming" + elsif trending_type == "gaming" params = "4gIcGhpnYW1pbmdfY29ycHVzX21vc3RfcG9wdWxhcg%3D%3D" - elsif trending_type == "Movies" + elsif trending_type == "movies" params = "4gIKGgh0cmFpbGVycw%3D%3D" else # Default params = "" |
