From a6a0bbf39834003b9ee26392e626828c05209010 Mon Sep 17 00:00:00 2001 From: bbielsa Date: Mon, 25 Oct 2021 19:50:17 -0400 Subject: [PATCH 01/18] Add remember_position field to the Preferences and VideoPreferences structs, and add a checkbox in the preferences page to toggle it --- src/invidious/config.cr | 1 + src/invidious/routes/preferences.cr | 5 +++++ src/invidious/user/preferences.cr | 1 + src/invidious/videos.cr | 6 ++++++ src/invidious/views/preferences.ecr | 5 +++++ 5 files changed, 18 insertions(+) diff --git a/src/invidious/config.cr b/src/invidious/config.cr index 578e31fd..bdd670f1 100644 --- a/src/invidious/config.cr +++ b/src/invidious/config.cr @@ -42,6 +42,7 @@ struct ConfigPreferences property volume : Int32 = 100 property vr_mode : Bool = true property show_nick : Bool = true + property remember_position : Bool = false def to_tuple {% begin %} diff --git a/src/invidious/routes/preferences.cr b/src/invidious/routes/preferences.cr index edf9e1e7..3bf7e5da 100644 --- a/src/invidious/routes/preferences.cr +++ b/src/invidious/routes/preferences.cr @@ -70,6 +70,10 @@ module Invidious::Routes::PreferencesRoute vr_mode ||= "off" vr_mode = vr_mode == "on" + remember_position = env.params.body["remember_position"]?.try &.as(String) + remember_position ||= "off" + remember_position = remember_position == "on" + show_nick = env.params.body["show_nick"]?.try &.as(String) show_nick ||= "off" show_nick = show_nick == "on" @@ -165,6 +169,7 @@ module Invidious::Routes::PreferencesRoute extend_desc: extend_desc, vr_mode: vr_mode, show_nick: show_nick, + remember_position: remember_position, }.to_json).to_json if user = env.get? "user" diff --git a/src/invidious/user/preferences.cr b/src/invidious/user/preferences.cr index c15876f5..f2d089b4 100644 --- a/src/invidious/user/preferences.cr +++ b/src/invidious/user/preferences.cr @@ -53,6 +53,7 @@ struct Preferences property video_loop : Bool = CONFIG.default_user_preferences.video_loop property extend_desc : Bool = CONFIG.default_user_preferences.extend_desc property volume : Int32 = CONFIG.default_user_preferences.volume + property remember_position : Bool = CONFIG.default_user_preferences.remember_position module BoolToString def self.to_json(value : String, json : JSON::Builder) diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr index 621ff386..bffd564d 100644 --- a/src/invidious/videos.cr +++ b/src/invidious/videos.cr @@ -246,6 +246,7 @@ struct VideoPreferences property video_start : Float64 | Int32 property volume : Int32 property vr_mode : Bool + property remember_position : Bool end struct Video @@ -1090,6 +1091,7 @@ def process_video_params(query, preferences) extend_desc = query["extend_desc"]?.try { |q| (q == "true" || q == "1").to_unsafe } volume = query["volume"]?.try &.to_i? vr_mode = query["vr_mode"]?.try { |q| (q == "true" || q == "1").to_unsafe } + remember_position = query["remember_position"]?.try { |q| (q == "true" || q == "1").to_unsafe } if preferences # region ||= preferences.region @@ -1110,6 +1112,7 @@ def process_video_params(query, preferences) extend_desc ||= preferences.extend_desc.to_unsafe volume ||= preferences.volume vr_mode ||= preferences.vr_mode.to_unsafe + remember_position ||= preferences.remember_position.to_unsafe end annotations ||= CONFIG.default_user_preferences.annotations.to_unsafe @@ -1129,6 +1132,7 @@ def process_video_params(query, preferences) extend_desc ||= CONFIG.default_user_preferences.extend_desc.to_unsafe volume ||= CONFIG.default_user_preferences.volume vr_mode ||= CONFIG.default_user_preferences.vr_mode.to_unsafe + remember_position ||= CONFIG.default_user_preferences.remember_position.to_unsafe annotations = annotations == 1 autoplay = autoplay == 1 @@ -1140,6 +1144,7 @@ def process_video_params(query, preferences) video_loop = video_loop == 1 extend_desc = extend_desc == 1 vr_mode = vr_mode == 1 + remember_position = remember_position == 1 if CONFIG.disabled?("dash") && quality == "dash" quality = "high" @@ -1190,6 +1195,7 @@ def process_video_params(query, preferences) video_start: video_start, volume: volume, vr_mode: vr_mode, + remember_position: remember_position, }) return params diff --git a/src/invidious/views/preferences.ecr b/src/invidious/views/preferences.ecr index 6bd9e348..603c337b 100644 --- a/src/invidious/views/preferences.ecr +++ b/src/invidious/views/preferences.ecr @@ -116,6 +116,11 @@ checked<% end %>> +
+ + checked<% end %>> +
+ <%= translate(locale, "preferences_category_visual") %>
From 2a45b4eba031cc59551150a7e674e5b5943ab490 Mon Sep 17 00:00:00 2001 From: bbielsa Date: Mon, 25 Oct 2021 20:59:36 -0400 Subject: [PATCH 02/18] Save and load the position for the video using a local storage object, the object is a dictionary, where the key is the video ID, and the value is the time at which the user last left off watching the video. If the user deselected the 'remember video position' checkbox in the preferences this dictionary is cleared --- assets/js/player.js | 72 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/assets/js/player.js b/assets/js/player.js index a461c53d..4c12f1fe 100644 --- a/assets/js/player.js +++ b/assets/js/player.js @@ -38,6 +38,8 @@ embed_url.searchParams.delete('v'); short_url = location.origin + '/' + video_data.id + embed_url.search; embed_url = location.origin + '/embed/' + video_data.id + embed_url.search; +var remember_position_key = "remember_position"; + var shareOptions = { socials: ['fbFeed', 'tw', 'reddit', 'email'], @@ -199,6 +201,27 @@ if (video_data.premiere_timestamp && Math.round(new Date() / 1000) < video_data. player.getChild('bigPlayButton').hide(); } +if (video_data.params.remember_position) { + const remeberedTime = get_video_time(); + let lastUpdated = 0; + + set_seconds_after_start(remeberedTime); + + player.on("timeupdate", e => { + const raw = player.currentTime(); + const time = Math.floor(raw); + + if(lastUpdated !== time) { + save_video_time(time); + lastUpdated = time; + } + }); +} +else { + console.log("Removing data for remebered positions"); + remove_all_video_times(); +} + if (video_data.params.autoplay) { var bpb = player.getChild('bigPlayButton'); bpb.hide(); @@ -330,6 +353,55 @@ function skip_seconds(delta) { player.currentTime(newTime); } +function set_seconds_after_start(delta) { + const start = video_data.params.video_start; + player.currentTime(start + delta); +} + +function save_video_time(seconds) { + const videoId = video_data.id; + const all_video_times = get_all_video_times(); + + all_video_times[videoId] = seconds; + + set_all_video_times(all_video_times); +} + +function get_video_time() { + try { + const videoId = video_data.id; + const all_video_times = get_all_video_times(); + const timestamp = all_video_times[videoId]; + + return timestamp; + } + catch { + return 0; + } +} + +function set_all_video_times(times) { + const json = JSON.stringify(times); + + localStorage.setItem(remember_position_key, json); +} + +function get_all_video_times() { + try { + const raw = localStorage.getItem(remember_position_key); + const times = JSON.parse(raw); + + return times || {}; + } + catch { + return {}; + } +} + +function remove_all_video_times() { + localStorage.removeItem(remember_position_key); +} + function set_time_percent(percent) { const duration = player.duration(); const newTime = duration * (percent / 100); From 1261323c66e4c4886e4620e4e1eaaa7de3b2403e Mon Sep 17 00:00:00 2001 From: bbielsa Date: Tue, 26 Oct 2021 17:30:59 -0400 Subject: [PATCH 03/18] Remove console.log debugging --- assets/js/player.js | 1 - 1 file changed, 1 deletion(-) diff --git a/assets/js/player.js b/assets/js/player.js index 4c12f1fe..ed9c62ee 100644 --- a/assets/js/player.js +++ b/assets/js/player.js @@ -218,7 +218,6 @@ if (video_data.params.remember_position) { }); } else { - console.log("Removing data for remebered positions"); remove_all_video_times(); } From b6792cf02e79b2376ffae13fae6dc225095469bf Mon Sep 17 00:00:00 2001 From: bbielsa Date: Tue, 26 Oct 2021 18:43:28 -0400 Subject: [PATCH 04/18] Added default value for get_video_time() which was causing a bug in safari --- assets/js/player.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/assets/js/player.js b/assets/js/player.js index ed9c62ee..2a0c6fd7 100644 --- a/assets/js/player.js +++ b/assets/js/player.js @@ -207,7 +207,7 @@ if (video_data.params.remember_position) { set_seconds_after_start(remeberedTime); - player.on("timeupdate", e => { + const updateTime = () => { const raw = player.currentTime(); const time = Math.floor(raw); @@ -215,7 +215,9 @@ if (video_data.params.remember_position) { save_video_time(time); lastUpdated = time; } - }); + }; + + player.on("timeupdate", updateTime); } else { remove_all_video_times(); @@ -372,7 +374,7 @@ function get_video_time() { const all_video_times = get_all_video_times(); const timestamp = all_video_times[videoId]; - return timestamp; + return timestamp || 0; } catch { return 0; From 5abe7fe12377096c5b63bc787ccdbb11b8cf78a9 Mon Sep 17 00:00:00 2001 From: bbielsa Date: Tue, 26 Oct 2021 19:25:29 -0400 Subject: [PATCH 05/18] Rename 'remember_position' to 'save_player_pos' for clarity --- assets/js/player.js | 10 +++++----- src/invidious/config.cr | 2 +- src/invidious/routes/preferences.cr | 8 ++++---- src/invidious/user/preferences.cr | 2 +- src/invidious/videos.cr | 12 ++++++------ src/invidious/views/preferences.ecr | 4 ++-- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/assets/js/player.js b/assets/js/player.js index 2a0c6fd7..b4973482 100644 --- a/assets/js/player.js +++ b/assets/js/player.js @@ -38,7 +38,7 @@ embed_url.searchParams.delete('v'); short_url = location.origin + '/' + video_data.id + embed_url.search; embed_url = location.origin + '/embed/' + video_data.id + embed_url.search; -var remember_position_key = "remember_position"; +var save_player_pos_key = "save_player_pos"; var shareOptions = { socials: ['fbFeed', 'tw', 'reddit', 'email'], @@ -201,7 +201,7 @@ if (video_data.premiere_timestamp && Math.round(new Date() / 1000) < video_data. player.getChild('bigPlayButton').hide(); } -if (video_data.params.remember_position) { +if (video_data.params.save_player_pos) { const remeberedTime = get_video_time(); let lastUpdated = 0; @@ -384,12 +384,12 @@ function get_video_time() { function set_all_video_times(times) { const json = JSON.stringify(times); - localStorage.setItem(remember_position_key, json); + localStorage.setItem(save_player_pos_key, json); } function get_all_video_times() { try { - const raw = localStorage.getItem(remember_position_key); + const raw = localStorage.getItem(save_player_pos_key); const times = JSON.parse(raw); return times || {}; @@ -400,7 +400,7 @@ function get_all_video_times() { } function remove_all_video_times() { - localStorage.removeItem(remember_position_key); + localStorage.removeItem(save_player_pos_key); } function set_time_percent(percent) { diff --git a/src/invidious/config.cr b/src/invidious/config.cr index bdd670f1..c4a8bf83 100644 --- a/src/invidious/config.cr +++ b/src/invidious/config.cr @@ -42,7 +42,7 @@ struct ConfigPreferences property volume : Int32 = 100 property vr_mode : Bool = true property show_nick : Bool = true - property remember_position : Bool = false + property save_player_pos : Bool = false def to_tuple {% begin %} diff --git a/src/invidious/routes/preferences.cr b/src/invidious/routes/preferences.cr index 3bf7e5da..a07584c8 100644 --- a/src/invidious/routes/preferences.cr +++ b/src/invidious/routes/preferences.cr @@ -70,9 +70,9 @@ module Invidious::Routes::PreferencesRoute vr_mode ||= "off" vr_mode = vr_mode == "on" - remember_position = env.params.body["remember_position"]?.try &.as(String) - remember_position ||= "off" - remember_position = remember_position == "on" + save_player_pos = env.params.body["save_player_pos"]?.try &.as(String) + save_player_pos ||= "off" + save_player_pos = save_player_pos == "on" show_nick = env.params.body["show_nick"]?.try &.as(String) show_nick ||= "off" @@ -169,7 +169,7 @@ module Invidious::Routes::PreferencesRoute extend_desc: extend_desc, vr_mode: vr_mode, show_nick: show_nick, - remember_position: remember_position, + save_player_pos: save_player_pos, }.to_json).to_json if user = env.get? "user" diff --git a/src/invidious/user/preferences.cr b/src/invidious/user/preferences.cr index f2d089b4..bf7ea401 100644 --- a/src/invidious/user/preferences.cr +++ b/src/invidious/user/preferences.cr @@ -53,7 +53,7 @@ struct Preferences property video_loop : Bool = CONFIG.default_user_preferences.video_loop property extend_desc : Bool = CONFIG.default_user_preferences.extend_desc property volume : Int32 = CONFIG.default_user_preferences.volume - property remember_position : Bool = CONFIG.default_user_preferences.remember_position + property save_player_pos : Bool = CONFIG.default_user_preferences.save_player_pos module BoolToString def self.to_json(value : String, json : JSON::Builder) diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr index bffd564d..9b4b54e8 100644 --- a/src/invidious/videos.cr +++ b/src/invidious/videos.cr @@ -246,7 +246,7 @@ struct VideoPreferences property video_start : Float64 | Int32 property volume : Int32 property vr_mode : Bool - property remember_position : Bool + property save_player_pos : Bool end struct Video @@ -1091,7 +1091,7 @@ def process_video_params(query, preferences) extend_desc = query["extend_desc"]?.try { |q| (q == "true" || q == "1").to_unsafe } volume = query["volume"]?.try &.to_i? vr_mode = query["vr_mode"]?.try { |q| (q == "true" || q == "1").to_unsafe } - remember_position = query["remember_position"]?.try { |q| (q == "true" || q == "1").to_unsafe } + save_player_pos = query["save_player_pos"]?.try { |q| (q == "true" || q == "1").to_unsafe } if preferences # region ||= preferences.region @@ -1112,7 +1112,7 @@ def process_video_params(query, preferences) extend_desc ||= preferences.extend_desc.to_unsafe volume ||= preferences.volume vr_mode ||= preferences.vr_mode.to_unsafe - remember_position ||= preferences.remember_position.to_unsafe + save_player_pos ||= preferences.save_player_pos.to_unsafe end annotations ||= CONFIG.default_user_preferences.annotations.to_unsafe @@ -1132,7 +1132,7 @@ def process_video_params(query, preferences) extend_desc ||= CONFIG.default_user_preferences.extend_desc.to_unsafe volume ||= CONFIG.default_user_preferences.volume vr_mode ||= CONFIG.default_user_preferences.vr_mode.to_unsafe - remember_position ||= CONFIG.default_user_preferences.remember_position.to_unsafe + save_player_pos ||= CONFIG.default_user_preferences.save_player_pos.to_unsafe annotations = annotations == 1 autoplay = autoplay == 1 @@ -1144,7 +1144,7 @@ def process_video_params(query, preferences) video_loop = video_loop == 1 extend_desc = extend_desc == 1 vr_mode = vr_mode == 1 - remember_position = remember_position == 1 + save_player_pos = save_player_pos == 1 if CONFIG.disabled?("dash") && quality == "dash" quality = "high" @@ -1195,7 +1195,7 @@ def process_video_params(query, preferences) video_start: video_start, volume: volume, vr_mode: vr_mode, - remember_position: remember_position, + save_player_pos: save_player_pos, }) return params diff --git a/src/invidious/views/preferences.ecr b/src/invidious/views/preferences.ecr index 603c337b..b1ec68ad 100644 --- a/src/invidious/views/preferences.ecr +++ b/src/invidious/views/preferences.ecr @@ -117,8 +117,8 @@
- - checked<% end %>> + + checked<% end %>>
<%= translate(locale, "preferences_category_visual") %> From f31bd5ffb9faf770810360476c63e4e5bed6ed67 Mon Sep 17 00:00:00 2001 From: bbielsa Date: Tue, 26 Oct 2021 19:31:50 -0400 Subject: [PATCH 06/18] Use localization for save player position label in the preferences page --- locales/en-US.json | 3 ++- src/invidious/views/preferences.ecr | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/locales/en-US.json b/locales/en-US.json index 8bdf719b..94aac89e 100644 --- a/locales/en-US.json +++ b/locales/en-US.json @@ -461,5 +461,6 @@ "download_subtitles": "Subtitles - `x` (.vtt)", "user_created_playlists": "`x` created playlists", "user_saved_playlists": "`x` saved playlists", - "Video unavailable": "Video unavailable" + "Video unavailable": "Video unavailable", + "preferences_save_player_pos_label": "Save the current video time: " } diff --git a/src/invidious/views/preferences.ecr b/src/invidious/views/preferences.ecr index b1ec68ad..96904259 100644 --- a/src/invidious/views/preferences.ecr +++ b/src/invidious/views/preferences.ecr @@ -117,7 +117,7 @@
- + checked<% end %>>
From b90bceb2dc0e4bd29b9ace6a0b9d413f8eb673da Mon Sep 17 00:00:00 2001 From: bbielsa Date: Wed, 3 Nov 2021 00:06:29 -0400 Subject: [PATCH 07/18] Fix formatting of preferences.cr and videos.cr --- src/invidious/routes/preferences.cr | 2 +- src/invidious/videos.cr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/invidious/routes/preferences.cr b/src/invidious/routes/preferences.cr index a07584c8..15c00700 100644 --- a/src/invidious/routes/preferences.cr +++ b/src/invidious/routes/preferences.cr @@ -169,7 +169,7 @@ module Invidious::Routes::PreferencesRoute extend_desc: extend_desc, vr_mode: vr_mode, show_nick: show_nick, - save_player_pos: save_player_pos, + save_player_pos: save_player_pos, }.to_json).to_json if user = env.get? "user" diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr index 9b4b54e8..d4ef0900 100644 --- a/src/invidious/videos.cr +++ b/src/invidious/videos.cr @@ -1195,7 +1195,7 @@ def process_video_params(query, preferences) video_start: video_start, volume: volume, vr_mode: vr_mode, - save_player_pos: save_player_pos, + save_player_pos: save_player_pos, }) return params From ed6476b5ea1534d18198296f1c897e13467c7c48 Mon Sep 17 00:00:00 2001 From: bbielsa Date: Wed, 17 Nov 2021 20:25:47 -0500 Subject: [PATCH 08/18] Allow the t parameter to override the stored video playback position --- assets/js/player.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/js/player.js b/assets/js/player.js index b4973482..0cc4bab9 100644 --- a/assets/js/player.js +++ b/assets/js/player.js @@ -202,10 +202,14 @@ if (video_data.premiere_timestamp && Math.round(new Date() / 1000) < video_data. } if (video_data.params.save_player_pos) { + const url = new URL(location); + const hasTimeParam = url.searchParams.has("t"); const remeberedTime = get_video_time(); let lastUpdated = 0; - set_seconds_after_start(remeberedTime); + if(!hasTimeParam) { + set_seconds_after_start(remeberedTime); + } const updateTime = () => { const raw = player.currentTime(); From b396a2cbfd3554227f766a3595f92591c4249d59 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 21 Dec 2021 20:02:22 +0100 Subject: [PATCH 09/18] Update Spanish translation Co-authored-by: Hosted Weblate Co-authored-by: Jorge Maldonado Ventura --- locales/es.json | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/locales/es.json b/locales/es.json index 1403a731..059747be 100644 --- a/locales/es.json +++ b/locales/es.json @@ -433,5 +433,33 @@ "footer_modfied_source_code": "Código fuente modificado", "footer_donate_page": "Donar", "preferences_region_label": "País del contenido: ", - "preferences_quality_dash_label": "Calidad de vídeo DASH preferida: " + "preferences_quality_dash_label": "Calidad de vídeo DASH preferida: ", + "preferences_quality_option_hd720": "HD720", + "preferences_quality_option_medium": "Intermedia", + "preferences_quality_dash_option_auto": "Automática", + "none": "ninguno", + "videoinfo_started_streaming_x_ago": "Comenzó difusión hace `x`", + "download_subtitles": "Subtítulos- `x` (.vtt)", + "user_created_playlists": "`x` listas de reproducción creadas", + "user_saved_playlists": "`x` listas de reproducción guardadas", + "Video unavailable": "Vídeo no disponible", + "videoinfo_youTube_embed_link": "Embeber", + "preferences_quality_dash_option_2160p": "2160p", + "preferences_quality_dash_option_4320p": "4320p", + "invidious": "Invidious", + "preferences_quality_dash_option_480p": "480p", + "preferences_quality_option_dash": "DASH (calidad adaptativa)", + "preferences_quality_dash_option_720p": "720p", + "preferences_quality_dash_option_360p": "360p", + "preferences_quality_dash_option_240p": "240p", + "preferences_quality_dash_option_144p": "144p", + "preferences_quality_option_small": "Pequeña", + "preferences_quality_dash_option_1440p": "1440p", + "preferences_quality_dash_option_best": "La mejor", + "preferences_quality_dash_option_worst": "La peor", + "videoinfo_invidious_embed_link": "Enlace para Embeber", + "preferences_quality_dash_option_1080p": "1080p", + "purchased": "Comprado", + "360": "360°", + "videoinfo_watch_on_youTube": "Ver en YouTube" } From 2724456882dffb8f6e5dad57e78086bd2396fc8b Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 21 Dec 2021 20:02:22 +0100 Subject: [PATCH 10/18] =?UTF-8?q?Update=20Norwegian=20Bokm=C3=A5l=20transl?= =?UTF-8?q?ation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Allan Nordhøy Co-authored-by: Hosted Weblate --- locales/nb-NO.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/nb-NO.json b/locales/nb-NO.json index 9e5eef03..14361224 100644 --- a/locales/nb-NO.json +++ b/locales/nb-NO.json @@ -453,7 +453,7 @@ "none": "intet", "videoinfo_watch_on_youTube": "Se på YouTube", "videoinfo_youTube_embed_link": "Bak inn", - "videoinfo_invidious_embed_link": "Bak in lenke", + "videoinfo_invidious_embed_link": "Bak inn lenke", "download_subtitles": "Undertekster - `x` (.vtt)", "user_created_playlists": "`x` spillelister opprettet", "user_saved_playlists": "`x` spillelister lagret", From 4136ac633ade8637075ba87426138cf0c7540efd Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 21 Dec 2021 20:02:22 +0100 Subject: [PATCH 11/18] Update Japanese translation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: GnuPGを使うべきだ Co-authored-by: Hosted Weblate --- locales/ja.json | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/locales/ja.json b/locales/ja.json index c7764d33..bf858f1f 100644 --- a/locales/ja.json +++ b/locales/ja.json @@ -433,5 +433,21 @@ "long": "20 分以上", "preferences_region_label": "地域: ", "footer_donate_page": "寄付する", - "preferences_quality_dash_label": "優先するDash画質 : " + "preferences_quality_dash_label": "優先するDash画質 : ", + "preferences_quality_dash_option_4320p": "4320p", + "preferences_quality_dash_option_240p": "240p", + "preferences_quality_dash_option_144p": "144p", + "preferences_quality_option_hd720": "HD720", + "preferences_quality_option_medium": "中", + "preferences_quality_option_small": "小", + "invidious": "Invidious", + "preferences_quality_dash_option_auto": "自動", + "preferences_quality_dash_option_720p": "720p", + "preferences_quality_dash_option_360p": "360p", + "preferences_quality_dash_option_2160p": "2160p", + "preferences_quality_dash_option_1080p": "1080p", + "preferences_quality_dash_option_1440p": "1440p", + "preferences_quality_dash_option_480p": "480p", + "videoinfo_youTube_embed_link": "埋め込み", + "videoinfo_invidious_embed_link": "埋め込みリンク" } From a3fd9ccea79971a3e709b65ed2fa795ce882e52b Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 21 Dec 2021 20:02:22 +0100 Subject: [PATCH 12/18] Update Arabic translation Co-authored-by: Hosted Weblate Co-authored-by: Rex_sa --- locales/ar.json | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/locales/ar.json b/locales/ar.json index 7deeb553..6e8792ca 100644 --- a/locales/ar.json +++ b/locales/ar.json @@ -433,5 +433,33 @@ "footer_documentation": "التوثيق", "footer_donate_page": "تبرّع", "preferences_region_label": "بلد المحتوى:. ", - "preferences_quality_dash_label": "جودة فيديو DASH المفضلة: " + "preferences_quality_dash_label": "جودة فيديو DASH المفضلة: ", + "preferences_quality_option_dash": "DASH (جودة تكييفية)", + "preferences_quality_option_hd720": "HD720", + "preferences_quality_option_medium": "متوسطة", + "preferences_quality_option_small": "صغيرة", + "preferences_quality_dash_option_auto": "تلقائي", + "preferences_quality_dash_option_best": "الأفضل", + "preferences_quality_dash_option_worst": "أسوأ", + "preferences_quality_dash_option_4320p": "4320p", + "preferences_quality_dash_option_2160p": "2160p", + "preferences_quality_dash_option_1440p": "1440p", + "preferences_quality_dash_option_1080p": "1080p", + "preferences_quality_dash_option_720p": "720p", + "preferences_quality_dash_option_480p": "480p", + "preferences_quality_dash_option_360p": "360p", + "preferences_quality_dash_option_240p": "240p", + "preferences_quality_dash_option_144p": "144p", + "purchased": "تم شراؤها", + "none": "لاشيء", + "videoinfo_started_streaming_x_ago": "بدأ البث منذ `x`", + "videoinfo_watch_on_youTube": "مشاهدة على يوتيوب", + "videoinfo_youTube_embed_link": "مضمن", + "videoinfo_invidious_embed_link": "رابط مضمن", + "user_created_playlists": "'x' إنشاء قوائم التشغيل", + "user_saved_playlists": "قوائم التشغيل المحفوظة 'x'", + "Video unavailable": "الفيديو غير متوفر", + "360": "360°", + "download_subtitles": "ترجمات - 'x' (.vtt)", + "invidious": "الخيالي" } From 75f655aafc66d811e594fe00eac9c8234b2cbf48 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 21 Dec 2021 20:02:23 +0100 Subject: [PATCH 13/18] Update French translation Update French translation Co-authored-by: Bundy01 Co-authored-by: Hosted Weblate Co-authored-by: Samantaz Fox --- locales/fr.json | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/locales/fr.json b/locales/fr.json index d521eb1f..aa439f89 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -433,5 +433,33 @@ "long": "Longue (> 20 minutes)", "adminprefs_modified_source_code_url_label": "URL du dépôt du code source modifié", "footer_documentation": "Documentation", - "footer_original_source_code": "Code source original" + "footer_original_source_code": "Code source original", + "preferences_quality_option_medium": "Moyenne", + "preferences_quality_option_small": "Petite", + "preferences_quality_dash_option_auto": "Auto", + "preferences_quality_dash_option_best": "La plus haute", + "preferences_quality_dash_option_worst": "La plus basse", + "preferences_quality_dash_option_4320p": "4320p", + "preferences_quality_dash_option_2160p": "2160p", + "preferences_quality_dash_option_720p": "720p", + "preferences_quality_dash_option_480p": "480p", + "preferences_quality_dash_option_360p": "360p", + "preferences_quality_dash_option_240p": "240p", + "preferences_quality_dash_option_144p": "144p", + "invidious": "Invidious", + "360": "360°", + "none": "aucun", + "videoinfo_started_streaming_x_ago": "En stream depuis `x`", + "videoinfo_watch_on_youTube": "Regarder sur YouTube", + "videoinfo_youTube_embed_link": "Intégrer", + "purchased": "Acheter", + "videoinfo_invidious_embed_link": "Lien intégré", + "download_subtitles": "Sous-titres - `x` (.vtt)", + "user_saved_playlists": "`x` listes de lecture sauvegardées", + "Video unavailable": "Vidéo non disponible", + "preferences_quality_option_hd720": "HD720", + "preferences_quality_option_dash": "DASH (qualité adaptative)", + "preferences_quality_dash_option_1440p": "1440p", + "preferences_quality_dash_option_1080p": "1080p", + "user_created_playlists": "`x` listes de lecture créées" } From f07b4f8fc4c6e2849b92b72ae9ff064cc006cd02 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 21 Dec 2021 20:02:23 +0100 Subject: [PATCH 14/18] Update Turkish translation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Hosted Weblate Co-authored-by: Oğuz Ersen --- locales/tr.json | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/locales/tr.json b/locales/tr.json index 372c09a3..2ef57d03 100644 --- a/locales/tr.json +++ b/locales/tr.json @@ -433,5 +433,33 @@ "adminprefs_modified_source_code_url_label": "Değiştirilmiş kaynak kodları deposunun URL'si", "footer_donate_page": "Bağış yap", "preferences_region_label": "İçerik ülkesi: ", - "preferences_quality_dash_label": "Tercih edilen DASH video kalitesi: " + "preferences_quality_dash_label": "Tercih edilen DASH video kalitesi: ", + "preferences_quality_option_hd720": "HD720", + "preferences_quality_dash_option_best": "En iyi", + "preferences_quality_dash_option_worst": "En kötü", + "preferences_quality_dash_option_4320p": "4320p", + "preferences_quality_dash_option_2160p": "2160p", + "preferences_quality_dash_option_480p": "480p", + "preferences_quality_dash_option_360p": "360p", + "preferences_quality_dash_option_240p": "240p", + "preferences_quality_dash_option_144p": "144p", + "invidious": "Invidious", + "none": "yok", + "videoinfo_started_streaming_x_ago": "`x` önce yayına başladı", + "videoinfo_youTube_embed_link": "Göm", + "videoinfo_invidious_embed_link": "Bağlantıyı Göm", + "user_created_playlists": "`x` oluşturulan oynatma listeleri", + "user_saved_playlists": "`x` kaydedilen oynatma listeleri", + "preferences_quality_option_small": "Küçük", + "preferences_quality_dash_option_720p": "720p", + "preferences_quality_option_medium": "Orta", + "preferences_quality_dash_option_1440p": "1440p", + "preferences_quality_dash_option_1080p": "1080p", + "Video unavailable": "Video kullanılamıyor", + "preferences_quality_option_dash": "DASH (uyarlanabilir kalite)", + "preferences_quality_dash_option_auto": "Otomatik", + "purchased": "Satın alınan", + "360": "360°", + "videoinfo_watch_on_youTube": "YouTube'da izle", + "download_subtitles": "Alt yazılar - `x` (.vtt)" } From 130a14d0d94b83dfd18fb337d8cf5318ae3806ef Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 21 Dec 2021 20:02:23 +0100 Subject: [PATCH 15/18] Update Chinese (Traditional) translation Co-authored-by: Hosted Weblate Co-authored-by: Jeff Huang --- locales/zh-TW.json | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/locales/zh-TW.json b/locales/zh-TW.json index 2c274969..2fa19f4a 100644 --- a/locales/zh-TW.json +++ b/locales/zh-TW.json @@ -433,5 +433,33 @@ "adminprefs_modified_source_code_url_label": "修改後的原始碼倉庫 URL", "footer_donate_page": "捐款", "preferences_region_label": "內容國家: ", - "preferences_quality_dash_label": "偏好的 DASH 影片品質: " + "preferences_quality_dash_label": "偏好的 DASH 影片品質: ", + "preferences_quality_option_hd720": "HD720", + "preferences_quality_dash_option_worst": "最差", + "preferences_quality_dash_option_4320p": "4320p", + "preferences_quality_dash_option_2160p": "2160p", + "preferences_quality_dash_option_1440p": "1440p", + "preferences_quality_dash_option_1080p": "1080p", + "preferences_quality_dash_option_720p": "720p", + "preferences_quality_dash_option_480p": "480p", + "preferences_quality_dash_option_360p": "360p", + "preferences_quality_dash_option_240p": "240p", + "preferences_quality_dash_option_144p": "144p", + "invidious": "Invidious", + "purchased": "已購買", + "360": "360°", + "none": "無", + "videoinfo_started_streaming_x_ago": "`x` 前開始串流", + "videoinfo_watch_on_youTube": "在 YouTube 上觀看", + "videoinfo_youTube_embed_link": "嵌入", + "videoinfo_invidious_embed_link": "嵌入連結", + "download_subtitles": "字幕 - `x` (.vtt)", + "user_created_playlists": "`x` 已建立的播放清單", + "user_saved_playlists": "`x` 已儲存的播放清單", + "Video unavailable": "影片不可用", + "preferences_quality_option_small": "小", + "preferences_quality_option_dash": "DASH(主動調整品質)", + "preferences_quality_option_medium": "中等", + "preferences_quality_dash_option_auto": "自動", + "preferences_quality_dash_option_best": "最佳" } From 3d6dceae100a50812ea26b5a1b591d429f0bd625 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 21 Dec 2021 20:02:23 +0100 Subject: [PATCH 16/18] Update Indonesian translation Co-authored-by: Hosted Weblate Co-authored-by: I. Musthafa --- locales/id.json | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/locales/id.json b/locales/id.json index 72221883..ffae1654 100644 --- a/locales/id.json +++ b/locales/id.json @@ -433,5 +433,33 @@ "footer_modfied_source_code": "Kode sumber yang dimodifikasi", "footer_documentation": "Dokumentasi", "preferences_region_label": "Konten dari negara: ", - "preferences_quality_dash_label": "Kualitas video DASH yang disukai: " + "preferences_quality_dash_label": "Kualitas video DASH yang disukai: ", + "preferences_quality_option_medium": "Medium", + "preferences_quality_option_small": "Rendah", + "preferences_quality_dash_option_best": "Terbaik", + "preferences_quality_dash_option_worst": "Terburuk", + "preferences_quality_dash_option_4320p": "4320p", + "preferences_quality_dash_option_2160p": "2160p", + "preferences_quality_dash_option_1080p": "1080p", + "preferences_quality_dash_option_720p": "720p", + "preferences_quality_dash_option_360p": "360p", + "preferences_quality_dash_option_240p": "240p", + "preferences_quality_dash_option_144p": "144p", + "invidious": "Invidious", + "purchased": "Dibeli", + "360": "360°", + "none": "tidak ada", + "videoinfo_watch_on_youTube": "Tonton di YouTube", + "videoinfo_youTube_embed_link": "Tersemat", + "videoinfo_invidious_embed_link": "Tautan Tersemat", + "download_subtitles": "Takarir- `x` (.vtt)", + "user_saved_playlists": "`x` daftar putar yang disimpan", + "videoinfo_started_streaming_x_ago": "Mulai siaran `x` yang lalu", + "user_created_playlists": "`x` daftar putar yang dibuat", + "preferences_quality_option_dash": "DASH (kualitas adaptif)", + "preferences_quality_option_hd720": "HD720", + "preferences_quality_dash_option_1440p": "1440p", + "preferences_quality_dash_option_auto": "Otomatis", + "preferences_quality_dash_option_480p": "480p", + "Video unavailable": "Video tidak tersedia" } From fc2b9031d4850e7ed8eb24e388aeae38b4eb2762 Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Wed, 22 Dec 2021 00:52:08 +0100 Subject: [PATCH 17/18] i18n: Add Serbian back --- src/invidious/helpers/i18n.cr | 72 +++++++++++++++++------------------ 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/src/invidious/helpers/i18n.cr b/src/invidious/helpers/i18n.cr index 6e29b498..fd3ddbad 100644 --- a/src/invidious/helpers/i18n.cr +++ b/src/invidious/helpers/i18n.cr @@ -1,43 +1,43 @@ # "bn_BD" => load_locale("bn_BD"), # Bengali (Bangladesh) [Incomplete] # "eu" => load_locale("eu"), # Basque [Incomplete] # "sk" => load_locale("sk"), # Slovak [Incomplete] -# "sr" => load_locale("sr"), # Serbian [Incomplete] -# "sr_Cyrl" => load_locale("sr_Cyrl"), # Serbian (cyrillic) [Incomplete] LOCALES_LIST = { - "ar" => "العربية", # Arabic - "cs" => "Čeština", # Czech - "da" => "Dansk", # Danish - "de" => "Deutsch", # German - "el" => "Ελληνικά", # Greek - "en-US" => "English", # English - "eo" => "Esperanto", # Esperanto - "es" => "Español", # Spanish - "fa" => "فارسی", # Persian - "fi" => "Suomi", # Finnish - "fr" => "Français", # French - "he" => "עברית", # Hebrew - "hr" => "Hrvatski", # Croatian - "hu-HU" => "Magyar Nyelv", # Hungarian - "id" => "Bahasa Indonesia", # Indonesian - "is" => "Íslenska", # Icelandic - "it" => "Italiano", # Italian - "ja" => "日本語", # Japanese - "ko" => "한국어", # Korean - "lt" => "Lietuvių", # Lithuanian - "nb-NO" => "Norsk bokmål", # Norwegian Bokmål - "nl" => "Nederlands", # Dutch - "pl" => "Polski", # Polish - "pt" => "Português", # Portuguese - "pt-BR" => "Português Brasileiro", # Portuguese (Brazil) - "pt-PT" => "Português de Portugal", # Portuguese (Portugal) - "ro" => "Română", # Romanian - "ru" => "русский", # Russian - "sv-SE" => "Svenska", # Swedish - "tr" => "Türkçe", # Turkish - "uk" => "Українська", # Ukrainian - "vi" => "Tiếng Việt", # Vietnamese - "zh-CN" => "汉语", # Chinese (Simplified) - "zh-TW" => "漢語", # Chinese (Traditional) + "ar" => "العربية", # Arabic + "cs" => "Čeština", # Czech + "da" => "Dansk", # Danish + "de" => "Deutsch", # German + "el" => "Ελληνικά", # Greek + "en-US" => "English", # English + "eo" => "Esperanto", # Esperanto + "es" => "Español", # Spanish + "fa" => "فارسی", # Persian + "fi" => "Suomi", # Finnish + "fr" => "Français", # French + "he" => "עברית", # Hebrew + "hr" => "Hrvatski", # Croatian + "hu-HU" => "Magyar Nyelv", # Hungarian + "id" => "Bahasa Indonesia", # Indonesian + "is" => "Íslenska", # Icelandic + "it" => "Italiano", # Italian + "ja" => "日本語", # Japanese + "ko" => "한국어", # Korean + "lt" => "Lietuvių", # Lithuanian + "nb-NO" => "Norsk bokmål", # Norwegian Bokmål + "nl" => "Nederlands", # Dutch + "pl" => "Polski", # Polish + "pt" => "Português", # Portuguese + "pt-BR" => "Português Brasileiro", # Portuguese (Brazil) + "pt-PT" => "Português de Portugal", # Portuguese (Portugal) + "ro" => "Română", # Romanian + "ru" => "русский", # Russian + "sr" => "srpski (latinica)", # Serbian (Latin) + "sr_Cyrl" => "српски (ћирилица)", # Serbian (Cyrillic) + "sv-SE" => "Svenska", # Swedish + "tr" => "Türkçe", # Turkish + "uk" => "Українська", # Ukrainian + "vi" => "Tiếng Việt", # Vietnamese + "zh-CN" => "汉语", # Chinese (Simplified) + "zh-TW" => "漢語", # Chinese (Traditional) } LOCALES = load_all_locales() From 12fba3bb7afc0b6b9fa360d58f9ffb1ac84f1d35 Mon Sep 17 00:00:00 2001 From: TheFrenchGhosty <47571719+TheFrenchGhosty@users.noreply.github.com> Date: Wed, 22 Dec 2021 01:03:09 +0100 Subject: [PATCH 18/18] Add the Invidious's Mastodon account to the README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 29b8397a..720da1b4 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,10 @@ Libera.chat (IRC) +
+ + Mastodon: @invidious@social.tchncs.de +