Skip to content

Commit 62ef616

Browse files
committed
Merge branch 'development' into custom-builds/dragdrop
* development: (21 commits) Bump webpack-cli from 6.0.1 to 7.0.1 in the webpack group (FreeTubeApp#8816) Bump @double-great/stylelint-a11y in the stylelint group (FreeTubeApp#8815) Bump youtubei.js from 16.0.1 to 17.0.1 (FreeTubeApp#8818) Translated using Weblate (Portuguese) Bump electron from 40.8.0 to 41.0.2 (FreeTubeApp#8801) Translated using Weblate (German) Translated using Weblate (Lithuanian) Bump lefthook from 2.1.3 to 2.1.4 (FreeTubeApp#8799) Bump babel-loader from 10.1.0 to 10.1.1 in the babel group (FreeTubeApp#8794) Bump the webpack group with 2 updates (FreeTubeApp#8797) Bump the fortawesome group with 5 updates (FreeTubeApp#8796) Bump the eslint group with 3 updates (FreeTubeApp#8795) Bump vue from 3.5.29 to 3.5.30 (FreeTubeApp#8800) Translated using Weblate (Japanese) Serialize the error as a string to pass it back to the main view (FreeTubeApp#8789) Bump tar from 7.5.10 to 7.5.11 (FreeTubeApp#8788) Workaround for electron/electron#49253 (FreeTubeApp#8714) Translated using Weblate (Icelandic) Translated using Weblate (Japanese) Trim video titles with the local API to avoid breaking the databases (FreeTubeApp#8354) ...
2 parents 4f1f38b + 11e9cc3 commit 62ef616

File tree

12 files changed

+381
-345
lines changed

12 files changed

+381
-345
lines changed

package.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,20 @@
4141
"lint-style-fix": "stylelint --fix \"src/**/*.{css,scss}\"",
4242
"lint-yml": "eslint --config eslint.config.mjs \"**/*.yml\" \"**/*.yaml\"",
4343
"pack": "run-p pack:main pack:renderer pack:preload pack:botGuardScript && node _scripts/injectAllowedPaths.mjs",
44-
"pack:main": "webpack --mode=production --node-env=production --config _scripts/webpack.main.config.js",
45-
"pack:renderer": "webpack --mode=production --node-env=production --config _scripts/webpack.renderer.config.js",
46-
"pack:preload": "webpack --mode=production --node-env=production --config _scripts/webpack.preload.config.js",
47-
"pack:web": "webpack --mode=production --node-env=production --config _scripts/webpack.web.config.js",
44+
"pack:main": "webpack --mode=production --config-node-env=production --config _scripts/webpack.main.config.js",
45+
"pack:renderer": "webpack --mode=production --config-node-env=production --config _scripts/webpack.renderer.config.js",
46+
"pack:preload": "webpack --mode=production --config-node-env=production --config _scripts/webpack.preload.config.js",
47+
"pack:web": "webpack --mode=production --config-node-env=production --config _scripts/webpack.web.config.js",
4848
"pack:botGuardScript": "webpack --config _scripts/webpack.botGuardScript.config.js",
4949
"checkforbadtemplates": "node _scripts/findMissingTemplates.mjs",
5050
"ci": "yarn install --silent --frozen-lockfile --network-concurrency 1"
5151
},
5252
"dependencies": {
53-
"@fortawesome/fontawesome-svg-core": "^7.1.0",
54-
"@fortawesome/free-brands-svg-icons": "^7.1.0",
55-
"@fortawesome/free-regular-svg-icons": "^7.1.0",
56-
"@fortawesome/free-solid-svg-icons": "^7.1.0",
57-
"@fortawesome/vue-fontawesome": "^3.1.2",
53+
"@fortawesome/fontawesome-svg-core": "^7.2.0",
54+
"@fortawesome/free-brands-svg-icons": "^7.2.0",
55+
"@fortawesome/free-regular-svg-icons": "^7.2.0",
56+
"@fortawesome/free-solid-svg-icons": "^7.2.0",
57+
"@fortawesome/vue-fontawesome": "^3.1.3",
5858
"@seald-io/nedb": "^4.1.2",
5959
"autolinker": "^4.1.5",
6060
"bgutils-js": "^3.2.0",
@@ -64,30 +64,30 @@
6464
"process": "^0.11.10",
6565
"shaka-player": "^5.0.4",
6666
"swiper": "^12.1.2",
67-
"vue": "^3.5.29",
67+
"vue": "^3.5.30",
6868
"vue-i18n": "^11.3.0",
6969
"vue-observe-visibility": "^2.0.0-alpha.1",
7070
"vue-router": "^5.0.3",
7171
"vuex": "^4.1.0",
72-
"youtubei.js": "^16.0.1"
72+
"youtubei.js": "^17.0.1"
7373
},
7474
"devDependencies": {
7575
"@babel/core": "^7.29.0",
7676
"@babel/preset-env": "^7.29.0",
77-
"@double-great/stylelint-a11y": "^3.4.5",
77+
"@double-great/stylelint-a11y": "^3.4.6",
7878
"@eslint/js": "^10.0.1",
7979
"@intlify/eslint-plugin-vue-i18n": "^4.3.0",
8080
"@stylistic/eslint-plugin": "^5.10.0",
81-
"babel-loader": "^10.1.0",
81+
"babel-loader": "^10.1.1",
8282
"copy-webpack-plugin": "^14.0.0",
8383
"css-loader": "^7.1.4",
8484
"css-minimizer-webpack-plugin": "^8.0.0",
85-
"electron": "^40.8.0",
85+
"electron": "^41.0.2",
8686
"electron-builder": "^26.8.1",
8787
"eslint": "^10.0.3",
88-
"eslint-plugin-import-x": "^4.16.1",
89-
"eslint-plugin-jsdoc": "^62.7.1",
90-
"eslint-plugin-jsonc": "^3.1.1",
88+
"eslint-plugin-import-x": "^4.16.2",
89+
"eslint-plugin-jsdoc": "^62.8.0",
90+
"eslint-plugin-jsonc": "^3.1.2",
9191
"eslint-plugin-n": "^17.24.0",
9292
"eslint-plugin-promise": "^7.2.1",
9393
"eslint-plugin-unicorn": "^63.0.0",
@@ -98,12 +98,12 @@
9898
"html-webpack-plugin": "^5.6.6",
9999
"js-yaml": "^4.1.1",
100100
"json-minimizer-webpack-plugin": "^5.0.1",
101-
"lefthook": "^2.1.3",
102-
"mini-css-extract-plugin": "^2.10.0",
101+
"lefthook": "^2.1.4",
102+
"mini-css-extract-plugin": "^2.10.1",
103103
"npm-run-all2": "^8.0.4",
104104
"postcss": "^8.5.8",
105105
"postcss-scss": "^4.0.9",
106-
"sass": "^1.97.3",
106+
"sass": "^1.98.0",
107107
"sass-loader": "^16.0.7",
108108
"stylelint": "^17.4.0",
109109
"stylelint-config-sass-guidelines": "^13.0.0",
@@ -114,7 +114,7 @@
114114
"vue-eslint-parser": "^10.2.0",
115115
"vue-loader": "^17.4.2",
116116
"webpack": "^5.105.4",
117-
"webpack-cli": "^6.0.1",
117+
"webpack-cli": "^7.0.1",
118118
"webpack-dev-server": "^5.2.3"
119119
}
120120
}

