From 1e214aae7cedbb0770312e3eb2901216d27e6da7 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Tue, 29 Jan 2019 19:55:27 -0600 Subject: [PATCH 01/10] Reload player instead of removing invalid source --- src/invidious/views/components/player.ecr | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/src/invidious/views/components/player.ecr b/src/invidious/views/components/player.ecr index 80879b67..b165985f 100644 --- a/src/invidious/views/components/player.ecr +++ b/src/invidious/views/components/player.ecr @@ -115,7 +115,7 @@ var player = videojs("player", options, function() { }); player.on('error', function(event) { - if (player.error().code === 2) { + if (player.error().code === 2 || player.error().code === 4) { console.log("An error occured in the player, reloading..."); var currentTime = player.currentTime(); @@ -126,25 +126,6 @@ player.on('error', function(event) { } player.currentTime(currentTime); player.playbackRate(playbackRate); - player.play() - } else if (player.error().code === 4) { - console.log("Detected invalid source, removing..."); - var currentTime = player.currentTime(); - var sources = player.options().sources; - - for (var i = 0; i < sources.length; i++) { - if (sources[i].src === player.currentSource().src) { - sources.splice(i, 1); - break - } - }; - - player.load(); - if (currentTime > 0.5) { - currentTime -= 0.5; - } - player.currentTime(currentTime); - player.src(sources); player.play(); } }); From 9e73e3b15326bfac7c94a2cd997f742abbe66305 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Thu, 31 Jan 2019 08:48:44 -0600 Subject: [PATCH 02/10] Add errorcode for invalid video IDs --- src/invidious/videos.cr | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr index ec911e3f..6298fa4e 100644 --- a/src/invidious/videos.cr +++ b/src/invidious/videos.cr @@ -633,6 +633,10 @@ def fetch_video(id, proxies, region) end end + if info["errorcode"]?.try &.== "2" + raise "Video unavailable." + end + title = info["title"] author = info["author"] ucid = info["ucid"] From def58ff11f226f6d8f6cafc7b743e8ba2434fd72 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Thu, 31 Jan 2019 09:09:00 -0600 Subject: [PATCH 03/10] Add interval and timeout for errors in player --- src/invidious/views/components/player.ecr | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/invidious/views/components/player.ecr b/src/invidious/views/components/player.ecr index b165985f..9efe04fc 100644 --- a/src/invidious/views/components/player.ecr +++ b/src/invidious/views/components/player.ecr @@ -116,17 +116,19 @@ var player = videojs("player", options, function() { player.on('error', function(event) { if (player.error().code === 2 || player.error().code === 4) { - console.log("An error occured in the player, reloading..."); + setInterval(setTimeout(function (event) { + console.log("An error occured in the player, reloading..."); - var currentTime = player.currentTime(); - var playbackRate = player.playbackRate(); - player.load(); - if (currentTime > 0.5) { - currentTime -= 0.5; - } - player.currentTime(currentTime); - player.playbackRate(playbackRate); - player.play(); + var currentTime = player.currentTime(); + var playbackRate = player.playbackRate(); + player.load(); + if (currentTime > 0.5) { + currentTime -= 0.5; + } + player.currentTime(currentTime); + player.playbackRate(playbackRate); + player.play(); + }, 5000), 5000); } }); From cef061d6fb62cee6ebd87c7d98c778fccb9271bb Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Thu, 31 Jan 2019 14:40:26 -0600 Subject: [PATCH 04/10] Fix incorrect default in user preferences --- src/invidious.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious.cr b/src/invidious.cr index a720670a..69bbed77 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -1146,7 +1146,7 @@ post "/preferences" do |env| captions = [captions_0, captions_1, captions_2] related_videos = env.params.body["related_videos"]?.try &.as(String) - related_videos ||= "off" + related_videos ||= "on" related_videos = related_videos == "on" redirect_feed = env.params.body["redirect_feed"]?.try &.as(String) From fbb5df084990a67e934d9aeb8fc535a0a7198b8e Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Thu, 31 Jan 2019 14:54:02 -0600 Subject: [PATCH 05/10] Default to showing recommendations for logged out users --- src/invidious.cr | 2 +- src/invidious/views/watch.ecr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index 69bbed77..a720670a 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -1146,7 +1146,7 @@ post "/preferences" do |env| captions = [captions_0, captions_1, captions_2] related_videos = env.params.body["related_videos"]?.try &.as(String) - related_videos ||= "on" + related_videos ||= "off" related_videos = related_videos == "on" redirect_feed = env.params.body["redirect_feed"]?.try &.as(String) diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr index dc58d48d..a8f98492 100644 --- a/src/invidious/views/watch.ecr +++ b/src/invidious/views/watch.ecr @@ -141,7 +141,7 @@ - <% if preferences && preferences.related_videos || plid %> + <% if !preferences || preferences && preferences.related_videos || plid %>
<% if plid %>
From c9bc081f8c4d3b6d7d19d911f6b1944c5f461e77 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Thu, 31 Jan 2019 15:06:53 -0600 Subject: [PATCH 06/10] Respect DEFAULT_USER_PREFERENCES in video params --- src/invidious.cr | 22 +++++++++++----------- src/invidious/users.cr | 18 +++++++++--------- src/invidious/videos.cr | 16 ++++++++-------- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index a720670a..99f9e1af 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -1128,21 +1128,21 @@ post "/preferences" do |env| listen = listen == "on" speed = env.params.body["speed"]?.try &.as(String).to_f? - speed ||= 1.0 + speed ||= DEFAULT_USER_PREFERENCES.speed quality = env.params.body["quality"]?.try &.as(String) - quality ||= "hd720" + quality ||= DEFAULT_USER_PREFERENCES.quality volume = env.params.body["volume"]?.try &.as(String).to_i? - volume ||= 100 + volume ||= DEFAULT_USER_PREFERENCES.volume - comments_0 = env.params.body["comments_0"]?.try &.as(String) || "youtube" - comments_1 = env.params.body["comments_1"]?.try &.as(String) || "" + comments_0 = env.params.body["comments_0"]?.try &.as(String) || DEFAULT_USER_PREFERENCES.comments[0] + comments_1 = env.params.body["comments_1"]?.try &.as(String) || DEFAULT_USER_PREFERENCES.comments[1] comments = [comments_0, comments_1] - captions_0 = env.params.body["captions_0"]?.try &.as(String) || "" - captions_1 = env.params.body["captions_1"]?.try &.as(String) || "" - captions_2 = env.params.body["captions_2"]?.try &.as(String) || "" + captions_0 = env.params.body["captions_0"]?.try &.as(String) || DEFAULT_USER_PREFERENCES.captions[0] + captions_1 = env.params.body["captions_1"]?.try &.as(String) || DEFAULT_USER_PREFERENCES.captions[1] + captions_2 = env.params.body["captions_2"]?.try &.as(String) || DEFAULT_USER_PREFERENCES.captions[2] captions = [captions_0, captions_1, captions_2] related_videos = env.params.body["related_videos"]?.try &.as(String) @@ -1154,7 +1154,7 @@ post "/preferences" do |env| redirect_feed = redirect_feed == "on" locale = env.params.body["locale"]?.try &.as(String) - locale ||= "en-US" + locale ||= DEFAULT_USER_PREFERENCES.locale dark_mode = env.params.body["dark_mode"]?.try &.as(String) dark_mode ||= "off" @@ -1165,10 +1165,10 @@ post "/preferences" do |env| thin_mode = thin_mode == "on" max_results = env.params.body["max_results"]?.try &.as(String).to_i? - max_results ||= 40 + max_results ||= DEFAULT_USER_PREFERENCES.max_results sort = env.params.body["sort"]?.try &.as(String) - sort ||= "published" + sort ||= DEFAULT_USER_PREFERENCES.sort latest_only = env.params.body["latest_only"]?.try &.as(String) latest_only ||= "off" diff --git a/src/invidious/users.cr b/src/invidious/users.cr index dbbe87f8..d45c5af4 100644 --- a/src/invidious/users.cr +++ b/src/invidious/users.cr @@ -79,36 +79,36 @@ class Preferences autoplay: Bool, continue: { type: Bool, - default: false, + default: DEFAULT_USER_PREFERENCES.continue, }, listen: { type: Bool, - default: false, + default: DEFAULT_USER_PREFERENCES.listen, }, speed: Float32, quality: String, volume: Int32, comments: { type: Array(String), - default: ["youtube", ""], + default: DEFAULT_USER_PREFERENCES.comments, converter: StringToArray, }, captions: { type: Array(String), - default: ["", "", ""], + default: DEFAULT_USER_PREFERENCES.captions, }, redirect_feed: { type: Bool, - default: false, + default: DEFAULT_USER_PREFERENCES.redirect_feed, }, related_videos: { type: Bool, - default: true, + default: DEFAULT_USER_PREFERENCES.related_videos, }, dark_mode: Bool, thin_mode: { type: Bool, - default: false, + default: DEFAULT_USER_PREFERENCES.thin_mode, }, max_results: Int32, sort: String, @@ -116,11 +116,11 @@ class Preferences unseen_only: Bool, notifications_only: { type: Bool, - default: false, + default: DEFAULT_USER_PREFERENCES.notifications_only, }, locale: { type: String, - default: "en-US", + default: DEFAULT_USER_PREFERENCES.locale, }, }) end diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr index 6298fa4e..a95f5443 100644 --- a/src/invidious/videos.cr +++ b/src/invidious/videos.cr @@ -745,14 +745,14 @@ def process_video_params(query, preferences) volume ||= preferences.volume end - autoplay ||= 0 - continue ||= 0 - listen ||= 0 - preferred_captions ||= [] of String - quality ||= "hd720" - speed ||= 1 - video_loop ||= 0 - volume ||= 100 + autoplay ||= DEFAULT_USER_PREFERENCES.autoplay.to_unsafe + continue ||= DEFAULT_USER_PREFERENCES.continue.to_unsafe + listen ||= DEFAULT_USER_PREFERENCES.listen.to_unsafe + preferred_captions ||= DEFAULT_USER_PREFERENCES.captions + quality ||= DEFAULT_USER_PREFERENCES.quality + speed ||= DEFAULT_USER_PREFERENCES.speed + video_loop ||= DEFAULT_USER_PREFERENCES.video_loop.to_unsafe + volume ||= DEFAULT_USER_PREFERENCES.volume autoplay = autoplay == 1 continue = continue == 1 From a7fbcd0aa8591177b58cb84048ae9dcc47e9de49 Mon Sep 17 00:00:00 2001 From: beriain Date: Thu, 24 Jan 2019 19:41:41 +0000 Subject: [PATCH 07/10] Add Basque translation --- locales/eu.json | 274 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 274 insertions(+) create mode 100644 locales/eu.json diff --git a/locales/eu.json b/locales/eu.json new file mode 100644 index 00000000..60aac23d --- /dev/null +++ b/locales/eu.json @@ -0,0 +1,274 @@ +{ + "`x` subscribers": "", + "`x` videos": "", + "LIVE": "", + "Shared `x` ago": "", + "Unsubscribe": "", + "Subscribe": "", + "Login to subscribe to `x`": "", + "View channel on YouTube": "", + "newest": "", + "oldest": "", + "popular": "", + "Preview page": "", + "Next page": "", + "Clear watch history?": "", + "Yes": "", + "No": "", + "Import and Export Data": "", + "Import": "", + "Import Invidious data": "", + "Import YouTube subscriptions": "", + "Import FreeTube subscriptions (.db)": "", + "Import NewPipe subscriptions (.json)": "", + "Import NewPipe data (.zip)": "", + "Export": "", + "Export subscriptions as OPML": "", + "Export subscriptions as OPML (for NewPipe & FreeTube)": "", + "Export data as JSON": "", + "Delete account?": "", + "History": "", + "Previous page": "", + "An alternative front-end to YouTube": "", + "JavaScript license information": "", + "source": "", + "Login": "", + "Login/Register": "", + "Login to Google": "", + "User ID:": "", + "Password:": "", + "Time (h:mm:ss):": "", + "Text CAPTCHA": "", + "Image CAPTCHA": "", + "Sign In": "", + "Register": "", + "Email:": "", + "Google verification code:": "", + "Preferences": "", + "Player preferences": "", + "Always loop: ": "", + "Autoplay: ": "", + "Autoplay next video: ": "", + "Listen by default: ": "", + "Default speed: ": "", + "Preferred video quality: ": "", + "Player volume: ": "", + "Default comments: ": "", + "Default captions: ": "", + "Fallback captions: ": "", + "Show related videos? ": "", + "Visual preferences": "", + "Dark mode: ": "", + "Thin mode: ": "", + "Subscription preferences": "", + "Redirect homepage to feed: ": "", + "Number of videos shown in feed: ": "", + "Sort videos by: ": "", + "published": "", + "published - reverse": "", + "alphabetically": "", + "alphabetically - reverse": "", + "channel name": "", + "channel name - reverse": "", + "Only show latest video from channel: ": "", + "Only show latest unwatched video from channel: ": "", + "Only show unwatched: ": "", + "Only show notifications (if there are any): ": "", + "Data preferences": "", + "Clear watch history": "", + "Import/Export data": "", + "Manage subscriptions": "", + "Watch history": "", + "Delete account": "", + "Save preferences": "", + "Subscription manager": "", + "`x` subscriptions": "", + "Import/Export": "", + "unsubscribe": "", + "Subscriptions": "", + "`x` unseen notifications": "", + "search": "", + "Sign out": "", + "Released under the AGPLv3 by Omar Roth.": "", + "Source available here.": "", + "View JavaScript license information.": "", + "Trending": "", + "Watch video on Youtube": "", + "Genre: ": "", + "License: ": "", + "Family friendly? ": "", + "Wilson score: ": "", + "Engagement: ": "", + "Whitelisted regions: ": "", + "Blacklisted regions: ": "", + "Shared `x`": "", + "Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "", + "View YouTube comments": "", + "View more comments on Reddit": "", + "View `x` comments": "", + "View Reddit comments": "", + "Hide replies": "", + "Show replies": "", + "Incorrect password": "", + "Quota exceeded, try again in a few hours": "", + "Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "", + "Invalid TFA code": "", + "Login failed. This may be because two-factor authentication is not enabled on your account.": "", + "Invalid answer": "", + "Invalid CAPTCHA": "", + "CAPTCHA is a required field": "", + "User ID is a required field": "", + "Password is a required field": "", + "Invalid username or password": "", + "Please sign in using 'Sign in with Google'": "", + "Password cannot be empty": "", + "Password cannot be longer than 55 characters": "", + "Please sign in": "", + "Invidious Private Feed for `x`": "", + "channel:`x`": "", + "Deleted or invalid channel": "", + "This channel does not exist.": "", + "Could not get channel info.": "", + "Could not fetch comments": "", + "View `x` replies": "", + "`x` ago": "", + "Load more": "", + "`x` points": "", + "Could not create mix.": "", + "Playlist is empty": "", + "Invalid playlist.": "", + "Playlist does not exist.": "", + "Could not pull trending pages.": "", + "Hidden field \"challenge\" is a required field": "", + "Hidden field \"token\" is a required field": "", + "Invalid challenge": "", + "Invalid token": "", + "Invalid user": "", + "Token is expired, please try again": "", + "English": "", + "English (auto-generated)": "", + "Afrikaans": "", + "Albanian": "", + "Amharic": "", + "Arabic": "", + "Armenian": "", + "Azerbaijani": "", + "Bangla": "", + "Basque": "", + "Belarusian": "", + "Bosnian": "", + "Bulgarian": "", + "Burmese": "", + "Catalan": "", + "Cebuano": "", + "Chinese (Simplified)": "", + "Chinese (Traditional)": "", + "Corsican": "", + "Croatian": "", + "Czech": "", + "Danish": "", + "Dutch": "", + "Esperanto": "", + "Estonian": "", + "Filipino": "", + "Finnish": "", + "French": "", + "Galician": "", + "Georgian": "", + "German": "", + "Greek": "", + "Gujarati": "", + "Haitian Creole": "", + "Hausa": "", + "Hawaiian": "", + "Hebrew": "", + "Hindi": "", + "Hmong": "", + "Hungarian": "", + "Icelandic": "", + "Igbo": "", + "Indonesian": "", + "Irish": "", + "Italian": "", + "Japanese": "", + "Javanese": "", + "Kannada": "", + "Kazakh": "", + "Khmer": "", + "Korean": "", + "Kurdish": "", + "Kyrgyz": "", + "Lao": "", + "Latin": "", + "Latvian": "", + "Lithuanian": "", + "Luxembourgish": "", + "Macedonian": "", + "Malagasy": "", + "Malay": "", + "Malayalam": "", + "Maltese": "", + "Maori": "", + "Marathi": "", + "Mongolian": "", + "Nepali": "", + "Norwegian": "", + "Nyanja": "", + "Pashto": "", + "Persian": "", + "Polish": "", + "Portuguese": "", + "Punjabi": "", + "Romanian": "", + "Russian": "", + "Samoan": "", + "Scottish Gaelic": "", + "Serbian": "", + "Shona": "", + "Sindhi": "", + "Sinhala": "", + "Slovak": "", + "Slovenian": "", + "Somali": "", + "Southern Sotho": "", + "Spanish": "", + "Spanish (Latin America)": "", + "Sundanese": "", + "Swahili": "", + "Swedish": "", + "Tajik": "", + "Tamil": "", + "Telugu": "", + "Thai": "", + "Turkish": "", + "Ukrainian": "", + "Urdu": "", + "Uzbek": "", + "Vietnamese": "", + "Welsh": "", + "Western Frisian": "", + "Xhosa": "", + "Yiddish": "", + "Yoruba": "", + "Zulu": "", + "`x` years": "", + "`x` months": "", + "`x` weeks": "", + "`x` days": "", + "`x` hours": "", + "`x` minutes": "", + "`x` seconds": "", + "Fallback comments: ": "", + "Popular": "", + "Top": "", + "About": "", + "Rating: ": "", + "Language: ": "", + "Default": "", + "Music": "", + "Gaming": "", + "News": "", + "Movies": "", + "Download": "", + "Download as: ": "" +} From aeee40c894098194bf012323b2b27bbf41dd7a2c Mon Sep 17 00:00:00 2001 From: beriain Date: Thu, 24 Jan 2019 19:42:20 +0000 Subject: [PATCH 08/10] Update Basque translation --- locales/eu.json | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/locales/eu.json b/locales/eu.json index 60aac23d..091612d0 100644 --- a/locales/eu.json +++ b/locales/eu.json @@ -4,31 +4,31 @@ "LIVE": "", "Shared `x` ago": "", "Unsubscribe": "", - "Subscribe": "", + "Subscribe": "Harpidetu", "Login to subscribe to `x`": "", - "View channel on YouTube": "", - "newest": "", - "oldest": "", - "popular": "", - "Preview page": "", - "Next page": "", - "Clear watch history?": "", - "Yes": "", - "No": "", - "Import and Export Data": "", - "Import": "", - "Import Invidious data": "", - "Import YouTube subscriptions": "", - "Import FreeTube subscriptions (.db)": "", - "Import NewPipe subscriptions (.json)": "", - "Import NewPipe data (.zip)": "", - "Export": "", - "Export subscriptions as OPML": "", + "View channel on YouTube": "Ikusi kanala YouTuben", + "newest": "berrienak", + "oldest": "zaharrenak", + "popular": "ospetsuenak", + "Preview page": "Aurrebista orria", + "Next page": "Hurrengo orria", + "Clear watch history?": "Garbitu ikusitakoen historia?", + "Yes": "Bai", + "No": "Ez", + "Import and Export Data": "Datuak inportatu eta esportatu", + "Import": "Inportatu", + "Import Invidious data": "Invidiouseko datuak inportatu", + "Import YouTube subscriptions": "YouTubeko harpidetzak inportatu", + "Import FreeTube subscriptions (.db)": "FreeTubeko harpidetzak inportatu (.db)", + "Import NewPipe subscriptions (.json)": "NewPipeko harpidetzak inportatu (.json)", + "Import NewPipe data (.zip)": "NewPipeko datuak inportatu (.zip)", + "Export": "Esportatu", + "Export subscriptions as OPML": "Esportatu harpidetzak OPML bezala", "Export subscriptions as OPML (for NewPipe & FreeTube)": "", "Export data as JSON": "", - "Delete account?": "", - "History": "", - "Previous page": "", + "Delete account?": "Kontua ezabatu?", + "History": "Historia", + "Previous page": "Aurreko orria", "An alternative front-end to YouTube": "", "JavaScript license information": "", "source": "", From 095b5fcea0f1cbae2654f4ff43a84cd5fd3f4a14 Mon Sep 17 00:00:00 2001 From: dimqua Date: Sun, 27 Jan 2019 15:15:48 +0000 Subject: [PATCH 09/10] Update Russian translation --- locales/ru.json | 556 ++++++++++++++++++++++++------------------------ 1 file changed, 278 insertions(+), 278 deletions(-) diff --git a/locales/ru.json b/locales/ru.json index c55c63d8..8ade66c4 100644 --- a/locales/ru.json +++ b/locales/ru.json @@ -1,280 +1,280 @@ { - "`x` subscribers": "`x` подписчиков", - "`x` videos": "`x` видео", - "LIVE": "ПРЯМОЙ ЭФИР", - "Shared `x` ago": "Опубликовано `x` назад", - "Unsubscribe": "Отписаться", - "Subscribe": "Подписаться", - "Login to subscribe to `x`": "Войти, чтобы подписаться на `x`", - "View channel on YouTube": "Канал на YouTube", - "newest": "новые", - "oldest": "старые", - "popular": "популярные", - "Preview page": "Предварительный просмотр", - "Next page": "Следующая страница", - "Clear watch history?": "Очистить историю просмотров?", - "Yes": "Да", - "No": "Нет", - "Import and Export Data": "Импорт и экспорт данных", - "Import": "Импорт", - "Import Invidious data": "Импортировать данные Invidious", - "Import YouTube subscriptions": "Импортировать YouTube подписки", - "Import FreeTube subscriptions (.db)": "Импортировать FreeTube подписки (.db)", - "Import NewPipe subscriptions (.json)": "Импортировать NewPipe подписки (.json)", - "Import NewPipe data (.zip)": "Импортировать данные NewPipe (.zip)", - "Export": "Экспорт", - "Export subscriptions as OPML": "Экспортировать подписки в OPML", - "Export subscriptions as OPML (for NewPipe & FreeTube)": "Экспортировать подписки в OPML (для NewPipe и FreeTube)", - "Export data as JSON": "Экспортировать данные в JSON", - "Delete account?": "Удалить аккаунт?", - "History": "История", - "Previous page": "Предыдущая страница", - "An alternative front-end to YouTube": "Альтернативный фронтенд для YouTube", - "JavaScript license information": "Лицензии JavaScript", - "source": "источник", - "Login": "Войти", - "Login/Register": "Войти/Регистрация", - "Login to Google": "Войти через Google", - "User ID:": "ID пользователя:", - "Password:": "Пароль:", - "Time (h:mm:ss):": "Время (ч:мм:сс):", - "Text CAPTCHA": "Текст капчи", - "Image CAPTCHA": "Изображение капчи", - "Sign In": "Войти", - "Register": "Регистрация", - "Email:": "Эл. почта:", - "Google verification code:": "Код подтверждения Google:", - "Preferences": "Настройки", - "Player preferences": "Настройки проигрывателя", - "Always loop: ": "Всегда повторять: ", - "Autoplay: ": "Автовоспроизведение: ", - "Autoplay next video: ": "Автовоспроизведение следующего видео: ", - "Listen by default: ": "Режим \"только аудио\" по-умолчанию: ", - "Default speed: ": "Скорость по-умолчанию: ", - "Preferred video quality: ": "Предпочтительное качество видео: ", - "Player volume: ": "Громкость воспроизведения: ", - "Default comments: ": "Источник комментариев: ", - "youtube": "YouTube", - "reddit": "Reddit", - "Default captions: ": "Субтитры по-умолчанию: ", - "Fallback captions: ": "Резервные субтитры: ", - "Show related videos? ": "Показывать похожие видео? ", - "Visual preferences": "Визуальные настройки", - "Dark mode: ": "Темная тема: ", - "Thin mode: ": "Облегченный режим: ", - "Subscription preferences": "Настройки подписок", - "Redirect homepage to feed: ": "Отображать ленту вместо главной страницы: ", - "Number of videos shown in feed: ": "Число видео в ленте: ", - "Sort videos by: ": "Сортировать видео по: ", - "published": "дате публикации", - "published - reverse": "дате - обратный порядок", - "alphabetically": "алфавиту", - "alphabetically - reverse": "алфавиту - обратный порядок", - "channel name": "имени канала", - "channel name - reverse": "имени канала - обратный порядок", - "Only show latest video from channel: ": "Отображать только последние видео с каждого канала: ", - "Only show latest unwatched video from channel: ": "Отображать только непросмотренные видео с каждого канала: ", - "Only show unwatched: ": "Отображать только непросмотренные видео: ", - "Only show notifications (if there are any): ": "Отображать только оповещения (если есть): ", - "Data preferences": "Настройки данных", - "Clear watch history": "Очистить историю просмотра", - "Import/Export data": "Импорт/Экспорт данных", - "Manage subscriptions": "Управление подписками", - "Watch history": "История просмотров", - "Delete account": "Удалить аккаунт", - "Save preferences": "Сохранить настройки", - "Subscription manager": "Менеджер подписок", - "`x` subscriptions": "`x` подписок", - "Import/Export": "Импорт/Экспорт", - "unsubscribe": "отписаться", - "Subscriptions": "Подписки", - "`x` unseen notifications": "`x` новых оповещений", - "search": "поиск", - "Sign out": "Выйти", - "Released under the AGPLv3 by Omar Roth.": "Распространяется Omar Roth по AGPLv3.", - "Source available here.": "Исходный код доступен здесь.", - "Liberapay: ": "Liberapay: ", - "Patreon: ": "Patreon: ", - "BTC: ": "BTC: ", - "BCH: ": "BCH: ", - "View JavaScript license information.": "Посмотреть лицензии JavaScript кода.", - "Trending": "В тренде", - "Watch video on Youtube": "Смотреть на YouTube", - "Genre: ": "Жанр: ", - "License: ": "Лицензия: ", - "Family friendly? ": "Семейный просмотр: ", - "Wilson score: ": "Рейтинг Вильсона: ", - "Engagement: ": "Вовлеченность: ", - "Whitelisted regions: ": "Доступно для: ", - "Blacklisted regions: ": "Недоступно для: ", - "Shared `x`": "Опубликовано `x`", - "Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "Похоже, что у Вас отключен JavaScript. Нажмите сюда, чтобы увидеть комментарии (учтите, что они могут загружаться дольше).", - "View YouTube comments": "Смотреть комментарии с YouTube", - "View more comments on Reddit": "Больше комментариев на Reddit", - "View `x` comments": "Показать `x` комментариев", - "View Reddit comments": "Смотреть комментарии с Reddit", - "Hide replies": "Скрыть ответы", - "Show replies": "Показать ответы", - "Incorrect password": "Неправильный пароль", - "Quota exceeded, try again in a few hours": "Превышена квота, попробуйте снова через несколько часов", - "Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "Вход не выполнен, проверьте, не включена ли двухфакторная аутентификация.", - "Invalid TFA code": "Неправильный TFA код", - "Login failed. This may be because two-factor authentication is not enabled on your account.": "Не удалось войти. Это может быть из-за того, что в вашем аккаунте не включена двухфакторная аутентификация.", - "Invalid answer": "Неверный ответ", - "Invalid CAPTCHA": "Неверная капча", - "CAPTCHA is a required field": "Необходимо ввести капчу", - "User ID is a required field": "Необходимо ввести идентификатор пользователя", - "Password is a required field": "Необходимо ввести пароль", - "Invalid username or password": "Недопустимый пароль или имя пользователя", - "Please sign in using 'Sign in with Google'": "Пожалуйста войдите через Google", - "Password cannot be empty": "Пароль не может быть пустым", - "Password cannot be longer than 55 characters": "Пароль не может быть длиннее 55 символов", - "Please sign in": "Пожалуйста, войдите", - "Invidious Private Feed for `x`": "Приватная лента Invidious для `x`", - "channel:`x`": "канал: `x`", - "Deleted or invalid channel": "Канал удален или не найден", - "This channel does not exist.": "Такой канал не существует.", - "Could not get channel info.": "Невозможно получить информацию о канале.", - "Could not fetch comments": "Невозможно получить комментарии", - "View `x` replies": "Показать `x` ответов", - "`x` ago": "`x` назад", - "Load more": "Загрузить больше", - "`x` points": "`x` очков", - "Could not create mix.": "Невозможно создать \"микс\".", - "Playlist is empty": "Плейлист пуст", - "Invalid playlist.": "Некорректный плейлист.", - "Playlist does not exist.": "Плейлист не существует.", - "Could not pull trending pages.": "Невозможно получить страницы \"в тренде\".", - "Hidden field \"challenge\" is a required field": "Необходимо заполнить скрытое поле \"challenge\"", - "Hidden field \"token\" is a required field": "Необходимо заполнить скрытое поле \"токен\"", - "Invalid challenge": "Неправильный ответ в \"challenge\"", - "Invalid token": "Неправильный токен", - "Invalid user": "Недопустимое имя пользователя", - "Token is expired, please try again": "Срок действия токена истек, попробуйте позже", - "English": "Английский", - "English (auto-generated)": "Английский (созданы автоматически)", - "Afrikaans": "", - "Albanian": "", - "Amharic": "", - "Arabic": "", - "Armenian": "", - "Azerbaijani": "", - "Bangla": "", - "Basque": "", - "Belarusian": "", - "Bosnian": "", - "Bulgarian": "", - "Burmese": "", - "Catalan": "", - "Cebuano": "", - "Chinese (Simplified)": "", - "Chinese (Traditional)": "", - "Corsican": "", - "Croatian": "", - "Czech": "", - "Danish": "", - "Dutch": "", - "Esperanto": "", - "Estonian": "", - "Filipino": "", - "Finnish": "", - "French": "", - "Galician": "", - "Georgian": "", - "German": "", - "Greek": "", - "Gujarati": "", - "Haitian Creole": "", - "Hausa": "", - "Hawaiian": "", - "Hebrew": "", - "Hindi": "", - "Hmong": "", - "Hungarian": "", - "Icelandic": "", - "Igbo": "", - "Indonesian": "", - "Irish": "", - "Italian": "", - "Japanese": "", - "Javanese": "", - "Kannada": "", - "Kazakh": "", - "Khmer": "", - "Korean": "", - "Kurdish": "", - "Kyrgyz": "", - "Lao": "", - "Latin": "", - "Latvian": "", - "Lithuanian": "", - "Luxembourgish": "", - "Macedonian": "", - "Malagasy": "", - "Malay": "", - "Malayalam": "", - "Maltese": "", - "Maori": "", - "Marathi": "", - "Mongolian": "", - "Nepali": "", - "Norwegian": "", - "Nyanja": "", - "Pashto": "", - "Persian": "", - "Polish": "", - "Portuguese": "", - "Punjabi": "", - "Romanian": "", - "Russian": "", - "Samoan": "", - "Scottish Gaelic": "", - "Serbian": "", - "Shona": "", - "Sindhi": "", - "Sinhala": "", - "Slovak": "", - "Slovenian": "", - "Somali": "", - "Southern Sotho": "", - "Spanish": "", - "Spanish (Latin America)": "", - "Sundanese": "", - "Swahili": "", - "Swedish": "", - "Tajik": "", - "Tamil": "", - "Telugu": "", - "Thai": "", - "Turkish": "", - "Ukrainian": "", - "Urdu": "", - "Uzbek": "", - "Vietnamese": "", - "Welsh": "", - "Western Frisian": "", - "Xhosa": "", - "Yiddish": "", - "Yoruba": "", - "Zulu": "", - "`x` years": "`x` лет", - "`x` months": "`x` месяцев", - "`x` weeks": "`x` недель", - "`x` days": "`x` дней", - "`x` hours": "`x` часов", - "`x` minutes": "`x` минут", - "`x` seconds": "`x` секунд", - "Fallback comments: ": "Резервные комментарии: ", - "Popular": "Популярное", - "Top": "Топ", - "About": "О сайте", - "Rating: ": "Рейтинг: ", - "Language: ": "Язык: ", - "Default": "", - "Music": "", - "Gaming": "", - "News": "", - "Movies": "", - "Download": "", - "Download as: ": "" + "`x` subscribers": "`x` подписчиков", + "`x` videos": "`x` видео", + "LIVE": "ПРЯМОЙ ЭФИР", + "Shared `x` ago": "Опубликовано `x` назад", + "Unsubscribe": "Отписаться", + "Subscribe": "Подписаться", + "Login to subscribe to `x`": "Войти, чтобы подписаться на `x`", + "View channel on YouTube": "Канал на YouTube", + "newest": "новые", + "oldest": "старые", + "popular": "популярные", + "Preview page": "Предварительный просмотр", + "Next page": "Следующая страница", + "Clear watch history?": "Очистить историю просмотров?", + "Yes": "Да", + "No": "Нет", + "Import and Export Data": "Импорт и экспорт данных", + "Import": "Импорт", + "Import Invidious data": "Импортировать данные Invidious", + "Import YouTube subscriptions": "Импортировать YouTube подписки", + "Import FreeTube subscriptions (.db)": "Импортировать FreeTube подписки (.db)", + "Import NewPipe subscriptions (.json)": "Импортировать NewPipe подписки (.json)", + "Import NewPipe data (.zip)": "Импортировать данные NewPipe (.zip)", + "Export": "Экспорт", + "Export subscriptions as OPML": "Экспортировать подписки в OPML", + "Export subscriptions as OPML (for NewPipe & FreeTube)": "Экспортировать подписки в OPML (для NewPipe и FreeTube)", + "Export data as JSON": "Экспортировать данные в JSON", + "Delete account?": "Удалить аккаунт?", + "History": "История", + "Previous page": "Предыдущая страница", + "An alternative front-end to YouTube": "Альтернативный фронтенд для YouTube", + "JavaScript license information": "Лицензии JavaScript", + "source": "источник", + "Login": "Войти", + "Login/Register": "Войти/Регистрация", + "Login to Google": "Войти через Google", + "User ID:": "ID пользователя:", + "Password:": "Пароль:", + "Time (h:mm:ss):": "Время (ч:мм:сс):", + "Text CAPTCHA": "Текст капчи", + "Image CAPTCHA": "Изображение капчи", + "Sign In": "Войти", + "Register": "Регистрация", + "Email:": "Эл. почта:", + "Google verification code:": "Код подтверждения Google:", + "Preferences": "Настройки", + "Player preferences": "Настройки проигрывателя", + "Always loop: ": "Всегда повторять: ", + "Autoplay: ": "Автовоспроизведение: ", + "Autoplay next video: ": "Автовоспроизведение следующего видео: ", + "Listen by default: ": "Режим \"только аудио\" по-умолчанию: ", + "Default speed: ": "Скорость по-умолчанию: ", + "Preferred video quality: ": "Предпочтительное качество видео: ", + "Player volume: ": "Громкость воспроизведения: ", + "Default comments: ": "Источник комментариев: ", + "youtube": "YouTube", + "reddit": "Reddit", + "Default captions: ": "Субтитры по-умолчанию: ", + "Fallback captions: ": "Резервные субтитры: ", + "Show related videos? ": "Показывать похожие видео? ", + "Visual preferences": "Визуальные настройки", + "Dark mode: ": "Темная тема: ", + "Thin mode: ": "Облегченный режим: ", + "Subscription preferences": "Настройки подписок", + "Redirect homepage to feed: ": "Отображать ленту вместо главной страницы: ", + "Number of videos shown in feed: ": "Число видео в ленте: ", + "Sort videos by: ": "Сортировать видео по: ", + "published": "дате публикации", + "published - reverse": "дате - обратный порядок", + "alphabetically": "алфавиту", + "alphabetically - reverse": "алфавиту - обратный порядок", + "channel name": "имени канала", + "channel name - reverse": "имени канала - обратный порядок", + "Only show latest video from channel: ": "Отображать только последние видео с каждого канала: ", + "Only show latest unwatched video from channel: ": "Отображать только непросмотренные видео с каждого канала: ", + "Only show unwatched: ": "Отображать только непросмотренные видео: ", + "Only show notifications (if there are any): ": "Отображать только оповещения (если есть): ", + "Data preferences": "Настройки данных", + "Clear watch history": "Очистить историю просмотра", + "Import/Export data": "Импорт/Экспорт данных", + "Manage subscriptions": "Управление подписками", + "Watch history": "История просмотров", + "Delete account": "Удалить аккаунт", + "Save preferences": "Сохранить настройки", + "Subscription manager": "Менеджер подписок", + "`x` subscriptions": "`x` подписок", + "Import/Export": "Импорт/Экспорт", + "unsubscribe": "отписаться", + "Subscriptions": "Подписки", + "`x` unseen notifications": "`x` новых оповещений", + "search": "поиск", + "Sign out": "Выйти", + "Released under the AGPLv3 by Omar Roth.": "Распространяется Omar Roth по AGPLv3.", + "Source available here.": "Исходный код доступен здесь.", + "Liberapay: ": "Liberapay: ", + "Patreon: ": "Patreon: ", + "BTC: ": "BTC: ", + "BCH: ": "BCH: ", + "View JavaScript license information.": "Посмотреть лицензии JavaScript кода.", + "Trending": "В тренде", + "Watch video on Youtube": "Смотреть на YouTube", + "Genre: ": "Жанр: ", + "License: ": "Лицензия: ", + "Family friendly? ": "Семейный просмотр: ", + "Wilson score: ": "Рейтинг Вильсона: ", + "Engagement: ": "Вовлеченность: ", + "Whitelisted regions: ": "Доступно для: ", + "Blacklisted regions: ": "Недоступно для: ", + "Shared `x`": "Опубликовано `x`", + "Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.": "Похоже, что у Вас отключен JavaScript. Нажмите сюда, чтобы увидеть комментарии (учтите, что они могут загружаться дольше).", + "View YouTube comments": "Смотреть комментарии с YouTube", + "View more comments on Reddit": "Больше комментариев на Reddit", + "View `x` comments": "Показать `x` комментариев", + "View Reddit comments": "Смотреть комментарии с Reddit", + "Hide replies": "Скрыть ответы", + "Show replies": "Показать ответы", + "Incorrect password": "Неправильный пароль", + "Quota exceeded, try again in a few hours": "Превышена квота, попробуйте снова через несколько часов", + "Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled.": "Вход не выполнен, проверьте, не включена ли двухфакторная аутентификация.", + "Invalid TFA code": "Неправильный TFA код", + "Login failed. This may be because two-factor authentication is not enabled on your account.": "Не удалось войти. Это может быть из-за того, что в вашем аккаунте не включена двухфакторная аутентификация.", + "Invalid answer": "Неверный ответ", + "Invalid CAPTCHA": "Неверная капча", + "CAPTCHA is a required field": "Необходимо ввести капчу", + "User ID is a required field": "Необходимо ввести идентификатор пользователя", + "Password is a required field": "Необходимо ввести пароль", + "Invalid username or password": "Недопустимый пароль или имя пользователя", + "Please sign in using 'Sign in with Google'": "Пожалуйста войдите через Google", + "Password cannot be empty": "Пароль не может быть пустым", + "Password cannot be longer than 55 characters": "Пароль не может быть длиннее 55 символов", + "Please sign in": "Пожалуйста, войдите", + "Invidious Private Feed for `x`": "Приватная лента Invidious для `x`", + "channel:`x`": "канал: `x`", + "Deleted or invalid channel": "Канал удален или не найден", + "This channel does not exist.": "Такой канал не существует.", + "Could not get channel info.": "Невозможно получить информацию о канале.", + "Could not fetch comments": "Невозможно получить комментарии", + "View `x` replies": "Показать `x` ответов", + "`x` ago": "`x` назад", + "Load more": "Загрузить больше", + "`x` points": "`x` очков", + "Could not create mix.": "Невозможно создать \"микс\".", + "Playlist is empty": "Плейлист пуст", + "Invalid playlist.": "Некорректный плейлист.", + "Playlist does not exist.": "Плейлист не существует.", + "Could not pull trending pages.": "Невозможно получить страницы \"в тренде\".", + "Hidden field \"challenge\" is a required field": "Необходимо заполнить скрытое поле \"challenge\"", + "Hidden field \"token\" is a required field": "Необходимо заполнить скрытое поле \"токен\"", + "Invalid challenge": "Неправильный ответ в \"challenge\"", + "Invalid token": "Неправильный токен", + "Invalid user": "Недопустимое имя пользователя", + "Token is expired, please try again": "Срок действия токена истек, попробуйте позже", + "English": "Английский", + "English (auto-generated)": "Английский (созданы автоматически)", + "Afrikaans": "Африкаанс", + "Albanian": "Албанский", + "Amharic": "Амхарский", + "Arabic": "Арабский", + "Armenian": "Армянский", + "Azerbaijani": "Азербайджанский", + "Bangla": "", + "Basque": "", + "Belarusian": "", + "Bosnian": "", + "Bulgarian": "", + "Burmese": "", + "Catalan": "", + "Cebuano": "", + "Chinese (Simplified)": "", + "Chinese (Traditional)": "", + "Corsican": "", + "Croatian": "", + "Czech": "", + "Danish": "", + "Dutch": "", + "Esperanto": "", + "Estonian": "", + "Filipino": "", + "Finnish": "", + "French": "", + "Galician": "", + "Georgian": "", + "German": "", + "Greek": "", + "Gujarati": "", + "Haitian Creole": "", + "Hausa": "", + "Hawaiian": "", + "Hebrew": "", + "Hindi": "", + "Hmong": "", + "Hungarian": "", + "Icelandic": "", + "Igbo": "", + "Indonesian": "", + "Irish": "", + "Italian": "", + "Japanese": "", + "Javanese": "", + "Kannada": "", + "Kazakh": "", + "Khmer": "", + "Korean": "", + "Kurdish": "", + "Kyrgyz": "", + "Lao": "", + "Latin": "", + "Latvian": "", + "Lithuanian": "", + "Luxembourgish": "", + "Macedonian": "", + "Malagasy": "", + "Malay": "", + "Malayalam": "", + "Maltese": "", + "Maori": "", + "Marathi": "", + "Mongolian": "", + "Nepali": "", + "Norwegian": "", + "Nyanja": "", + "Pashto": "", + "Persian": "", + "Polish": "", + "Portuguese": "", + "Punjabi": "", + "Romanian": "", + "Russian": "", + "Samoan": "", + "Scottish Gaelic": "", + "Serbian": "", + "Shona": "", + "Sindhi": "", + "Sinhala": "", + "Slovak": "", + "Slovenian": "", + "Somali": "", + "Southern Sotho": "", + "Spanish": "", + "Spanish (Latin America)": "", + "Sundanese": "", + "Swahili": "", + "Swedish": "", + "Tajik": "", + "Tamil": "", + "Telugu": "", + "Thai": "", + "Turkish": "", + "Ukrainian": "", + "Urdu": "", + "Uzbek": "", + "Vietnamese": "", + "Welsh": "", + "Western Frisian": "", + "Xhosa": "", + "Yiddish": "", + "Yoruba": "", + "Zulu": "Зулусский", + "`x` years": "`x` лет", + "`x` months": "`x` месяцев", + "`x` weeks": "`x` недель", + "`x` days": "`x` дней", + "`x` hours": "`x` часов", + "`x` minutes": "`x` минут", + "`x` seconds": "`x` секунд", + "Fallback comments: ": "Резервные комментарии: ", + "Popular": "Популярное", + "Top": "Топ", + "About": "О сайте", + "Rating: ": "Рейтинг: ", + "Language: ": "Язык: ", + "Default": "По-умолчанию", + "Music": "Музыка", + "Gaming": "Игры", + "News": "Новости", + "Movies": "Фильмы", + "Download": "Скачать", + "Download as: ": "Скачать как: " } From d5c9b7dfe8055e939c555c32d106f02c7f983120 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Thu, 31 Jan 2019 20:25:58 -0600 Subject: [PATCH 10/10] Only play after error if already playing --- src/invidious/views/components/player.ecr | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/invidious/views/components/player.ecr b/src/invidious/views/components/player.ecr index 9efe04fc..7f932ef4 100644 --- a/src/invidious/views/components/player.ecr +++ b/src/invidious/views/components/player.ecr @@ -121,13 +121,18 @@ player.on('error', function(event) { var currentTime = player.currentTime(); var playbackRate = player.playbackRate(); + var paused = player.paused() + player.load(); if (currentTime > 0.5) { currentTime -= 0.5; } player.currentTime(currentTime); player.playbackRate(playbackRate); - player.play(); + + if (!paused) { + player.play(); + } }, 5000), 5000); } });