Skip to content

Commit 4e97456

Browse files
committed
Merge branch 'development' into feature/hide-member-only-videos
* development: (122 commits) Translated using Weblate (Burmese) Translated using Weblate (Khmer (Central)) Translated using Weblate (Awadhi) Translated using Weblate (Tamil) Translated using Weblate (Breton) Translated using Weblate (Flemish (West)) Translated using Weblate (Latvian) Translated using Weblate (Tigrinya) Translated using Weblate (Urdu) Translated using Weblate (Alemannic) Translated using Weblate (Georgian) Translated using Weblate (Azerbaijani) Translated using Weblate (Nepali) Translated using Weblate (Lithuanian) Translated using Weblate (Norwegian Nynorsk) Translated using Weblate (Bengali) Translated using Weblate (Bosnian) Translated using Weblate (Galician) Translated using Weblate (Hindi) Translated using Weblate (Korean) ...
2 parents 03d8139 + 0829961 commit 4e97456

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+530
-209
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<!-- Thanks for sending a pull request! Make sure to follow the contributing guidelines. -->
44
<!-- Important note, we may remove your pull request if you do not use this provided PR template correctly. -->
5+
<!-- Do not create PR's with AI! (PRs created mainly with AI will be closed. They waste our team's time. We ban repeat offenders.) -->
56

67
## Pull Request Type
78
<!-- Please select what type of pull request this is: [x] -->

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"path-browserify": "^1.0.1",
6767
"portal-vue": "^2.1.7",
6868
"process": "^0.11.10",
69-
"shaka-player": "^4.14.7",
69+
"shaka-player": "^4.14.8",
7070
"swiper": "^11.2.6",
7171
"vue": "^2.7.16",
7272
"vue-i18n": "^8.28.2",
@@ -80,15 +80,15 @@
8080
"@babel/plugin-transform-class-properties": "^7.25.9",
8181
"@babel/preset-env": "^7.26.9",
8282
"@double-great/stylelint-a11y": "^3.0.4",
83-
"@eslint/js": "^9.24.0",
83+
"@eslint/js": "^9.25.0",
8484
"@intlify/eslint-plugin-vue-i18n": "^3.2.0",
8585
"babel-loader": "^10.0.0",
8686
"copy-webpack-plugin": "^13.0.0",
8787
"css-loader": "^7.1.2",
8888
"css-minimizer-webpack-plugin": "^7.0.2",
89-
"electron": "^35.1.5",
90-
"electron-builder": "^26.0.12",
91-
"eslint": "^9.24.0",
89+
"electron": "^35.2.0",
90+
"electron-builder": "^26.0.13",
91+
"eslint": "^9.25.0",
9292
"eslint-plugin-jsdoc": "^50.6.9",
9393
"eslint-plugin-jsonc": "^2.20.0",
9494
"eslint-plugin-unicorn": "^58.0.0",
@@ -99,7 +99,7 @@
9999
"html-webpack-plugin": "^5.6.3",
100100
"js-yaml": "^4.1.0",
101101
"json-minimizer-webpack-plugin": "^5.0.1",
102-
"lefthook": "^1.11.9",
102+
"lefthook": "^1.11.10",
103103
"mini-css-extract-plugin": "^2.9.2",
104104
"neostandard": "^0.12.1",
105105
"npm-run-all2": "^7.0.2",
@@ -116,7 +116,7 @@
116116
"vue-devtools": "^5.1.4",
117117
"vue-eslint-parser": "^10.1.3",
118118
"vue-loader": "^15.10.0",
119-
"webpack": "^5.99.5",
119+
"webpack": "^5.99.6",
120120
"webpack-cli": "^6.0.1",
121121
"webpack-dev-server": "^5.2.1",
122122
"yaml-eslint-parser": "^1.3.0"

src/renderer/helpers/api/local.js

