From d57d278f32e94d2bec75ffbc3c7bf28e6cb7638d Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Thu, 9 Feb 2023 15:00:23 -0500 Subject: [PATCH 01/23] Make itag optional under /latest_version --- src/invidious/routes/video_playback.cr | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/invidious/routes/video_playback.cr b/src/invidious/routes/video_playback.cr index 1e932d11..f24c0ded 100644 --- a/src/invidious/routes/video_playback.cr +++ b/src/invidious/routes/video_playback.cr @@ -256,7 +256,7 @@ module Invidious::Routes::VideoPlayback return error_template(400, "Invalid video ID") end - if itag.nil? || itag <= 0 || itag >= 1000 + if !itag.nil? && (itag <= 0 || itag >= 1000) return error_template(400, "Invalid itag") end @@ -277,7 +277,11 @@ module Invidious::Routes::VideoPlayback return error_template(500, ex) end - fmt = video.fmt_stream.find(nil) { |f| f["itag"].as_i == itag } || video.adaptive_fmts.find(nil) { |f| f["itag"].as_i == itag } + if itag.nil? + fmt = video.fmt_stream[-1] + else + fmt = video.fmt_stream.find(nil) { |f| f["itag"].as_i == itag } || video.adaptive_fmts.find(nil) { |f| f["itag"].as_i == itag } + end url = fmt.try &.["url"]?.try &.as_s if !url From 8eca5b270ed10b6233371f5495cf059bc353dcb1 Mon Sep 17 00:00:00 2001 From: techmetx11 Date: Sat, 14 Jan 2023 01:49:58 +0100 Subject: [PATCH 02/23] Video: Fix 0 views, and empty license field --- locales/en-US.json | 1 + src/invidious/videos/parser.cr | 2 +- src/invidious/views/watch.ecr | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/locales/en-US.json b/locales/en-US.json index a5c16fd7..fbcc1341 100644 --- a/locales/en-US.json +++ b/locales/en-US.json @@ -183,6 +183,7 @@ "Show annotations": "Show annotations", "Genre: ": "Genre: ", "License: ": "License: ", + "Standard YouTube license": "Standard YouTube license", "Family friendly? ": "Family friendly? ", "Wilson score: ": "Wilson score: ", "Engagement: ": "Engagement: ", diff --git a/src/invidious/videos/parser.cr b/src/invidious/videos/parser.cr index cf43f1be..04ee7303 100644 --- a/src/invidious/videos/parser.cr +++ b/src/invidious/videos/parser.cr @@ -186,7 +186,7 @@ def parse_video_info(video_id : String, player_response : Hash(String, JSON::Any # then from videoDetails, as the latter is "0" for livestreams (we want # to get the amount of viewers watching). views_txt = video_primary_renderer - .try &.dig?("viewCount", "videoViewCountRenderer", "viewCount", "runs", 0, "text") + .try &.dig?("viewCount", "videoViewCountRenderer", "viewCount", "simpleText") views_txt ||= video_details["viewCount"]? views = views_txt.try &.as_s.gsub(/\D/, "").to_i64? diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr index 666eb3b0..c23a9552 100644 --- a/src/invidious/views/watch.ecr +++ b/src/invidious/views/watch.ecr @@ -181,7 +181,11 @@ we're going to need to do it here in order to allow for translations. <% end %>

<% if video.license %> -

<%= translate(locale, "License: ") %><%= video.license %>

+ <% if video.license == "" %> +

<%= translate(locale, "License: ") %><%= translate(locale, "Standard YouTube license") %>

+ <% else %> +

<%= translate(locale, "License: ") %><%= video.license %>

+ <% end %> <% end %>

<%= translate(locale, "Family friendly? ") %><%= translate_bool(locale, video.is_family_friendly) %>

From 4ac263f1dfdc18e5de584d4fb8bbfd74141e2716 Mon Sep 17 00:00:00 2001 From: techmetx11 Date: Sun, 15 Jan 2023 16:26:51 +0100 Subject: [PATCH 03/23] Replace == with empty? --- src/invidious/views/watch.ecr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr index c23a9552..1fc79495 100644 --- a/src/invidious/views/watch.ecr +++ b/src/invidious/views/watch.ecr @@ -181,7 +181,7 @@ we're going to need to do it here in order to allow for translations. <% end %>

<% if video.license %> - <% if video.license == "" %> + <% if video.license.empty? %>

<%= translate(locale, "License: ") %><%= translate(locale, "Standard YouTube license") %>

<% else %>

<%= translate(locale, "License: ") %><%= video.license %>

From 3848c3f53f230e971eb67b1317f2cd4ad1b76176 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Sun, 12 Mar 2023 18:36:03 -0400 Subject: [PATCH 04/23] Update src/invidious/routes/video_playback.cr Co-authored-by: Samantaz Fox --- src/invidious/routes/video_playback.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious/routes/video_playback.cr b/src/invidious/routes/video_playback.cr index f24c0ded..9641e01a 100644 --- a/src/invidious/routes/video_playback.cr +++ b/src/invidious/routes/video_playback.cr @@ -278,7 +278,7 @@ module Invidious::Routes::VideoPlayback end if itag.nil? - fmt = video.fmt_stream[-1] + fmt = video.fmt_stream[-1]? else fmt = video.fmt_stream.find(nil) { |f| f["itag"].as_i == itag } || video.adaptive_fmts.find(nil) { |f| f["itag"].as_i == itag } end From 712aea0831cff6a071b303ac3cc25a3559147917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane?= Date: Wed, 15 Mar 2023 19:11:17 +0100 Subject: [PATCH 05/23] chore: update HoloPlay app on README (#3690) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index abf57e38..602ad2e2 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,7 @@ Weblate also allows you to log-in with major SSO providers like Github, Gitlab, - [CloudTube](https://sr.ht/~cadence/tube/): A JavaScript-rich alternate YouTube player. - [PeerTubeify](https://gitlab.com/Cha_de_L/peertubeify): On YouTube, displays a link to the same video on PeerTube, if it exists. - [MusicPiped](https://github.com/deep-gaurav/MusicPiped): A material design music player that streams music from YouTube. -- [HoloPlay](https://github.com/stephane-r/HoloPlay): Funny Android application connecting on Invidious API's with search, playlists and favorites. +- [HoloPlay](https://github.com/stephane-r/holoplay-wa): Progressive Web App connecting on Invidious API's with search, playlists and favorites. - [WatchTube](https://github.com/WatchTubeTeam/WatchTube): Powerful YouTube client for Apple Watch. - [Yattee](https://github.com/yattee/yattee): Alternative YouTube frontend for iPhone, iPad, Mac and Apple TV. - [TubiTui](https://codeberg.org/777/TubiTui): A lightweight, libre, TUI-based YouTube client. From b66a5c40a97de2816f43b7b6c816f20252eb4cbc Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Wed, 15 Mar 2023 22:37:07 +0100 Subject: [PATCH 06/23] Community: Restore thumbnail qualities array --- src/invidious/channels/community.cr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/invidious/channels/community.cr b/src/invidious/channels/community.cr index da8be6ea..ce34ff82 100644 --- a/src/invidious/channels/community.cr +++ b/src/invidious/channels/community.cr @@ -77,9 +77,10 @@ def fetch_channel_community(ucid, continuation, locale, format, thin_mode) json.field "author", author json.field "authorThumbnails" do json.array do + qualities = {32, 48, 76, 100, 176, 512} author_thumbnail = post["authorThumbnail"]["thumbnails"].as_a[0]["url"].as_s - IMAGE_QUALITIES.each do |quality| + qualities.each do |quality| json.object do json.field "url", author_thumbnail.gsub(/s\d+-/, "s#{quality}-") json.field "width", quality From e1a25a184aba09720e29def0b084388088f5c56d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20B=C4=85czek?= Date: Sun, 19 Mar 2023 20:03:15 +0100 Subject: [PATCH 07/23] Add the docs/ folder to gitignore (#3694) --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 1779a73d..7a26e1a6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -/doc/ +/docs/ /dev/ /lib/ /bin/ From a0bdcc29648e6ee886c52c8503885f5860afcb0a Mon Sep 17 00:00:00 2001 From: Matthaiks Date: Wed, 15 Mar 2023 14:28:22 +0000 Subject: [PATCH 08/23] Update Polish translation --- locales/pl.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/locales/pl.json b/locales/pl.json index 2dd3ed87..3ca78e43 100644 --- a/locales/pl.json +++ b/locales/pl.json @@ -495,5 +495,7 @@ "channel_tab_shorts_label": "Shorts", "Music in this video": "Muzyka w tym filmie", "Artist: ": "Wykonawca: ", - "Album: ": "Album: " + "Album: ": "Album: ", + "Song: ": "Piosenka: ", + "Channel Sponsor": "Sponsor kanału" } From aad166c96a2ebfd4d4426c8b80d981e422149246 Mon Sep 17 00:00:00 2001 From: Rex_sa Date: Wed, 15 Mar 2023 17:04:57 +0000 Subject: [PATCH 09/23] Update Arabic translation --- locales/ar.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/locales/ar.json b/locales/ar.json index 181ff933..3ce34c2d 100644 --- a/locales/ar.json +++ b/locales/ar.json @@ -543,5 +543,7 @@ "channel_tab_channels_label": "القنوات", "Music in this video": "الموسيقى في هذا الفيديو", "Album: ": "الألبوم: ", - "Artist: ": "الفنان: " + "Artist: ": "الفنان: ", + "Song: ": "أغنية: ", + "Channel Sponsor": "راعي القناة" } From 60e3f8aec0424a834e4931dbaa3656a7db893d5d Mon Sep 17 00:00:00 2001 From: gallegonovato Date: Wed, 15 Mar 2023 10:55:03 +0000 Subject: [PATCH 10/23] Update Spanish translation --- locales/es.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/locales/es.json b/locales/es.json index a0d16325..bb082c06 100644 --- a/locales/es.json +++ b/locales/es.json @@ -414,8 +414,9 @@ "generic_count_weeks_plural": "{{count}} semanas", "generic_playlists_count": "{{count}} lista de reproducción", "generic_playlists_count_plural": "{{count}} listas de reproducción", - "generic_videos_count": "{{count}} video", - "generic_videos_count_plural": "{{count}} videos", + "generic_videos_count_0": "{{count}} video", + "generic_videos_count_1": "{{count}} videos", + "generic_videos_count_2": "{{count}} videos", "generic_count_months": "{{count}} mes", "generic_count_months_plural": "{{count}} meses", "comments_points_count": "{{count}} punto", @@ -479,5 +480,7 @@ "channel_tab_playlists_label": "Listas de reproducción", "Music in this video": "Música en este video", "Artist: ": "Artista: ", - "Album: ": "Álbum: " + "Album: ": "Álbum: ", + "Song: ": "Canción: ", + "Channel Sponsor": "Patrocinador del canal" } From 72656e802e7227085bbe101ad9ccf79e3c52d389 Mon Sep 17 00:00:00 2001 From: Ihor Hordiichuk Date: Fri, 17 Mar 2023 19:18:25 +0000 Subject: [PATCH 11/23] Update Ukrainian translation --- locales/uk.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/locales/uk.json b/locales/uk.json index b44d237f..4d748e7f 100644 --- a/locales/uk.json +++ b/locales/uk.json @@ -495,5 +495,7 @@ "channel_tab_channels_label": "Канали", "Music in this video": "Музика в цьому відео", "Artist: ": "Виконавець: ", - "Album: ": "Альбом: " + "Album: ": "Альбом: ", + "Song: ": "Пісня: ", + "Channel Sponsor": "Спонсор каналу" } From 46a7be89a738e1c4e8ac110260f0a150ea81b59e Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 16 Mar 2023 03:21:43 +0000 Subject: [PATCH 12/23] Update Chinese (Simplified) translation --- locales/zh-CN.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/locales/zh-CN.json b/locales/zh-CN.json index aff6dd3e..f202cf88 100644 --- a/locales/zh-CN.json +++ b/locales/zh-CN.json @@ -463,5 +463,7 @@ "channel_tab_streams_label": "直播", "Album: ": "专辑: ", "channel_tab_shorts_label": "短视频", - "channel_tab_channels_label": "频道" + "channel_tab_channels_label": "频道", + "Song: ": "歌曲: ", + "Channel Sponsor": "频道赞助者" } From dd6c9dbc65b6e5c0169f9e8acbb3b2e09ea3948c Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Thu, 16 Mar 2023 02:25:12 +0000 Subject: [PATCH 13/23] Update Chinese (Traditional) translation --- locales/zh-TW.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/locales/zh-TW.json b/locales/zh-TW.json index 8aa9869a..54090d3d 100644 --- a/locales/zh-TW.json +++ b/locales/zh-TW.json @@ -463,5 +463,7 @@ "channel_tab_streams_label": "直播", "Artist: ": "藝術家: ", "Album: ": "專輯: ", - "Music in this video": "此影片中的音樂" + "Music in this video": "此影片中的音樂", + "Channel Sponsor": "頻道贊助者", + "Song: ": "歌曲: " } From ded28b80d33332022f299a12ea1aa49d89e0e388 Mon Sep 17 00:00:00 2001 From: maboroshin Date: Fri, 17 Mar 2023 06:45:19 +0000 Subject: [PATCH 14/23] Update Japanese translation --- locales/ja.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/locales/ja.json b/locales/ja.json index 4d2ed5a0..8a4537d4 100644 --- a/locales/ja.json +++ b/locales/ja.json @@ -445,7 +445,7 @@ "search_message_use_another_instance": " 別のインスタンス上でも検索できます。", "search_filters_apply_button": "選択したフィルターを適用", "user_saved_playlists": "`x` 個の保存した再生リスト", - "crash_page_you_found_a_bug": "Invidious でバグを見つけたようです。", + "crash_page_you_found_a_bug": "Invidious のバグのようです!", "crash_page_refresh": "ページを更新を試す", "preferences_watch_history_label": "再生履歴を有効化 ", "search_filters_date_option_none": "すべて", @@ -463,5 +463,7 @@ "channel_tab_channels_label": "チャンネル", "Music in this video": "この動画の音楽", "Artist: ": "アーティスト: ", - "Album: ": "アルバム: " + "Album: ": "アルバム: ", + "Song: ": "曲: ", + "Channel Sponsor": "チャンネルのスポンサー" } From defec2e8fb2b530812b93edac37cb71517b2ca37 Mon Sep 17 00:00:00 2001 From: HamidReza Shareghzade Date: Fri, 17 Mar 2023 08:19:30 +0000 Subject: [PATCH 15/23] Update Persian translation --- locales/fa.json | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/locales/fa.json b/locales/fa.json index fe72a1e8..56685f64 100644 --- a/locales/fa.json +++ b/locales/fa.json @@ -26,15 +26,15 @@ "No": "خیر", "Import and Export Data": "درون‌برد و برون‌برد داده", "Import": "درون‌برد", - "Import Invidious data": "درون‌برد داده اینویدیوس", - "Import YouTube subscriptions": "درون‌برد اشتراک‌های یوتیوب", + "Import Invidious data": "وارد کردن داده JSON اینویدیوس", + "Import YouTube subscriptions": "وارد کردن اشتراک OPML/ یوتیوب", "Import FreeTube subscriptions (.db)": "درون‌برد اشتراک‌های فری‌تیوب (.db)", "Import NewPipe subscriptions (.json)": "درون‌برد اشتراک‌های نیوپایپ (.json)", "Import NewPipe data (.zip)": "درون‌برد داده نیوپایپ (.zip)", "Export": "برون‌برد", "Export subscriptions as OPML": "برون‌برد اشتراک‌ها در قالب OPML", "Export subscriptions as OPML (for NewPipe & FreeTube)": "برون‌برد اشتراک‌ها در قالب OPML (برای نیوپایپ و فری‌تیوب)", - "Export data as JSON": "برون‌برد داده در قالب JSON", + "Export data as JSON": "گرفتن(خارج کردن) اطلاعات اینویدیوس با فرمت JSON", "Delete account?": "حذف حساب کاربری؟", "History": "تاریخچه", "An alternative front-end to YouTube": "یک پیشانه جایگزین برای یوتیوب", @@ -71,7 +71,7 @@ "preferences_related_videos_label": "نمایش ویدیو های مرتبط: ", "preferences_annotations_label": "نمایش حاشیه نویسی ها به طور پیشفرض: ", "preferences_extend_desc_label": "گسترش خودکار توضیحات ویدئو: ", - "preferences_vr_mode_label": "ویدئوها ۳۶۰ درجه تعاملی: ", + "preferences_vr_mode_label": "ویدئوها ۳۶۰ درجه تعاملی(نیازمند WebGL): ", "preferences_category_visual": "ترجیحات بصری", "preferences_player_style_label": "حالت پخش کننده: ", "Dark mode: ": "حالت تاریک: ", @@ -80,7 +80,7 @@ "light": "روشن", "preferences_thin_mode_label": "حالت نازک: ", "preferences_category_misc": "ترجیحات متفرقه", - "preferences_automatic_instance_redirect_label": "هدایت خودکار نمونه (به طور پیش‌فرض به redirect.invidious.io): ", + "preferences_automatic_instance_redirect_label": "هدایت خودکار نمونه (انتقال به redirect.invidious.io): ", "preferences_category_subscription": "ترجیحات اشتراک", "preferences_annotations_subscribed_label": "نمایش حاشیه نویسی ها به طور پیشفرض برای کانال های مشترک شده: ", "Redirect homepage to feed: ": "تغییر مسیر صفحه خانه به خوراک: ", @@ -157,7 +157,7 @@ "Engagement: ": "نامزدی: ", "Whitelisted regions: ": "مناطق لیست سفید: ", "Blacklisted regions: ": "مناطق لیست سیاه: ", - "Shared `x`": "به اشتراک گذاشته شده `x`", + "Shared `x`": "`x` به اشتراک گذاشته شد", "Premieres in `x`": "برای اولین بار در `x`", "Premieres `x`": "برای اولین بار `x`", "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "سلام! مثل اینکه تو جاوا اسکریپت رو خاموش کرده ای. اینجا کلیک کن تا نظرات را ببینی، این رو یادت باشه که ممکنه بارگذاری اونها کمی طول بکشه.", @@ -375,7 +375,7 @@ "next_steps_error_message_refresh": "تازه‌سازی", "next_steps_error_message_go_to_youtube": "رفتن به یوتیوب", "preferences_quality_option_hd720": "HD720", - "preferences_quality_option_dash": "DASH (کیفیت قابل تطبیق)", + "preferences_quality_option_dash": "DASH (کیفیت تطبیفی)", "preferences_quality_option_medium": "میانه", "preferences_quality_option_small": "پایین", "preferences_quality_dash_option_auto": "خودکار", @@ -445,5 +445,10 @@ "Spanish (Spain)": "اسپانیایی (اسپانیا)", "Turkish (auto-generated)": "ترکی (تولید خودکار)", "search_filters_features_option_vr180": "VR180", - "Spanish (Mexico)": "اسپانیایی (مکزیک)" + "Spanish (Mexico)": "اسپانیایی (مکزیک)", + "Popular enabled: ": "محبوب ها فعال شد: ", + "Music in this video": "آهنگ در این ویدیو", + "Artist: ": "هنرمند: ", + "Album: ": "آلبوم: ", + "Song: ": "آهنگ: " } From c1e45cb84a8d117167bf5bd55e92d9e8a4954845 Mon Sep 17 00:00:00 2001 From: Milo Ivir Date: Wed, 15 Mar 2023 18:54:28 +0000 Subject: [PATCH 16/23] Update Croatian translation --- locales/hr.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/locales/hr.json b/locales/hr.json index c626ed28..ade732ad 100644 --- a/locales/hr.json +++ b/locales/hr.json @@ -495,5 +495,7 @@ "channel_tab_shorts_label": "Kratka videa", "Music in this video": "Glazba u ovom videu", "Album: ": "Album: ", - "Artist: ": "Izvođač: " + "Artist: ": "Izvođač: ", + "Channel Sponsor": "Sponzor kanala", + "Song: ": "Pjesma: " } From ce1f61d185dfd817e14e45de1d6ddc59ca09cecf Mon Sep 17 00:00:00 2001 From: Fjuro Date: Wed, 15 Mar 2023 10:50:53 +0000 Subject: [PATCH 17/23] Update Czech translation --- locales/cs.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/locales/cs.json b/locales/cs.json index 51db1550..4611c4fd 100644 --- a/locales/cs.json +++ b/locales/cs.json @@ -495,5 +495,7 @@ "channel_tab_streams_label": "Živé přenosy", "Music in this video": "Hudba v tomto videu", "Artist: ": "Umělec: ", - "Album: ": "Album: " + "Album: ": "Album: ", + "Channel Sponsor": "Sponzor kanálu", + "Song: ": "Skladba: " } From 3aa6a0c4f089c5bddc77d79ec2f30bb7b55242af Mon Sep 17 00:00:00 2001 From: SC Date: Thu, 16 Mar 2023 11:07:12 +0000 Subject: [PATCH 18/23] Update Portuguese translation --- locales/pt.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/locales/pt.json b/locales/pt.json index b6b6c110..310381ae 100644 --- a/locales/pt.json +++ b/locales/pt.json @@ -479,5 +479,7 @@ "channel_tab_streams_label": "Diretos", "Music in this video": "Música neste vídeo", "Artist: ": "Artista: ", - "Album: ": "Álbum: " + "Album: ": "Álbum: ", + "Song: ": "Canção: ", + "Channel Sponsor": "Patrocinador do canal" } From c188dec4faf65b23b3a6bbe9028cc0ad0aaa55d9 Mon Sep 17 00:00:00 2001 From: victor dargallo Date: Fri, 17 Mar 2023 21:42:57 +0000 Subject: [PATCH 19/23] Update Catalan translation --- locales/ca.json | 380 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 378 insertions(+), 2 deletions(-) diff --git a/locales/ca.json b/locales/ca.json index 2ba6ae39..c957f561 100644 --- a/locales/ca.json +++ b/locales/ca.json @@ -75,7 +75,7 @@ "Title": "Títol", "Belarusian": "Bielorús", "Enable web notifications": "Activa notificacions web", - "search": "busca", + "search": "cerca", "Catalan": "Català", "Croatian": "Croat", "preferences_category_admin": "Preferències d'administrador", @@ -99,5 +99,381 @@ "Music": "Música", "search_filters_sort_option_relevance": "Rellevància", "search_filters_date_option_hour": "Última hora", - "search_filters_date_option_today": "Avui" + "search_filters_date_option_today": "Avui", + "preferences_volume_label": "Volum del reproductor: ", + "invidious": "Invidious", + "preferences_quality_dash_option_144p": "144p", + "Turkish (auto-generated)": "Turc (generat automàticament)", + "Urdu": "Urdú", + "Vietnamese (auto-generated)": "Vietnamita (generat automàticament)", + "Welsh": "Gal·lès", + "Yoruba": "Ioruba", + "YouTube comment permalink": "Enllaç permanent de comentari de YouTube", + "Channel Sponsor": "Patrocinador del canal", + "Audio mode": "Mode d'àudio", + "search_filters_date_option_none": "Qualsevol data", + "search_filters_type_option_playlist": "Llista de reproducció", + "search_filters_type_option_movie": "Pel·lícula", + "search_filters_features_option_four_k": "4K", + "search_filters_features_option_subtitles": "Subtítols/CC", + "search_filters_features_option_live": "Directe", + "search_filters_features_option_hd": "HD", + "search_filters_features_option_hdr": "HDR", + "search_filters_features_option_location": "Ubicació", + "search_filters_apply_button": "Aplica els filtres seleccionats", + "videoinfo_started_streaming_x_ago": "Ha començat el directe fa `x`", + "next_steps_error_message_go_to_youtube": "Anar a YouTube", + "footer_donate_page": "Donar", + "footer_original_source_code": "Codi font original", + "videoinfo_watch_on_youTube": "Veure a YouTube", + "user_saved_playlists": "`x` llistes de reproducció guardades", + "adminprefs_modified_source_code_url_label": "URL al repositori de codi font modificat", + "none": "cap", + "footer_modfied_source_code": "Codi font modificat", + "videoinfo_invidious_embed_link": "Incrusta l'enllaç", + "download_subtitles": "Subtítols - `x` (.vtt)", + "user_created_playlists": "`x`llistes de reproducció creades", + "Video unavailable": "Vídeo no disponible", + "channel_tab_channels_label": "Canals", + "channel_tab_playlists_label": "Llistes de reproducció", + "channel_tab_community_label": "Comunitat", + "Invalid TFA code": "Codi TFA no vàlid", + "Czech": "Txec", + "Default": "Per defecte", + "Amharic": "Amàric", + "preferences_automatic_instance_redirect_label": "Redirecció automàtica d'instàncies (retorna a redirect.invidious.io): ", + "Login enabled: ": "Activa inici de sessió: ", + "Registration enabled: ": "Activa registre: ", + "Whitelisted regions: ": "Regions a la llista blanca: ", + "Chinese (Simplified)": "Xinès (Simplificat)", + "Corsican": "Cors", + "Estonian": "Estonià", + "Japanese (auto-generated)": "Japonès (generat automàticament)", + "English (United States)": "Anglès (Estats Units)", + "English (auto-generated)": "Anglès (generat automàticament)", + "Cebuano": "Cebuà", + "Esperanto": "Esperanto", + "Scottish Gaelic": "Gaèlic escocès", + "Playlists": "Llistes de reproducció", + "search_filters_title": "Filtres", + "search_filters_type_option_all": "Qualsevol tipus", + "search_filters_duration_option_none": "Qualsevol duració", + "next_steps_error_message": "Després d'això, hauríeu d'intentar: ", + "next_steps_error_message_refresh": "Recarregar la pàgina", + "crash_page_refresh": "ha intentat actualitzar la pàgina", + "crash_page_report_issue": "Si cap de les anteriors no ha ajudat, obre un nou issue a GitHub (preferiblement en anglès) i inclou el text següent al missatge (NO tradueixis aquest text):", + "generic_subscriptions_count": "{{count}} subscripció", + "generic_subscriptions_count_plural": "{{count}} subscripcions", + "error_video_not_in_playlist": "El vídeo sol·licitat no existeix en aquesta llista de reproducció. Fes clic aquí per a la pàgina d'inici de la llista de reproducció.", + "comments_points_count": "{{count}} punt", + "comments_points_count_plural": "{{count}} punts", + "%A %B %-d, %Y": "%A %B %-d, %Y", + "Create playlist": "Crear llista de reproducció", + "Text CAPTCHA": "Text CAPTCHA", + "Next page": "Pàgina següent", + "preferences_category_visual": "Preferències visuals", + "preferences_unseen_only_label": "Mostra només no vistos: ", + "preferences_listen_label": "Escolta per defecte: ", + "Import": "Importar", + "Token": "Senyal", + "Wilson score: ": "Puntuació de Wilson: ", + "search_filters_date_label": "Data de càrrega", + "search_filters_features_option_three_sixty": "360°", + "source": "font", + "preferences_default_home_label": "Pàgina d'inici per defecte: ", + "preferences_comments_label": "Comentaris per defecte: ", + "`x` uploaded a video": "`x` ha penjat un vídeo", + "Released under the AGPLv3 on Github.": "Publicat sota l'AGPLv3 a GitHub.", + "Token manager": "Gestor de tokens", + "Watch history": "Historial de reproduccions", + "Cannot change password for Google accounts": "No es pot canviar la contrasenya dels comptes de Google", + "Authorize token?": "Autoritzar senyal?", + "Source available here.": "Font disponible aquí.", + "Export subscriptions as OPML (for NewPipe & FreeTube)": "Exporta subscripcions com a OPML (per a NewPipe i FreeTube)", + "Log in": "Inicia sessió", + "search_filters_sort_option_date": "Data de càrrega", + "Unlisted": "No llistat", + "View privacy policy.": "Veure política de privadesa.", + "Public": "Públic", + "View all playlists": "Veure totes les llistes de reproducció", + "reddit": "Reddit", + "Manage tokens": "Gestiona senyals", + "Not a playlist.": "No és una llista de reproducció.", + "preferences_local_label": "Vídeos de Proxy: ", + "View channel on YouTube": "Veure canal a Youtube", + "preferences_quality_dash_option_1080p": "1080p", + "Top enabled: ": "Activa top: ", + "Delete playlist `x`?": "Eliminar llista de reproducció `x`?", + "View JavaScript license information.": "Consulta la informació de la llicència de JavaScript.", + "Playlist privacy": "Privacitat de la llista de reproducció", + "search_message_no_results": "No s'han trobat resultats.", + "search_message_use_another_instance": " També es pot buscar en una altra instància.", + "Genre: ": "Gènere: ", + "Hidden field \"challenge\" is a required field": "El camp ocult \"repte\" és un camp obligatori", + "Burmese": "Birmà", + "View as playlist": "Mostra com a llista de reproducció", + "preferences_category_subscription": "Preferències de subscripció", + "Music in this video": "Música en aquest vídeo", + "Artist: ": "Artista: ", + "Album: ": "Àlbum: ", + "Shared `x`": "Compartit `x`", + "Premieres `x`": "Estrena `x`", + "View more comments on Reddit": "Veure més comentaris a Reddit", + "View `x` comments": { + "([^.,0-9]|^)1([^.,0-9]|$)": "Veure `x` comentari", + "": "Veure `x` comentaris" + }, + "View Reddit comments": "Veure comentaris de Reddit", + "Incorrect password": "Contrasenya incorrecta", + "Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.": "No es pot iniciar la sessió, assegureu-vos que l'autenticació de dos factors (Autenticador o SMS) estigui activada.", + "Erroneous CAPTCHA": "CAPTCHA erroni", + "CAPTCHA is a required field": "El CAPTCHA és un camp obligatori", + "Korean (auto-generated)": "Coreà (generat automàticament)", + "Kyrgyz": "Kirguís", + "Latin": "Llatí", + "Malagasy": "Malgaix", + "Maori": "Maori", + "Marathi": "Marathi", + "Norwegian Bokmål": "Bokmål Noruec", + "Nyanja": "Nyanja", + "Portuguese (Brazil)": "Portuguès (Brazil)", + "Punjabi": "Panjabi", + "Russian (auto-generated)": "Rus (generat automàticament)", + "Samoan": "Samoà", + "Somali": "Somali", + "Southern Sotho": "Sesotho", + "Spanish (Mexico)": "Espanyol (Mèxic)", + "Spanish (Spain)": "Espanyol (Espanya)", + "Sundanese": "Sondanès", + "Swahili": "Suahili", + "Tamil": "Tàmil", + "Telugu": "Telugu", + "Zulu": "Zulu", + "generic_count_months": "{{count}} mes", + "generic_count_months_plural": "{{count}} mesos", + "generic_count_weeks": "{{count}} setmana", + "generic_count_weeks_plural": "{{count}} setmanes", + "About": "Sobre", + "`x` marked it with a ❤": "`x`marca'l amb un ❤", + "Video mode": "Mode de vídeo", + "search_filters_features_label": "Característiques", + "search_filters_features_option_c_commons": "Creative Commons", + "search_filters_features_option_vr180": "VR180", + "search_filters_features_option_three_d": "3D", + "search_filters_features_option_purchased": "Comprat", + "Chinese (Hong Kong)": "Xinès (Hong Kong)", + "Chinese (Taiwan)": "Xinès (Taiwan)", + "Hmong": "Hmong", + "Kazakh": "Kazakh", + "Igbo": "Igbo", + "Javanese": "Javanès", + "Indonesian (auto-generated)": "Indonesi (generat automàticament)", + "Interlingue": "Interlingüe", + "Khmer": "Khmer", + "This channel does not exist.": "Aquest canal no existeix.", + "Song: ": "Cançó: ", + "Login failed. This may be because two-factor authentication is not turned on for your account.": "Error a l'iniciar sessió. Això pot ser perquè l'autenticació de dos factors no està activada per al vostre compte.", + "channel:`x`": "canal: `x`", + "Deleted or invalid channel": "Canal suprimit o no vàlid", + "Could not get channel info.": "No s'ha pogut obtenir la informació del canal.", + "Could not pull trending pages.": "No s'han pogut extreure les pàgines de tendència.", + "comments_view_x_replies": "Veure {{count}} resposta", + "comments_view_x_replies_plural": "Veure {{count}} respostes", + "Subscriptions": "Subscripcions", + "generic_count_seconds": "{{count}} segon", + "generic_count_seconds_plural": "{{count}} segons", + "channel_tab_shorts_label": "Vídeos curts", + "preferences_save_player_pos_label": "Desa la posició de reproducció: ", + "crash_page_before_reporting": "Abans d'informar d'un error, assegureu-vos que teniu:", + "crash_page_switch_instance": "ha intentat utilitzar una altra instància", + "crash_page_read_the_faq": "heu llegit les Preguntes més freqüents (FAQ)", + "crash_page_search_issue": "ha cercat problemes existents a GitHub", + "User ID is a required field": "L'identificador d'usuari és un camp obligatori", + "Password is a required field": "La contrasenya és un camp obligatori", + "Wrong username or password": "Nom d'usuari o contrasenya incorrectes", + "Please sign in using 'Log in with Google'": "Si us plau, inicieu la sessió amb 'Inicieu sessió amb Google'", + "Password cannot be longer than 55 characters": "La contrasenya no pot tenir més de 55 caràcters", + "Invidious Private Feed for `x`": "Feed privat Invidious per a `x`", + "generic_views_count": "{{count}} visualització", + "generic_views_count_plural": "{{count}} visualitzacions", + "generic_videos_count": "{{count}} vídeo", + "generic_videos_count_plural": "{{count}} vídeos", + "Token is expired, please try again": "La senyal ha caducat, torna-ho a provar", + "English": "Anglès", + "Kannada": "Kanarès", + "Erroneous token": "Senyal errònia", + "`x` ago": "fa `x`", + "Empty playlist": "Llista de reproducció buida", + "Playlist does not exist.": "La llista de reproducció no existeix.", + "No such user": "No hi ha tal usuari", + "Afrikaans": "Afrikàans", + "Azerbaijani": "Azerbaidjana", + "Cantonese (Hong Kong)": "Cantonès (Hong Kong)", + "Chinese": "Xinès", + "Chinese (China)": "Xinès (Xina)", + "Chinese (Traditional)": "Xinès (Tradicional)", + "Dutch": "Holandès", + "Dutch (auto-generated)": "Holandès (generat automàticament)", + "French (auto-generated)": "Francès (generat automàticament)", + "Georgian": "Georgià", + "German (auto-generated)": "Alemany (generat automàticament)", + "Gujarati": "Gujarati", + "Hawaiian": "Hawaià", + "generic_count_years": "{{count}} any", + "generic_count_years_plural": "{{count}} anys", + "Popular": "Popular", + "Rating: ": "Valoració: ", + "permalink": "enllaç permanent", + "preferences_quality_dash_option_worst": "Pitjor", + "Yiddish": "Ídix", + "preferences_quality_dash_option_auto": "Automàtic", + "Western Frisian": "Frisó occidental", + "Swedish": "Suec", + "Only show latest unwatched video from channel: ": "Mostra només l'últim vídeo no vist del canal: ", + "preferences_continue_label": "Reprodueix el següent per defecte: ", + "Import YouTube subscriptions": "Importar subscripcions de YouTube", + "search_filters_sort_option_rating": "Valoració", + "preferences_thin_mode_label": "Mode prim: ", + "preferences_quality_option_small": "Petit", + "CAPTCHA enabled: ": "activa CAPTCHA: ", + "Import and Export Data": "Importar i exportar dades", + "preferences_quality_dash_option_360p": "360p", + "Popular enabled: ": "Activa popular: ", + "Password": "Contrasenya", + "Blacklisted regions: ": "Regions a la llista negra: ", + "Register": "Registra't", + "Shared `x` ago": "Compartit fa `x`", + "search_filters_sort_option_views": "Recompte de visualitzacions", + "Import Invidious data": "Importa dades JSON d'Invidious", + "preferences_related_videos_label": "Mostra vídeos relacionats: ", + "preferences_show_nick_label": "Mostra l'àlies a la part superior: ", + "Time (h:mm:ss):": "Temps (h:mm:ss):", + "Could not fetch comments": "No s'han pogut obtenir els comentaris", + "New password": "Nova contrasenya", + "preferences_notifications_only_label": "Mostra només notificacions (si n'hi ha): ", + "preferences_annotations_label": "Mostra anotacions per defecte: ", + "Import FreeTube subscriptions (.db)": "Importar subscripcions de FreeTube (.db)", + "Fallback captions: ": "Subtítols alternatius: ", + "Log out": "Tancar sessió", + "preferences_quality_dash_option_2160p": "2160p", + "Unsubscribe": "Cancel·la la subscripció", + "Log in/register": "Inicia sessió/registra't", + "Nepali": "Nepalí", + "Xhosa": "Xosa", + "preferences_captions_label": "Subtítols per defecte: ", + "preferences_autoplay_label": "Reproducció automàtica: ", + "`x` is live": "`x` està en directe", + "Uzbek": "Uzbek", + "Hausa": "Haussa", + "Bosnian": "Bosnià", + "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "Hola! Sembla que tens JavaScript desactivat. Feu clic aquí per veure els comentaris, tingueu en compte que poden trigar una mica més a carregar-se.", + "Password cannot be empty": "La contrasenya no pot estar buida", + "preferences_video_loop_label": "Sempre en bucle: ", + "preferences_quality_option_dash": "DASH (qualitat adaptativa)", + "Change password": "Canvia la contrasenya", + "Export data as JSON": "Exporta dades d'Invidious com a JSON", + "Wrong answer": "Resposta incorrecta", + "Clear watch history": "Neteja l'historial de reproduccions", + "Mongolian": "Mongol", + "preferences_quality_dash_option_best": "Millor", + "Authorize token for `x`?": "Autoritzar senyal per a `x`?", + "Report statistics: ": "Estadístiques de l'informe: ", + "Switch Invidious Instance": "Canvia la instància d'Invidious", + "History": "Historial", + "Portuguese (auto-generated)": "Portuguès (generat automàticament)", + "footer_source_code": "Codi font", + "videoinfo_youTube_embed_link": "Insereix", + "generic_count_minutes": "{{count}} minut", + "generic_count_minutes_plural": "{{count}} minuts", + "preferences_category_player": "Preferències del reproductor", + "Sign In": "Inicia Sessió", + "preferences_continue_autoplay_label": "Reprodueix automàticament el següent vídeo: ", + "generic_playlists_count": "{{count}} llista de reproducció", + "generic_playlists_count_plural": "{{count}} llistes de reproducció", + "Delete account?": "Esborrar compte?", + "Please log in": "Si us plau inicieu sessió", + "Import NewPipe data (.zip)": "Importar dades de NewPipe (.zip)", + "Image CAPTCHA": "Imatge CAPTCHA", + "channel_tab_streams_label": "Transmissions en directe", + "preferences_category_misc": "Preferències diverses", + "preferences_annotations_subscribed_label": "Mostra les anotacions per defecte dels canals subscrits? ", + "Tajik": "Tadjik", + "preferences_player_style_label": "Estil del reproductor: ", + "Load more": "Carrega més", + "preferences_vr_mode_label": "Vídeos interactius de 360 graus (requereix WebGL): ", + "Manage subscriptions": "Gestionar les subscripcions", + "preferences_quality_option_medium": "Mitjà", + "Editing playlist `x`": "Editant la llista de reproducció `x`", + "search_filters_duration_option_medium": "Mitjà (4 - 20 minuts)", + "E-mail": "Correu electrònic", + "Spanish (auto-generated)": "Castellà (generat automàticament)", + "Export": "Exportar", + "preferences_quality_dash_option_4320p": "4320p", + "JavaScript license information": "Informació de la llicència de JavaScript", + "Hidden field \"token\" is a required field": "El camp ocult \"senyal\" és un camp obligatori", + "Shona": "Xona", + "Family friendly? ": "Apte per a tots els públics? ", + "preferences_quality_dash_label": "Qualitat de vídeo DASH preferida: ", + "Hindi": "Hindi", + "An alternative front-end to YouTube": "Una interfície alternativa a YouTube", + "Export subscriptions as OPML": "Exporta subscripcions com a OPML", + "Watch on YouTube": "Veure a YouTube", + "Lao": "Laosià", + "search_message_change_filters_or_query": "Proveu d'ampliar la vostra consulta de cerca i/o canviar els filtres.", + "View YouTube comments": "Veure comentaris de YouTube", + "New passwords must match": "Les contrasenyes noves han de coincidir", + "Subscription manager": "Gestor de subscripcions", + "Premieres in `x`": "Estrena en `x`", + "youtube": "YouTube", + "Latvian": "Letó", + "LIVE": "EN VIU", + "Could not create mix.": "No s'ha pogut crear la barreja.", + "preferences_speed_label": "Velocitat per defecte: ", + "preferences_extend_desc_label": "Amplieu automàticament la descripció del vídeo: ", + "popular": "popular", + "Erroneous challenge": "Repte erroni", + "last": "darrer", + "preferences_quality_dash_option_240p": "240p", + "preferences_quality_dash_option_720p": "720p", + "preferences_quality_dash_option_480p": "480p", + "Log in with Google": "Inicia sessió amb Google", + "preferences_quality_dash_option_1440p": "1440p", + "Previous page": "Pàgina anterior", + "Only show latest video from channel: ": "Mostra només l'últim vídeo del canal: ", + "unsubscribe": "cancel·la la subscripció", + "View playlist on YouTube": "Veure llista de reproducció a YouTube", + "Import NewPipe subscriptions (.json)": "Importar subscripcions de NewPipe (.json)", + "crash_page_you_found_a_bug": "Sembla que has trobat un error a Invidious!", + "Subscribe": "Subscriu-me", + "Quota exceeded, try again in a few hours": "S'ha superat la quota, torna-ho a provar d'aquí a unes hores", + "generic_count_days": "{{count}} dia", + "generic_count_days_plural": "{{count}} dies", + "Trending": "Tendència", + "Updated `x` ago": "Actualitzat fa `x`", + "Haitian Creole": "Crioll Haitià", + "preferences_watch_history_label": "Habilita historial de reproduccions: ", + "generic_count_hours": "{{count}} hora", + "generic_count_hours_plural": "{{count}} hores", + "Malayalam": "Maialàiam", + "Clear watch history?": "Neteja historial de reproduccions?", + "Import/export data": "Importa/exporta dades", + "Sinhala": "Singalès", + "Delete playlist": "Eliminar llista de reproducció", + "Bangla": "Bengalí", + "Italian (auto-generated)": "Italià (generat automàticament)", + "License: ": "Llicència: ", + "(edited)": "(editat)", + "Pashto": "Paixtu", + "preferences_dark_mode_label": "Tema: ", + "revoke": "revocar", + "English (United Kingdom)": "Anglès (Regne Unit)", + "preferences_quality_option_hd720": "HD720", + "tokens_count": "{{count}} senyal", + "tokens_count_plural": "{{count}} senyals", + "subscriptions_unseen_notifs_count": "{{count}} notificació no vista", + "subscriptions_unseen_notifs_count_plural": "{{count}} notificacions no vistes", + "generic_subscribers_count": "{{count}} subscriptor", + "generic_subscribers_count_plural": "{{count}} subscriptors", + "Sindhi": "Sindhi", + "Slovenian": "Eslovè" } From 224fbcd2b1109e1719be7a8590dc816ab5f06bf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= Date: Sat, 18 Mar 2023 18:22:51 +0000 Subject: [PATCH 20/23] Update Turkish translation --- locales/tr.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/locales/tr.json b/locales/tr.json index b7cb3958..6e0bc175 100644 --- a/locales/tr.json +++ b/locales/tr.json @@ -479,5 +479,7 @@ "channel_tab_playlists_label": "Oynatma Listeleri", "Album: ": "Albüm: ", "Music in this video": "Bu videodaki müzik", - "Artist: ": "Sanatçı: " + "Artist: ": "Sanatçı: ", + "Channel Sponsor": "Kanal Sponsoru", + "Song: ": "Şarkı: " } From 08cbd44b57b8993e66d9dc93b22e4801f208ad9b Mon Sep 17 00:00:00 2001 From: victor dargallo Date: Sat, 18 Mar 2023 19:59:07 +0000 Subject: [PATCH 21/23] Update Catalan translation --- locales/ca.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/locales/ca.json b/locales/ca.json index c957f561..54a0b177 100644 --- a/locales/ca.json +++ b/locales/ca.json @@ -475,5 +475,11 @@ "generic_subscribers_count": "{{count}} subscriptor", "generic_subscribers_count_plural": "{{count}} subscriptors", "Sindhi": "Sindhi", - "Slovenian": "Eslovè" + "Slovenian": "Eslovè", + "preferences_feed_menu_label": "Menú del feed: ", + "Fallback comments: ": "Comentaris alternatius: ", + "Top": "Millors", + "preferences_max_results_label": "Nombre de vídeos mostrats al feed: ", + "Engagement: ": "Atracció: ", + "Redirect homepage to feed: ": "Redirigeix la pàgina d'inici al feed: " } From 1f3317e257745a7ef4c44fcf8748ec18fe401fb0 Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Mon, 27 Feb 2023 21:55:28 +0100 Subject: [PATCH 22/23] Update video spec --- mocks | 2 +- .../videos/regular_videos_extract_spec.cr | 36 ++--- .../videos/scheduled_live_extract_spec.cr | 148 ++---------------- 3 files changed, 33 insertions(+), 153 deletions(-) diff --git a/mocks b/mocks index dfd53ea6..cb16e034 160000 --- a/mocks +++ b/mocks @@ -1 +1 @@ -Subproject commit dfd53ea6ceb3cbcbbce6004f6ce60b330ad0f9b1 +Subproject commit cb16e0343c8f94182615610bfe3c503db89717a7 diff --git a/spec/invidious/videos/regular_videos_extract_spec.cr b/spec/invidious/videos/regular_videos_extract_spec.cr index 132b37a3..cbe80010 100644 --- a/spec/invidious/videos/regular_videos_extract_spec.cr +++ b/spec/invidious/videos/regular_videos_extract_spec.cr @@ -17,8 +17,8 @@ Spectator.describe "parse_video_info" do # Basic video infos expect(info["title"].as_s).to eq("I Gave My 100,000,000th Subscriber An Island") - expect(info["views"].as_i).to eq(32_846_329) - expect(info["likes"].as_i).to eq(2_611_650) + expect(info["views"].as_i).to eq(115_784_415) + expect(info["likes"].as_i).to eq(4_932_790) # For some reason the video length from VideoDetails and the # one from microformat differs by 1s... @@ -46,14 +46,14 @@ Spectator.describe "parse_video_info" do # Related videos - expect(info["relatedVideos"].as_a.size).to eq(19) + expect(info["relatedVideos"].as_a.size).to eq(20) - expect(info["relatedVideos"][0]["id"]).to eq("tVWWp1PqDus") - expect(info["relatedVideos"][0]["title"]).to eq("100 Girls Vs 100 Boys For $500,000") + expect(info["relatedVideos"][0]["id"]).to eq("iogcY_4xGjo") + expect(info["relatedVideos"][0]["title"]).to eq("$1 vs $1,000,000 Hotel Room!") expect(info["relatedVideos"][0]["author"]).to eq("MrBeast") expect(info["relatedVideos"][0]["ucid"]).to eq("UCX6OQ3DkcsbYNE6H8uQQuVA") - expect(info["relatedVideos"][0]["view_count"]).to eq("49702799") - expect(info["relatedVideos"][0]["short_view_count"]).to eq("49M") + expect(info["relatedVideos"][0]["view_count"]).to eq("172972109") + expect(info["relatedVideos"][0]["short_view_count"]).to eq("172M") expect(info["relatedVideos"][0]["author_verified"]).to eq("true") # Description @@ -76,11 +76,11 @@ Spectator.describe "parse_video_info" do expect(info["ucid"].as_s).to eq("UCX6OQ3DkcsbYNE6H8uQQuVA") expect(info["authorThumbnail"].as_s).to eq( - "https://yt3.ggpht.com/ytc/AMLnZu84dsnlYtuUFBMC8imQs0IUcTKA9khWAmUOgQZltw=s48-c-k-c0x00ffffff-no-rj" + "https://yt3.ggpht.com/ytc/AL5GRJUfhQdJS6n-YJtsAf-ouS2myDavDOq_zXBfebal3Q=s48-c-k-c0x00ffffff-no-rj" ) expect(info["authorVerified"].as_bool).to be_true - expect(info["subCountText"].as_s).to eq("101M") + expect(info["subCountText"].as_s).to eq("135M") end it "parses a regular video with no descrition/comments" do @@ -99,7 +99,7 @@ Spectator.describe "parse_video_info" do # Basic video infos expect(info["title"].as_s).to eq("Chris Rea - Auberge") - expect(info["views"].as_i).to eq(10_356_197) + expect(info["views"].as_i).to eq(10_698_554) expect(info["likes"].as_i).to eq(0) expect(info["lengthSeconds"].as_i).to eq(283_i64) expect(info["published"].as_s).to eq("2012-05-21T00:00:00Z") @@ -132,16 +132,14 @@ Spectator.describe "parse_video_info" do # Related videos - expect(info["relatedVideos"].as_a.size).to eq(19) + expect(info["relatedVideos"].as_a.size).to eq(18) - expect(info["relatedVideos"][0]["id"]).to eq("0bkrY_V0yZg") - expect(info["relatedVideos"][0]["title"]).to eq( - "Chris Rea Best Songs Collection - Chris Rea Greatest Hits Full Album 2022" - ) - expect(info["relatedVideos"][0]["author"]).to eq("Rock Ultimate") - expect(info["relatedVideos"][0]["ucid"]).to eq("UCekSc2A19di9koUIpj8gxlQ") - expect(info["relatedVideos"][0]["view_count"]).to eq("1992412") - expect(info["relatedVideos"][0]["short_view_count"]).to eq("1.9M") + expect(info["relatedVideos"][0]["id"]).to eq("rfyZrJUmzxU") + expect(info["relatedVideos"][0]["title"]).to eq("cheb mami - bekatni") + expect(info["relatedVideos"][0]["author"]).to eq("pelitovic") + expect(info["relatedVideos"][0]["ucid"]).to eq("UCsp6vFyJeGoLxgn-AsHp1tw") + expect(info["relatedVideos"][0]["view_count"]).to eq("13863619") + expect(info["relatedVideos"][0]["short_view_count"]).to eq("13M") expect(info["relatedVideos"][0]["author_verified"]).to eq("false") # Description diff --git a/spec/invidious/videos/scheduled_live_extract_spec.cr b/spec/invidious/videos/scheduled_live_extract_spec.cr index ff5aacd5..9dd22b97 100644 --- a/spec/invidious/videos/scheduled_live_extract_spec.cr +++ b/spec/invidious/videos/scheduled_live_extract_spec.cr @@ -1,114 +1,13 @@ require "../../parsers_helper.cr" Spectator.describe "parse_video_info" do - it "parses scheduled livestreams data (test 1)" do - # Enable mock - _player = load_mock("video/scheduled_live_nintendo.player") - _next = load_mock("video/scheduled_live_nintendo.next") - - raw_data = _player.merge!(_next) - info = parse_video_info("QMGibBzTu0g", raw_data) - - # Some basic verifications - expect(typeof(info)).to eq(Hash(String, JSON::Any)) - - expect(info["videoType"].as_s).to eq("Scheduled") - - # Basic video infos - - expect(info["title"].as_s).to eq("Xenoblade Chronicles 3 Nintendo Direct") - expect(info["views"].as_i).to eq(160) - expect(info["likes"].as_i).to eq(2_283) - expect(info["lengthSeconds"].as_i).to eq(0_i64) - expect(info["published"].as_s).to eq("2022-06-22T14:00:00Z") # Unix 1655906400 - - # Extra video infos - - expect(info["allowedRegions"].as_a).to_not be_empty - expect(info["allowedRegions"].as_a.size).to eq(249) - - expect(info["allowedRegions"].as_a).to contain( - "AD", "BA", "BB", "BW", "BY", "EG", "GG", "HN", "NP", "NR", "TR", - "TT", "TV", "TW", "TZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", - "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW" - ) - - expect(info["keywords"].as_a).to_not be_empty - expect(info["keywords"].as_a.size).to eq(11) - - expect(info["keywords"].as_a).to contain_exactly( - "nintendo", - "game", - "gameplay", - "fun", - "video game", - "action", - "adventure", - "rpg", - "play", - "switch", - "nintendo switch" - ).in_any_order - - expect(info["allowRatings"].as_bool).to be_true - expect(info["isFamilyFriendly"].as_bool).to be_true - expect(info["isListed"].as_bool).to be_true - expect(info["isUpcoming"].as_bool).to be_true - - # Related videos - - expect(info["relatedVideos"].as_a.size).to eq(20) - - # related video #1 - expect(info["relatedVideos"][3]["id"].as_s).to eq("a-SN3lLIUEo") - expect(info["relatedVideos"][3]["author"].as_s).to eq("Nintendo") - expect(info["relatedVideos"][3]["ucid"].as_s).to eq("UCGIY_O-8vW4rfX98KlMkvRg") - expect(info["relatedVideos"][3]["view_count"].as_s).to eq("147796") - expect(info["relatedVideos"][3]["short_view_count"].as_s).to eq("147K") - expect(info["relatedVideos"][3]["author_verified"].as_s).to eq("true") - - # Related video #2 - expect(info["relatedVideos"][16]["id"].as_s).to eq("l_uC1jFK0lo") - expect(info["relatedVideos"][16]["author"].as_s).to eq("Nintendo") - expect(info["relatedVideos"][16]["ucid"].as_s).to eq("UCGIY_O-8vW4rfX98KlMkvRg") - expect(info["relatedVideos"][16]["view_count"].as_s).to eq("53510") - expect(info["relatedVideos"][16]["short_view_count"].as_s).to eq("53K") - expect(info["relatedVideos"][16]["author_verified"].as_s).to eq("true") - - # Description - - description = "Tune in on 6/22 at 7 a.m. PT for a livestreamed Xenoblade Chronicles 3 Direct presentation featuring roughly 20 minutes of information about the upcoming RPG adventure for Nintendo Switch." - - expect(info["description"].as_s).to eq(description) - expect(info["shortDescription"].as_s).to eq(description) - expect(info["descriptionHtml"].as_s).to eq(description) - - # Video metadata - - expect(info["genre"].as_s).to eq("Gaming") - expect(info["genreUcid"].as_s).to be_empty - expect(info["license"].as_s).to be_empty - - # Author infos - - expect(info["author"].as_s).to eq("Nintendo") - expect(info["ucid"].as_s).to eq("UCGIY_O-8vW4rfX98KlMkvRg") - - expect(info["authorThumbnail"].as_s).to eq( - "https://yt3.ggpht.com/ytc/AKedOLTt4vtjREUUNdHlyu9c4gtJjG90M9jQheRlLKy44A=s48-c-k-c0x00ffffff-no-rj" - ) - - expect(info["authorVerified"].as_bool).to be_true - expect(info["subCountText"].as_s).to eq("8.5M") - end - - it "parses scheduled livestreams data (test 2)" do + it "parses scheduled livestreams data" do # Enable mock _player = load_mock("video/scheduled_live_PBD-Podcast.player") _next = load_mock("video/scheduled_live_PBD-Podcast.next") raw_data = _player.merge!(_next) - info = parse_video_info("RG0cjYbXxME", raw_data) + info = parse_video_info("N-yVic7BbY0", raw_data) # Some basic verifications expect(typeof(info)).to eq(Hash(String, JSON::Any)) @@ -117,11 +16,11 @@ Spectator.describe "parse_video_info" do # Basic video infos - expect(info["title"].as_s).to eq("The Truth About Greenpeace w/ Dr. Patrick Moore | PBD Podcast | Ep. 171") - expect(info["views"].as_i).to eq(24) - expect(info["likes"].as_i).to eq(22) + expect(info["title"].as_s).to eq("Home Team | PBD Podcast | Ep. 241") + expect(info["views"].as_i).to eq(6) + expect(info["likes"].as_i).to eq(7) expect(info["lengthSeconds"].as_i).to eq(0_i64) - expect(info["published"].as_s).to eq("2022-07-14T13:00:00Z") # Unix 1657803600 + expect(info["published"].as_s).to eq("2023-02-28T14:00:00Z") # Unix 1677592800 # Extra video infos @@ -173,39 +72,22 @@ Spectator.describe "parse_video_info" do expect(info["relatedVideos"].as_a.size).to eq(20) - # related video #1 - expect(info["relatedVideos"][2]["id"]).to eq("La9oLLoI5Rc") - expect(info["relatedVideos"][2]["author"]).to eq("Tom Bilyeu") - expect(info["relatedVideos"][2]["ucid"]).to eq("UCnYMOamNKLGVlJgRUbamveA") - expect(info["relatedVideos"][2]["view_count"]).to eq("13329149") - expect(info["relatedVideos"][2]["short_view_count"]).to eq("13M") - expect(info["relatedVideos"][2]["author_verified"]).to eq("true") - - # Related video #2 - expect(info["relatedVideos"][9]["id"]).to eq("IQ_4fvpzYuA") - expect(info["relatedVideos"][9]["author"]).to eq("Business Today") - expect(info["relatedVideos"][9]["ucid"]).to eq("UCaPHWiExfUWaKsUtENLCv5w") - expect(info["relatedVideos"][9]["view_count"]).to eq("26432") - expect(info["relatedVideos"][9]["short_view_count"]).to eq("26K") - expect(info["relatedVideos"][9]["author_verified"]).to eq("true") + expect(info["relatedVideos"][0]["id"]).to eq("j7jPzzjbVuk") + expect(info["relatedVideos"][0]["author"]).to eq("Democracy Now!") + expect(info["relatedVideos"][0]["ucid"]).to eq("UCzuqE7-t13O4NIDYJfakrhw") + expect(info["relatedVideos"][0]["view_count"]).to eq("7576") + expect(info["relatedVideos"][0]["short_view_count"]).to eq("7.5K") + expect(info["relatedVideos"][0]["author_verified"]).to eq("true") # Description - description_start_text = <<-TXT - PBD Podcast Episode 171. In this episode, Patrick Bet-David is joined by Dr. Patrick Moore and Adam Sosnick. - - Join the channel to get exclusive access to perks: https://bit.ly/3Q9rSQL - TXT + description_start_text = "PBD Podcast Episode 241. The home team is ready and at it again with the latest news, interesting topics and trending conversations on topics that matter. Try our sponsor Aura for 14 days free - https://aura.com/pbd" expect(info["description"].as_s).to start_with(description_start_text) expect(info["shortDescription"].as_s).to start_with(description_start_text) expect(info["descriptionHtml"].as_s).to start_with( - <<-TXT - PBD Podcast Episode 171. In this episode, Patrick Bet-David is joined by Dr. Patrick Moore and Adam Sosnick. - - Join the channel to get exclusive access to perks: bit.ly/3Q9rSQL - TXT + "PBD Podcast Episode 241. The home team is ready and at it again with the latest news, interesting topics and trending conversations on topics that matter. Try our sponsor Aura for 14 days free - aura.com/pbd" ) # Video metadata @@ -223,6 +105,6 @@ Spectator.describe "parse_video_info" do "https://yt3.ggpht.com/61ArDiQshJrvSXcGLhpFfIO3hlMabe2fksitcf6oGob0Mdr5gztdkXxRljICUodL4iuTSrtxW4A=s48-c-k-c0x00ffffff-no-rj" ) expect(info["authorVerified"].as_bool).to be_false - expect(info["subCountText"].as_s).to eq("227K") + expect(info["subCountText"].as_s).to eq("594K") end end From 4ae158ef6dcb89c2cd0eec646a42f11ebc207fba Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Sun, 19 Mar 2023 22:44:59 +0100 Subject: [PATCH 23/23] Videos: Add back support for views on livestreams --- src/invidious/videos/parser.cr | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/invidious/videos/parser.cr b/src/invidious/videos/parser.cr index 04ee7303..efc4b2e5 100644 --- a/src/invidious/videos/parser.cr +++ b/src/invidious/videos/parser.cr @@ -185,10 +185,12 @@ def parse_video_info(video_id : String, player_response : Hash(String, JSON::Any # We have to try to extract viewCount from videoPrimaryInfoRenderer first, # then from videoDetails, as the latter is "0" for livestreams (we want # to get the amount of viewers watching). - views_txt = video_primary_renderer - .try &.dig?("viewCount", "videoViewCountRenderer", "viewCount", "simpleText") - views_txt ||= video_details["viewCount"]? - views = views_txt.try &.as_s.gsub(/\D/, "").to_i64? + views_txt = extract_text( + video_primary_renderer + .try &.dig?("viewCount", "videoViewCountRenderer", "viewCount") + ) + views_txt ||= video_details["viewCount"]?.try &.as_s || "" + views = views_txt.gsub(/\D/, "").to_i64? length_txt = (microformat["lengthSeconds"]? || video_details["lengthSeconds"]) .try &.as_s.to_i64