summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÉmilien Devos (perso) <contact@emiliendevos.be>2023-02-17 18:58:53 +0100
committerGitHub <noreply@github.com>2023-02-17 18:58:53 +0100
commitd6bf9e9bcff98f8aa1343d103d03b4fd0e2e3299 (patch)
tree2abf38b4bf1328e14306386ac5b7004e4fa5f3f0
parenta95f82e44bfc77ac8fc1b7acd2159d185a4fa637 (diff)
parent838cbeffcc7c8f85c83f6ab3e97362f803bd766c (diff)
downloadinvidious-d6bf9e9bcff98f8aa1343d103d03b4fd0e2e3299.tar.gz
invidious-d6bf9e9bcff98f8aa1343d103d03b4fd0e2e3299.tar.bz2
invidious-d6bf9e9bcff98f8aa1343d103d03b4fd0e2e3299.zip
Merge pull request #3622 from ChunkyProgrammer/downcase-trending-type-param
-rw-r--r--src/invidious/trending.cr7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/invidious/trending.cr b/src/invidious/trending.cr
index 1f957081..134eb437 100644
--- a/src/invidious/trending.cr
+++ b/src/invidious/trending.cr
@@ -4,11 +4,12 @@ def fetch_trending(trending_type, region, locale)
plid = nil
- if trending_type == "Music"
+ case trending_type.try &.downcase
+ when "music"
params = "4gINGgt5dG1hX2NoYXJ0cw%3D%3D"
- elsif trending_type == "Gaming"
+ when "gaming"
params = "4gIcGhpnYW1pbmdfY29ycHVzX21vc3RfcG9wdWxhcg%3D%3D"
- elsif trending_type == "Movies"
+ when "movies"
params = "4gIKGgh0cmFpbGVycw%3D%3D"
else # Default
params = ""