Merge 6ffdb5d2c811a27bd6d09aeaabcff5a3a3382db5 into 35d1d499bc42a9b141b3dc92c4a5827b5f21a3ff

This commit is contained in:
Fijxu 2025-12-02 23:20:14 +00:00 committed by GitHub
commit 3f0c833af1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 9 deletions

View File

@ -4,20 +4,21 @@ def fetch_trending(trending_type, region, locale)
plid = nil plid = nil
browse_id = "FEtrending" browse_id = ""
case trending_type.try &.downcase case trending_type.try &.downcase
when "music"
params = "4gINGgt5dG1hX2NoYXJ0cw%3D%3D"
when "gaming" when "gaming"
params = "4gIcGhpnYW1pbmdfY29ycHVzX21vc3RfcG9wdWxhcg%3D%3D" browse_id = "UCOpNcN46UbXVtpKMrmU4Abg"
when "movies" params = "Egh0cmVuZGluZw%3D%3D"
params = "4gIKGgh0cmFpbGVycw%3D%3D"
when "livestreams" when "livestreams"
browse_id = "UC4R8DWoMoI7CAwX8_LjQHig" browse_id = "UC4R8DWoMoI7CAwX8_LjQHig"
params = "EgdsaXZldGFikgEDCKEK" params = "EgdsaXZldGFikgEDCKEK"
else # Default else
params = "" # Livestreams is the default one as Youtube removed
# the aggregated trending page
# https://github.com/iv-org/invidious/issues/5397#issuecomment-3218928458
browse_id = "UC4R8DWoMoI7CAwX8_LjQHig"
params = "EgdsaXZldGFikgEDCKEK"
end end
client_config = YoutubeAPI::ClientConfig.new(region: region) client_config = YoutubeAPI::ClientConfig.new(region: region)

View File

@ -21,7 +21,7 @@
</div> </div>
<div class="pure-u-1-3"> <div class="pure-u-1-3">
<div class="pure-g" style="text-align:right"> <div class="pure-g" style="text-align:right">
<% {"Default", "Music", "Gaming", "Movies", "Livestreams"}.each do |option| %> <% {"Livestreams", "Gaming"}.each do |option| %>
<div class="pure-u-1 pure-md-1-3"> <div class="pure-u-1 pure-md-1-3">
<% if trending_type == option %> <% if trending_type == option %>
<b><%= translate(locale, option) %></b> <b><%= translate(locale, option) %></b>

View File

@ -442,6 +442,7 @@ private module Parsers
if content_container = special_category_container["horizontalListRenderer"]? if content_container = special_category_container["horizontalListRenderer"]?
elsif content_container = special_category_container["expandedShelfContentsRenderer"]? elsif content_container = special_category_container["expandedShelfContentsRenderer"]?
elsif content_container = special_category_container["verticalListRenderer"]? elsif content_container = special_category_container["verticalListRenderer"]?
elsif content_container = special_category_container["gridRenderer"]?
else else
# Anything else, such as `horizontalMovieListRenderer` is currently unsupported. # Anything else, such as `horizontalMovieListRenderer` is currently unsupported.
return return