Lines changed: 76 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,6 +1235,52 @@ function parseLockupView(lockupView, channelId = undefined, channelName = undefi
12351235
videoCount: extractNumberFromString(thumbnailOverlayBadgeView.badges[0].text)
12361236
}
12371237
}
1238+
case 'VIDEO': {
1239+
let publishedText
1240+
let lengthSeconds = ''
1241+
let liveNow = false
1242+
1243+
/** @type {YTNodes.ThumbnailOverlayBadgeView | undefined} */
1244+
const thumbnailOverlayBadgeView = lockupView.content_image?.overlays?.firstOfType(YTNodes.ThumbnailOverlayBadgeView)
1245+
1246+
if (thumbnailOverlayBadgeView) {
1247+
if (thumbnailOverlayBadgeView.badges.some(badge => badge.badge_style === 'THUMBNAIL_OVERLAY_BADGE_STYLE_LIVE')) {
1248+
liveNow = true
1249+
} else {
1250+
const durationBadge = thumbnailOverlayBadgeView.badges.find(badge => /^[\d:]+$/.test(badge.text))
1251+
1252+
if (durationBadge) {
1253+
lengthSeconds = Utils.timeToSeconds(durationBadge.text)
1254+
}
1255+
1256+
publishedText = lockupView.metadata.metadata?.metadata_rows[1].metadata_parts?.[1].text?.text
1257+
}
1258+
}
1259+
1260+
let viewCount = null
1261+
1262+
const viewsText = lockupView.metadata.metadata?.metadata_rows[1].metadata_parts?.[0].text?.text
1263+
1264+
if (viewsText) {
1265+
const views = parseLocalSubscriberCount(viewsText)
1266+
1267+
if (!isNaN(views)) {
1268+
viewCount = views
1269+
}
1270+
}
1271+
1272+
return {
1273+
type: 'video',
1274+
videoId: lockupView.content_id,
1275+
title: lockupView.metadata.title.text,
1276+
author: lockupView.metadata.metadata?.metadata_rows[0].metadata_parts?.[0].text?.text,
1277+
authorId: lockupView.metadata.image?.renderer_context?.command_context?.on_tap?.payload.browseId,
1278+
viewCount,
1279+
published: calculatePublishedDate(publishedText, liveNow),
1280+
lengthSeconds,
1281+
liveNow
1282+
}
1283+
}
12381284
default:
12391285
console.warn(`Unknown lockup content type: ${lockupView.content_type}`, lockupView)
12401286
return null
@@ -1355,28 +1401,41 @@ function parseListItem(item, channelId, channelName) {
13551401
}
13561402

