diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-09-09 08:53:04 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-09-09 08:53:04 -0500 |
| commit | 133b72f9cff17463a5519213b03049832348bc97 (patch) | |
| tree | a8cd26cc61fa63087ff7c36c0953f6ff546868c6 /src/invidious.cr | |
| parent | 8c45694ce54ff7cdfa224268b64924f36385542a (diff) | |
| download | invidious-133b72f9cff17463a5519213b03049832348bc97.tar.gz invidious-133b72f9cff17463a5519213b03049832348bc97.tar.bz2 invidious-133b72f9cff17463a5519213b03049832348bc97.zip | |
Add support for genre channels that don't end with " - Topic"
Diffstat (limited to 'src/invidious.cr')
| -rw-r--r-- | src/invidious.cr | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index 5f649d73..78cbd454 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -1403,7 +1403,8 @@ get "/feed/channel/:ucid" do |env| # Auto-generated channels # https://support.google.com/youtube/answer/2579942 - if author.ends_with? " - Topic" + if author.ends_with?(" - Topic") || + {"Popular on YouTube", "Music", "Sports", "Gaming"}.includes? author auto_generated = true end @@ -1660,7 +1661,8 @@ get "/channel/:ucid" do |env| # Auto-generated channels # https://support.google.com/youtube/answer/2579942 - if author.ends_with? " - Topic" + if author.ends_with?(" - Topic") || + {"Popular on YouTube", "Music", "Sports", "Gaming"}.includes? author auto_generated = true end @@ -2330,7 +2332,8 @@ get "/api/v1/channels/:ucid" do |env| # Auto-generated channels # https://support.google.com/youtube/answer/2579942 - if author.ends_with? " - Topic" + if author.ends_with?(" - Topic") || + {"Popular on YouTube", "Music", "Sports", "Gaming"}.includes? author auto_generated = true end @@ -2512,7 +2515,8 @@ get "/api/v1/channels/:ucid/videos" do |env| # Auto-generated channels # https://support.google.com/youtube/answer/2579942 - if author.ends_with? " - Topic" + if author.ends_with?(" - Topic") || + {"Popular on YouTube", "Music", "Sports", "Gaming"}.includes? author auto_generated = true end |