src/main/index.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,16 @@ function runApp() {
10551055

10561056
newWindow.on('minimize', () => {
10571057
if (trayOnMinimize) {
1058-
newWindow.hide()
1058+
// Workaround for https://github.com/electron/electron/issues/49253
1059+
if (process.platform === 'linux') {
1060+
setTimeout(() => {
1061+
newWindow.restore()
1062+
newWindow.hide()
1063+
}, 100)
1064+
} else {
1065+
newWindow.hide()
1066+
}
1067+
10591068
manageTray(newWindow)
10601069

10611070
if (newWindow === mainWindow) {

src/renderer/helpers/api/local.js

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,9 @@ const TRACKING_PARAM_NAMES = [
2222
]
2323

2424
if (process.env.SUPPORTS_LOCAL_API) {
25-
Platform.shim.eval = (data, env) => {
25+
Platform.shim.eval = (data) => {
2626
return new Promise((resolve, reject) => {
27-
const properties = []
28-
29-
if (env.n) {
30-
properties.push(`n: exportedVars.nFunction("${env.n}")`)
31-
}
32-
33-
if (env.sig) {
34-
properties.push(`sig: exportedVars.sigFunction("${env.sig}")`)
35-
}
36-
37-
// Triggers permission errors if we don't remove it (added by YouTube.js), as sessionStorage isn't accessible in sandboxed cross-origin iframes
38-
const modifiedOutput = data.output.replace('const window = Object.assign({}, globalThis);', '')
39-
40-
const code = `${modifiedOutput}\nreturn {${properties.join(', ')}}`
27+
const code = data.output
4128

4229
// Generate a unique ID, as there may be multiple eval calls going on at the same time (e.g. DASH manifest generation)
4330
const messageId = process.env.IS_ELECTRON || crypto.randomUUID
@@ -108,7 +95,6 @@ async function createInnertube({ withPlayer = false, location = undefined, safet
10895
user_agent: navigator.userAgent,
10996

11097
retrieve_player: !!withPlayer,
111-
player_id: '9f4cc5e4',
11298
location: location,
11399
enable_safety_mode: !!safetyMode,
114100
client_type: clientType,
@@ -1110,7 +1096,7 @@ export function parseShort(short, channelId, channelName) {
11101096
return {
11111097
type: 'video',
11121098
videoId: reelItem.id,
1113-
title: reelItem.title.text,
1099+
title: reelItem.title.text?.trim(),
11141100
author: channelName,
11151101
authorId: channelId,
11161102
viewCount: reelItem.views.isEmpty() ? null : parseLocalSubscriberCount(reelItem.views.text),
@@ -1123,7 +1109,7 @@ export function parseShort(short, channelId, channelName) {
11231109
return {
11241110
type: 'video',
11251111
videoId: shortsLockupView.on_tap_endpoint.payload.videoId,
1126-
title: shortsLockupView.overlay_metadata.primary_text.text,
1112+
title: shortsLockupView.overlay_metadata.primary_text.text?.trim(),
11271113
author: channelName,
11281114
authorId: channelId,
11291115
viewCount: shortsLockupView.overlay_metadata.secondary_text ? parseLocalSubscriberCount(shortsLockupView.overlay_metadata.secondary_text.text) : null,
@@ -1318,7 +1304,7 @@ export function parseLocalPlaylistVideo(video) {
13181304
return {
13191305
type: 'video',
13201306
videoId: short.id,
1321-
title: short.title.text,
1307+
title: short.title.text?.trim(),
13221308
viewCount: parseLocalSubscriberCount(short.views.text),
13231309
lengthSeconds: ''
13241310
}
@@ -1354,7 +1340,7 @@ export function parseLocalPlaylistVideo(video) {
13541340
return {
13551341
type: 'video',
13561342
videoId: shortsLockupView.on_tap_endpoint.payload.videoId,
1357-
title: shortsLockupView.overlay_metadata.primary_text.text,
1343+
title: shortsLockupView.overlay_metadata.primary_text.text?.trim(),
13581344
viewCount,
13591345
lengthSeconds: ''
13601346
}
@@ -1400,7 +1386,7 @@ export function parseLocalPlaylistVideo(video) {
14001386
return {
14011387
type: 'video',
14021388
videoId: video_.id,
1403-
title: video_.title.text,
1389+
title: video_.title.text?.trim(),
14041390
author: video_.author.name,
14051391
authorId: (video_.author?.id != null && video_.author.id !== 'N/A') ? video_.author.id : null,
14061392
viewCount,
@@ -1426,7 +1412,7 @@ export function parseLocalListVideo(item, channelId, channelName) {
14261412
return {
14271413
type: 'video',
14281414
videoId: movie.id,
1429-
title: movie.title.text,
1415+
title: movie.title.text?.trim(),
14301416
author: movie.author.name !== 'N/A' ? movie.author.name : channelName,
14311417
authorId: movie.author.id !== 'N/A' ? movie.author.id : channelId,
14321418
description: movie.description_snippet?.text,
@@ -1456,7 +1442,7 @@ export function parseLocalListVideo(item, channelId, channelName) {
14561442
return {
14571443
type: 'video',
14581444
videoId: video.video_id,
1459-
title: video.title.text,
1445+
title: video.title.text?.trim(),
14601446
author: video.author?.name ?? channelName,
14611447
authorId: (video.author?.id != null && video.author.id !== 'N/A') ? video.author.id : channelId,
14621448
viewCount: video.views.text == null ? null : extractNumberFromString(video.views.text),
@@ -1507,7 +1493,7 @@ export function parseLocalListVideo(item, channelId, channelName) {
15071493
return {
15081494
type: 'video',
15091495
videoId: video.video_id,
1510-
title: video.title.text,
1496+
title: video.title.text?.trim(),
15111497
author: video.author.name !== 'N/A' ? video.author.name : channelName,
15121498
authorId: video.author.id !== 'N/A' ? video.author.id : channelId,
15131499
description: video.description,
@@ -1616,7 +1602,7 @@ function parseLockupView(lockupView, channelId = undefined, channelName = undefi
16161602
return {
16171603
type: 'video',
16181604
videoId: lockupView.content_id,
1619-
title: lockupView.metadata.title.text,
1605+
title: lockupView.metadata.title.text?.trim(),
16201606
author: lockupView.metadata.metadata?.metadata_rows[0].metadata_parts?.[0].text?.text,
16211607
authorId: lockupView.metadata.image?.renderer_context?.command_context?.on_tap?.payload.browseId,
16221608
viewCount,
@@ -1756,7 +1742,7 @@ export function parseLocalWatchNextVideo(video) {
17561742
return {
17571743
type: 'video',
17581744
videoId: video.id,
1759-
title: video.title.text,
1745+
title: video.title.text?.trim(),
17601746
author: video.author.name,
17611747
authorId: video.author.id,
17621748
lengthSeconds: video.duration.seconds
@@ -1775,7 +1761,7 @@ export function parseLocalWatchNextVideo(video) {
17751761
return {
17761762
type: 'video',
17771763
videoId: video.video_id,
1778-
title: video.title.text,
1764+
title: video.title.text?.trim(),
17791765
author: video.author.name,
17801766
authorId: video.author.id,
17811767
viewCount: video.view_count == null ? null : extractNumberFromString(video.view_count.text),

src/renderer/sigFrameScript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ window.addEventListener('message', (event) => {
1212
} catch (error) {
1313
window.parent.postMessage(JSON.stringify({
1414
id: data.id,
15-
error
15+
error: error.toString()
1616
}), '*')
1717
}
1818
})

src/renderer/views/Watch/Watch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ export default defineComponent({
457457
}
458458

459459
// extract localised title first and fall back to the not localised one
460-
this.videoTitle = result.primary_info?.title.text ?? result.basic_info.title
460+
this.videoTitle = result.primary_info?.title.text?.trim() ?? result.basic_info.title?.trim()
461461
this.videoViewCount = result.basic_info.view_count ?? (result.primary_info.view_count ? extractNumberFromString(result.primary_info.view_count.text) : null)
462462
this.license = result.secondary_info.metadata.rows.find(element => element.title?.text === 'License')?.contents[0]?.text
463463

static/locales/de-DE.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ Tooltips:
986986
UseDeArrowThumbnails: Video-Miniaturansichten durch Miniaturansichten von DeArrow ersetzen.
987987
Playing Next Video Interval: Nächstes Video wird sofort abgespielt. Zum Abbrechen klicken. | Nächstes Video wird in {nextVideoInterval} Sekunden abgespielt. Zum Abbrechen klicken. | Nächstes Video wird in {nextVideoInterval} Sekunden abgespielt. Zum Abbrechen klicken.
988988
More: Mehr
989-
Unknown YouTube url type, cannot be opened in app: Unbekannter YouTube-URL-Typ. Kann in der App nicht geöffnet werden
989+
Unknown YouTube url type, cannot be opened in app: Unbekannter YouTube-URL-Typ, kann in der App nicht geöffnet werden
990990
Open New Window: Neues Fenster öffnen
991991
Default Invidious instance has been cleared: Standardmäßige Invidious-Instanz wurde gelöscht
992992
Default Invidious instance has been set to {instance}: Standardmäßige Invidious-Instanz wurde auf {instance} festgelegt

static/locales/is.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ User Playlists:
186186
Delete Playlist: Eyða spilunarlista
187187
Are you sure you want to delete this playlist? This cannot be undone: Ertu viss um að þú viljir eyða þessum spilunarlista? Aðgerðin er ekki afturkallanleg.
188188
Add to Favorites: Bæta í {playlistName}
189-
Remove from Favorites: Fjarlægja af {playlistName}
189+
Remove from Favorites: Fjarlægja úr {playlistName}
190190
Enable Quick Bookmark With This Playlist: Virkja flýtibókamerki með þessum spilunarlista
191191
Playlists with Matching Videos: Spilunarlistar með samsvarandi myndskeiðum
192192
Quick Bookmark Enabled: Flýtibókamerki virkjuð

static/locales/ja.yaml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -518,32 +518,32 @@ Settings:
518518
Hide Channels: チャンネルから動画を非表示にする
519519
Hide Channels Placeholder: チャンネル ID
520520
Display Titles Without Excessive Capitalisation: 過剰な大文字や句読点のないタイトルの表示
521-
Hide Channel Playlists: チャンネルの「再生リスト」タブを隠す
521+
Hide Channel Playlists: チャンネルの「再生リスト」タブを非表示
522522
Sections:
523523
Side Bar: サイドバー
524524
Channel Page: チャンネル ページ
525525
Watch Page: 視聴ページ
526526
General: 一般
527527
Subscriptions Page: 登録チャンネル ページ
528528
Hide Featured Channels: おすすめチャンネルの非表示
529-
Hide Channel Shorts: チャンネルの「ショート動画」タブを隠す
530-
Hide Channel Podcasts: チャンネルの「ポッドキャスト」タブを隠す
529+
Hide Channel Shorts: チャンネルの「ショート動画」タブを非表示
530+
Hide Channel Podcasts: チャンネルの「ポッドキャスト」タブを非表示
531531
Hide Subscriptions Shorts: 登録チャンネルのショート動画の非表示
532532
Hide Subscriptions Live: 登録チャンネルのライブ配信の非表示
533533
Hide Subscriptions Videos: 登録チャンネルの動画の非表示
534-
Hide Channel Releases: チャンネルの「新着情報」タブを隠す
535-
Hide Profile Pictures in Comments: コメント欄のプロフィール写真を隠す
534+
Hide Channel Releases: チャンネルの「新着情報」タブを非表示
535+
Hide Profile Pictures in Comments: コメント欄のプロフィール写真を非表示
536536
Hide Channels Invalid: 提供されたチャンネル ID が無効です
537537
Hide Channels Disabled Message: 一部のチャンネルが ID を使用してブロックされ、処理されませんでした。これらの ID が更新されている間、機能はブロックされます
538538
Hide Channels Already Exists: チャンネル ID は既に存在します
539539
Hide Channels API Error: 指定されたIDのユーザーを検索する際にエラーが発生しました。IDが正しいかもう一度確認してください。
540540
Hide Videos, Playlists and Channels Containing Text Placeholder: 単語、単語の一部、またはフレーズ
541541
Hide Videos, Playlists and Channels Containing Text: 特定のテキストを含む動画と再生リストを非表示にする
542-
Hide Channel Home: チャンネルの「ホーム」タブを隠す
542+
Hide Channel Home: チャンネルの「ホーム」タブを非表示
543543
Show Added Items: 追加された項目を表示
544-
Hide Channel Courses: チャンネルの「コース」タブを隠す
545-
Hide Channel Posts: チャンネルの「投稿」タブを隠す
546-
Hide Subscriptions Posts: 登録チャンネルの投稿を隠す
544+
Hide Channel Courses: チャンネルの「コース」タブを非表示
545+
Hide Channel Posts: チャンネルの「投稿」タブを非表示
546+
Hide Subscriptions Posts: 登録チャンネルの投稿を非表示
547547
The app needs to restart for changes to take effect. Restart and apply change?: 変更の反映には、アプリの再起動が必要です。再起動して変更を適用しますか?
548548
Proxy Settings:
549549
Error getting network information. Is your proxy configured properly?: ネットワーク情報の取得中にエラーが発生しました。プロキシーを正しく設定してますか?
@@ -600,8 +600,8 @@ Settings:
600600
Password Settings:
601601
Password Settings: パスワード
602602
Set Password To Prevent Access: 設定にアクセスするためのパスワードの設定
603-
Set Password: パスワードの設定
604-
Remove Password: パスワードの削除
603+
Set Password: パスワードを設定
604+
Remove Password: パスワードを削除
605605
Password Dialog:
606606
Enter Password To Unlock: パスワードを入力して設定を解除
607607
Password: パスワード
@@ -613,15 +613,15 @@ About:
613613
#& About
614614
#On Channel Page
615615
Donate: 寄付
616-
these people and projects: これらの人々とプロジェクトのおかげです
616+
these people and projects: これらの人々とプロジェクト
617617
Credits: クレジット
618618
Translate: 翻訳
619619
room rules: ルームの規則
620620
Chat on Matrix: Matrix でチャット
621621
Mastodon: マストドン
622622
Email: メールアドレス
623623
Blog: ブログ
624-
Website: WEB サイト
624+
Website: ウェブサイト
625625
Please check for duplicates before posting: 投稿する前に重複を確認してください
626626
GitHub issues: GitHub の課題
627627
Report a problem: 問題の報告
@@ -634,6 +634,9 @@ About:
634634
Beta: ベータ
635635
Discussions: 議論
636636
AGPLv3: AGPLv3
637+
Licensed under the {licenseLink}: '{licenseLink} に基づいてライセンス供与されています'
638+
Please read the {roomRulesLink}: '{roomRulesLink} をお読みください'
639+
FreeTube is made possible by {creditsPageLink}: FreeTube は {creditsPageLink} によって支えられています
637640
Channel:
638641
Subscribe: 'チャンネル登録'
639642
Unsubscribe: '登録解除'
@@ -791,7 +794,7 @@ Video:
791794
Exit Theatre Mode: シアターモードを終了
792795
Exit Full Window: フルウィンドウを終了
793796
Full Window: フルウィンドウ
794-
Hide Stats: 統計を隠す
797+
Hide Stats: 統計を非表示
795798
Take Screenshot: スクリーンショットを撮る
796799
Show Stats: 統計を表示
797800
Autoplay is off: 自動再生 オフ

0 commit comments

Comments
 (0)