13571403
/**
1358-
* @param {import('youtubei.js').YTNodes.CompactVideo} video
1404+
* @param {YTNodes.CompactVideo | YTNodes.CompactMovie | YTNodes.LockupView} video
13591405
*/
13601406
export function parseLocalWatchNextVideo(video) {
1361-
let publishedText
1407+
if (video.is(YTNodes.CompactMovie)) {
1408+
return {
1409+
type: 'video',
1410+
videoId: video.id,
1411+
title: video.title.text,
1412+
author: video.author.name,
1413+
authorId: video.author.id,
1414+
lengthSeconds: video.duration.seconds
1415+
}
1416+
} else if (video.is(YTNodes.LockupView)) {
1417+
return parseLockupView(video)
1418+
} else {
1419+
let publishedText
13621420

1363-
if (video.published != null && !video.published.isEmpty()) {
1364-
publishedText = video.published.text
1365-
}
1421+
if (video.published != null && !video.published.isEmpty()) {
1422+
publishedText = video.published.text
1423+
}
13661424

1367-
const published = calculatePublishedDate(publishedText, video.is_live, video.is_premiere)
1425+
const published = calculatePublishedDate(publishedText, video.is_live, video.is_premiere)
13681426

1369-
return {
1370-
type: 'video',
1371-
videoId: video.video_id,
1372-
title: video.title.text,
1373-
author: video.author.name,
1374-
authorId: video.author.id,
1375-
viewCount: video.view_count == null ? null : extractNumberFromString(video.view_count.text),
1376-
published,
1377-
lengthSeconds: isNaN(video.duration.seconds) ? '' : video.duration.seconds,
1378-
liveNow: video.is_live,
1379-
isUpcoming: video.is_premiere
1427+
return {
1428+
type: 'video',
1429+
videoId: video.video_id,
1430+
title: video.title.text,
1431+
author: video.author.name,
1432+
authorId: video.author.id,
1433+
viewCount: video.view_count == null ? null : extractNumberFromString(video.view_count.text),
1434+
published,
1435+
lengthSeconds: isNaN(video.duration.seconds) ? '' : video.duration.seconds,
1436+
liveNow: video.is_live,
1437+
isUpcoming: video.is_premiere
1438+
}
13801439
}
13811440
}
13821441

src/renderer/views/Watch/Watch.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,10 @@ export default defineComponent({
406406
this.isFamilyFriendly = result.basic_info.is_family_safe
407407

408408
const recommendedVideos = result.watch_next_feed
409-
?.filter((item) => item.type === 'CompactVideo' || item.type === 'CompactMovie')
409+
?.filter((item) => {
410+
return item.type === 'CompactVideo' || item.type === 'CompactMovie' ||
411+
(item.type === 'LockupView' && item.content_type === 'VIDEO')
412+
})
410413
.map(parseLocalWatchNextVideo) ?? []
411414

412415
// place watched recommended videos last

static/locales/af.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Locale Name: 'Afrikaans'
33

44
# Webkit Menu Bar
55
File: 'Lêer'
6-
New Window: 'Nuwe venster'
6+
New Window: 'Nuwe Venster'
77
Preferences: 'Voorkeure'
88
Quit: 'Sluit'
99
Edit: 'Wysig'

static/locales/as.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,10 @@ Locale Name: অসমীয়া
2323
Global:
2424
Videos: ভিডিঅ
2525
Live: লাইভ
26+
Sort By: বস্তু অনুযায়ী সজাওক
27+
Search Listing:
28+
Label:
29+
8K: 8K
30+
4K: 4K
31+
Profile:
32+
Select All: সকলোক বাছক

static/locales/awa.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Put the name of your locale in the same language
2-
Locale Name: 'अंगरेजी (अमरीका)'
2+
Locale Name: 'अवधी'
33

44
# Webkit Menu Bar
55
File: 'फाइल'
@@ -700,7 +700,7 @@ Profile:
700700
Subscription List: ''
701701
Other Channels: ''
702702
'{number} selected': ''
703-
Select All: ''
703+
Select All: 'सगरौ चुना'
704704
Select None: ''
705705
Delete Selected: ''
706706
Add Selected To Profile: ''
@@ -1086,7 +1086,7 @@ KeyboardShortcutPrompt:
10861086
Focus Secondary Search: ''
10871087
Captions: ''
10881088
Stats: ''
1089-
Fullscreen: ''
1089+
Fullscreen: 'टागल पूरी स्क्रीन'
10901090
Picture in Picture: ''
10911091
Large Rewind: ''
10921092
Play: ''
@@ -1101,10 +1101,10 @@ KeyboardShortcutPrompt:
11011101
Close Window: ''
11021102
Restart Window: ''
11031103
Force Restart Window: ''
1104-
Toggle Developer Tools: ''
1104+
Toggle Developer Tools: 'टागल डेबलपर टूल्स'
11051105
Reset Zoom: ''
1106-
Zoom In: ''
1107-
Zoom Out: ''
1106+
Zoom In: 'जूम करा'
1107+
Zoom Out: 'छोट करा (जूम आउट)'
11081108
Focus Search: ''
11091109
Search in New Window: ''
11101110
Last Frame: ''

static/locales/az.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,3 +407,10 @@ Ok: Oldu
407407
No: Xeyr
408408
Right-click or hold to see history: Tarixçəni görmək üçün sağ düyməyə klik edin və
409409
ya sıxıb saxlayın
410+
KeyboardShortcutPrompt:
411+
Toggle Developer Tools: Tərtibatçı Seçimlərini Aç/Bağla
412+
Zoom Out: Uzaqlaşdır
413+
Zoom In: Yaxınlaşdır
414+
Fullscreen: Tam ekran göstər
415+
Profile:
416+
Select All: Hamısını seç

static/locales/bn.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,13 @@ Search Listing:
198198
Label:
199199
360 Video: ৩৬০°
200200
New: নতুন
201+
8K: 8K
202+
4K: 4K
201203
Right-click or hold to see history: ইতিহাস দেখতে রাইট-ক্লিক করুন অথবা ধরে রাখুন
204+
KeyboardShortcutPrompt:
205+
Toggle Developer Tools: ডেভেলপার যন্ত্র টগল করো
206+
Zoom In: সম্প্রসারিত করো (জুম)
207+
Zoom Out: সংকুচিত করো(জুম)
208+
Fullscreen: পূর্ণ-স্ক্রিন
209+
Profile:
210+
Select All: সব নির্বাচন করো

static/locales/br.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,3 +1200,8 @@ Cancel: 'Nullañ'
12001200
checkmark: ''
12011201
# French is the only language that should change this (they have a space before the colon)
12021202
Display Label: '{label} : {value}'
1203+
KeyboardShortcutPrompt:
1204+
Toggle Developer Tools: Enaouiñ/Lazhañ Ostilhoù diorren
1205+
Zoom Out: Zoum bihanaat
1206+
Zoom In: Zoum brassat
1207+
Fullscreen: Tremen e skramm leun

static/locales/bs.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,15 @@ Channel:
130130
Tooltips: {}
131131
No: 'Ne'
132132
New Window: Novi Prozor
133+
Search Listing:
134+
Label:
135+
4K: 4K
136+
8K: 8K
137+
KeyboardShortcutPrompt:
138+
Toggle Developer Tools: Uključi alate za programere
139+
Zoom In: Približi
140+
Zoom Out: Umanji
141+
Fullscreen: Prebaci preko cijelog ekrana
142+
Preferences: Postavke
143+
Profile:
144+
Select All: Odabri sve

static/locales/ca.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ Search Filters:
7878
# Sidebar
7979
There are no more results for this search: No hi ha més resultats per a aquesta
8080
cerca
81+
Features:
82+
Subtitles: Subtítols
8183
Subscriptions:
8284
# On Subscriptions Page
8385
Subscriptions: 'Subscripcions'
@@ -557,3 +559,13 @@ Falling back to Invidious API: Recorrent a l'API d'Invidious
557559
Invidious API Error (Click to copy): S'ha produït un error en l'API d'Invidious (feu
558560
clic per copiar-lo)
559561
Moments Ago: fa un moment
562+
Search Listing:
563+
Label:
564+
4K: 4K
565+
8K: 8K
566+
Subtitles: Subtítols
567+
KeyboardShortcutPrompt:
568+
Toggle Developer Tools: Activa les eines per a desenvolupadors
569+
Zoom In: Amplia
570+
Zoom Out: Allunya
571+
Fullscreen: Commuta la pantalla completa

static/locales/ckb.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -915,5 +915,6 @@ KeyboardShortcutPrompt:
915915
Situational: 'کاربەرنامە: بارودۆخی'
916916
Last Chapter: دوا بڕگە
917917
Next Chapter: بڕگەی دواتر
918+
Toggle Developer Tools: زامنی ئامرازەکانی گەشەپێدەر
918919
checkmark:
919920
shortcutJoinOperator: +

static/locales/el.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Put the name of your locale in the same language
2-
Locale Name: 'Ελληνικά (EL)'
2+
Locale Name: 'Ελληνικά'
33

44
# Webkit Menu Bar
55
File: 'Αρχείο'

static/locales/eo.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,10 @@ Reload: Reŝarĝi
115115
Preferences: Agordoj
116116
New Window: Nova Fenestro
117117
Go to page: Iri al {page}
118+
Actual size: Reala grando
119+
Profile:
120+
Select All: Elekti ĉiujn
121+
KeyboardShortcutPrompt:
122+
Zoom In: Zomi
123+
Zoom Out: Malzomi
124+
Fullscreen: Baskuli tutekranon

static/locales/es-AR.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,3 +680,10 @@ Feed:
680680
Feed Last Updated: 'Última actualización del feed de {feedName}: {date}'
681681
Right-click or hold to see history: Haz clic derecho o mantén presionado para ver
682682
el historial
683+
KeyboardShortcutPrompt:
684+
Toggle Developer Tools: Activar/Desactivar Herramientas de Desarrollo
685+
Zoom Out: Alejarse
686+
Zoom In: Acercarse
687+
Fullscreen: Alternar pantalla completa
688+
Profile:
689+
Select All: Seleccionar todo

static/locales/es-MX.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,3 +763,8 @@ Feed:
763763
Feed Last Updated: 'El feed de {feedName} se actualizó por última vez: {date}'
764764
Refresh Feed: Actualizar {subscriptionName}
765765
Close Banner: Cerrar banner
766+
KeyboardShortcutPrompt:
767+
Toggle Developer Tools: Herramientas para desarrolladores
768+
Zoom Out: Reducir
769+
Zoom In: Ampliar
770+
Fullscreen: Pantalla completa

static/locales/fa.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Put the name of your locale in the same language
2-
Locale Name: 'فارسی (ایرانی)'
2+
Locale Name: 'فارسی'
33

44
# Webkit Menu Bar
55
File: 'فایل'

static/locales/fi.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,3 +1025,8 @@ Right-click or hold to see history: Näytä historia napsauttamalla hiiren kakko
10251025
tai pitämällä sitä painettuna
10261026
Close Banner: Sulje Banneri
10271027
Search character limit: Hakukysely ylittää {searchCharacterLimit}-merkkirajan.
1028+
KeyboardShortcutPrompt:
1029+
Toggle Developer Tools: Kehittäjän työkalut päällä/pois
1030+
Zoom In: Lähennä
1031+
Zoom Out: Loitonna
1032+
Fullscreen: Vaihda koko näyttöön

static/locales/fil.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,14 @@ Version {versionNumber} is now available! Click for more details: Version {vers
113113
ay magamit na! . . Pindutin para sa detalye
114114
A new blog is now available, {blogTitle}. Click to view more: May bagong blog, {blogTitle},
115115
Pindutin para makita
116+
KeyboardShortcutPrompt:
117+
Toggle Developer Tools: I-toggle ang mga Developer Tools
118+
Zoom In: Palakihin
119+
Zoom Out: Paliitin
120+
Fullscreen: I-fullscreen
121+
Search Listing:
122+
Label:
123+
8K: 8K
124+
4K: 4K
125+
Profile:
126+
Select All: Piliin lahat

0 commit comments

Comments
 (0)