Merge remote-tracking branch 'upstream'

This commit is contained in:
Fijxu
2025-10-16 17:39:11 -03:00
6 changed files with 23 additions and 12 deletions

View File

@@ -173,6 +173,7 @@ body a.pure-button-primary,
.pure-button-primary, .pure-button-primary,
.pure-button-secondary { .pure-button-secondary {
white-space: normal;
border: 1px solid #a0a0a0; border: 1px solid #a0a0a0;
border-radius: 3px; border-radius: 3px;
margin: 0 .4em; margin: 0 .4em;

View File

@@ -147,16 +147,18 @@ player.on('timeupdate', function () {
// YouTube links // YouTube links
let elem_yt_watch = document.getElementById('link-yt-watch'); if (!video_data.live_now) {
if (elem_yt_watch) { let elem_yt_watch = document.getElementById('link-yt-watch');
let base_url_yt_watch = elem_yt_watch.getAttribute('data-base-url'); if (elem_yt_watch) {
elem_yt_watch.href = addCurrentTimeToURL(base_url_yt_watch); let base_url_yt_watch = elem_yt_watch.getAttribute('data-base-url');
} elem_yt_watch.href = addCurrentTimeToURL(base_url_yt_watch);
}
let elem_yt_embed = document.getElementById('link-yt-embed'); let elem_yt_embed = document.getElementById('link-yt-embed');
if (elem_yt_embed) { if (elem_yt_embed) {
let base_url_yt_embed = elem_yt_embed.getAttribute('data-base-url'); let base_url_yt_embed = elem_yt_embed.getAttribute('data-base-url');
elem_yt_embed.href = addCurrentTimeToURL(base_url_yt_embed); elem_yt_embed.href = addCurrentTimeToURL(base_url_yt_embed);
}
} }
// Invidious links // Invidious links

View File

@@ -416,6 +416,7 @@
"Default": "Default", "Default": "Default",
"Music": "Music", "Music": "Music",
"Gaming": "Gaming", "Gaming": "Gaming",
"Livestreams": "Livestreams",
"News": "News", "News": "News",
"Movies": "Movies", "Movies": "Movies",
"Download": "Download", "Download": "Download",

View File

@@ -6,6 +6,7 @@ module Invidious::Routes::Feeds
Music Music
Gaming Gaming
Movies Movies
Livestreams
end end
def self.view_all_playlists_redirect(env) def self.view_all_playlists_redirect(env)

View File

@@ -4,6 +4,8 @@ def fetch_trending(trending_type, region, locale)
plid = nil plid = nil
browse_id = "FEtrending"
case trending_type.try &.downcase case trending_type.try &.downcase
when "music" when "music"
params = "4gINGgt5dG1hX2NoYXJ0cw%3D%3D" params = "4gINGgt5dG1hX2NoYXJ0cw%3D%3D"
@@ -11,12 +13,15 @@ def fetch_trending(trending_type, region, locale)
params = "4gIcGhpnYW1pbmdfY29ycHVzX21vc3RfcG9wdWxhcg%3D%3D" params = "4gIcGhpnYW1pbmdfY29ycHVzX21vc3RfcG9wdWxhcg%3D%3D"
when "movies" when "movies"
params = "4gIKGgh0cmFpbGVycw%3D%3D" params = "4gIKGgh0cmFpbGVycw%3D%3D"
when "livestreams"
browse_id = "UC4R8DWoMoI7CAwX8_LjQHig"
params = "EgdsaXZldGFikgEDCKEK"
else # Default else # Default
params = "" params = ""
end end
client_config = YoutubeAPI::ClientConfig.new(region: region) 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) items, _ = extract_items(initial_data)

View File

@@ -78,7 +78,8 @@ we're going to need to do it here in order to allow for translations.
"comments_enabled" => video.comments?, "comments_enabled" => video.comments?,
"projection_type" => video.projection_type, "projection_type" => video.projection_type,
"local_disabled" => CONFIG.disabled?("local"), "local_disabled" => CONFIG.disabled?("local"),
"support_reddit" => true "support_reddit" => true,
"live_now" => video.live_now
}.to_pretty_json }.to_pretty_json
%> %>
</script> </script>