mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-16 01:48:51 +00:00
Merge remote-tracking branch 'upstream'
This commit is contained in:
@@ -6,6 +6,7 @@ module Invidious::Routes::Feeds
|
||||
Music
|
||||
Gaming
|
||||
Movies
|
||||
Livestreams
|
||||
end
|
||||
|
||||
def self.view_all_playlists_redirect(env)
|
||||
|
||||
@@ -4,6 +4,8 @@ def fetch_trending(trending_type, region, locale)
|
||||
|
||||
plid = nil
|
||||
|
||||
browse_id = "FEtrending"
|
||||
|
||||
case trending_type.try &.downcase
|
||||
when "music"
|
||||
params = "4gINGgt5dG1hX2NoYXJ0cw%3D%3D"
|
||||
@@ -11,12 +13,15 @@ def fetch_trending(trending_type, region, locale)
|
||||
params = "4gIcGhpnYW1pbmdfY29ycHVzX21vc3RfcG9wdWxhcg%3D%3D"
|
||||
when "movies"
|
||||
params = "4gIKGgh0cmFpbGVycw%3D%3D"
|
||||
when "livestreams"
|
||||
browse_id = "UC4R8DWoMoI7CAwX8_LjQHig"
|
||||
params = "EgdsaXZldGFikgEDCKEK"
|
||||
else # Default
|
||||
params = ""
|
||||
end
|
||||
|
||||
client_config = YoutubeAPI::ClientConfig.new(region: region)
|
||||
initial_data = YoutubeAPI.browse("FEtrending", params: params, client_config: client_config)
|
||||
initial_data = YoutubeAPI.browse(browse_id, params: params, client_config: client_config)
|
||||
|
||||
items, _ = extract_items(initial_data)
|
||||
|
||||
|
||||
@@ -78,7 +78,8 @@ we're going to need to do it here in order to allow for translations.
|
||||
"comments_enabled" => video.comments?,
|
||||
"projection_type" => video.projection_type,
|
||||
"local_disabled" => CONFIG.disabled?("local"),
|
||||
"support_reddit" => true
|
||||
"support_reddit" => true,
|
||||
"live_now" => video.live_now
|
||||
}.to_pretty_json
|
||||
%>
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user