Skip to content

Commit 3ab4bc3

Browse files
committed
Merge branch 'shaka-migration' into custom-builds/shaka
* shaka-migration: Truncate long video titles to the screen width in the full screen overlay ^ Update YouTube.js to 10.1.0 (FreeTubeApp#5384) Fix Invidious API error toasts saying undefined (FreeTubeApp#5380) Bump lefthook from 1.6.18 to 1.7.1 (FreeTubeApp#5376)
2 parents c98dbeb + 4151fad commit 3ab4bc3

File tree

9 files changed

+86
-75
lines changed

9 files changed

+86
-75
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"vue-observe-visibility": "^1.0.0",
7575
"vue-router": "^3.6.5",
7676
"vuex": "^3.6.2",
77-
"youtubei.js": "^10.0.0"
77+
"youtubei.js": "^10.1.0"
7878
},
7979
"devDependencies": {
8080
"@babel/core": "^7.24.7",
@@ -104,7 +104,7 @@
104104
"html-webpack-plugin": "^5.6.0",
105105
"js-yaml": "^4.1.0",
106106
"json-minimizer-webpack-plugin": "^5.0.0",
107-
"lefthook": "^1.6.18",
107+
"lefthook": "^1.7.1",
108108
"mini-css-extract-plugin": "^2.9.0",
109109
"npm-run-all2": "^6.2.2",
110110
"postcss": "^8.4.39",

src/main/index.js

+7
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,13 @@ function runApp() {
936936

937937
try {
938938
const contents = await asyncFs.readFile(filePath)
939+
940+
// Probably a corrupted/broken cache entry, pretend it's absent
941+
// A valid entry should be a few KB large
942+
if (contents.byteLength < 500) {
943+
return undefined
944+
}
945+
939946
return contents.buffer
940947
} catch (e) {
941948
console.error(e)

src/renderer/components/ft-shaka-video-player/ft-shaka-video-player.css

+4
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,16 @@
120120
margin: 0;
121121
top: 5px;
122122
left: 5px;
123+
max-width: calc(100% - 10px);
123124
font-size: xx-large;
124125
color: #fff;
125126
font-weight: normal;
126127
background-color: rgb(0 0 0 / 50%);
127128
border-radius: 5px;
128129
user-select: none;
130+
text-overflow: ellipsis;
131+
text-wrap: nowrap;
132+
overflow: hidden;
129133

130134
/* copied from .shaka-scrim-container */
131135
transition: opacity cubic-bezier(.4, 0, .6, 1) .6s;

src/renderer/components/subscriptions-live/subscriptions-live.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,8 @@ export default defineComponent({
331331
}).catch((err) => {
332332
console.error(err)
333333
const errorMessage = this.$t('Invidious API Error (Click to copy)')
334-
showToast(`${errorMessage}: ${err.responseText}`, 10000, () => {
335-
copyToClipboard(err.responseText)
334+
showToast(`${errorMessage}: ${err}`, 10000, () => {
335+
copyToClipboard(err)
336336
})
337337
switch (failedAttempts) {
338338
case 0:

src/renderer/components/subscriptions-videos/subscriptions-videos.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,8 @@ export default defineComponent({
332332
}).catch((err) => {
333333
console.error(err)
334334
const errorMessage = this.$t('Invidious API Error (Click to copy)')
335-
showToast(`${errorMessage}: ${err.responseText}`, 10000, () => {
336-
copyToClipboard(err.responseText)
335+
showToast(`${errorMessage}: ${err}`, 10000, () => {
336+
copyToClipboard(err)
337337
})
338338
switch (failedAttempts) {
339339
case 0:

src/renderer/components/watch-video-comments/watch-video-comments.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -366,11 +366,11 @@ export default defineComponent({
366366
}
367367

368368
this.isLoading = false
369-
}).catch((xhr) => {
370-
console.error(xhr)
369+
}).catch((error) => {
370+
console.error(error)
371371
const errorMessage = this.$t('Invidious API Error (Click to copy)')
372-
showToast(`${errorMessage}: ${xhr.responseText}`, 10000, () => {
373-
copyToClipboard(xhr.responseText)
372+
showToast(`${errorMessage}: ${error}`, 10000, () => {
373+
copyToClipboard(error)
374374
})
375375
this.isLoading = false
376376
})

src/renderer/views/Trending/Trending.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ export default defineComponent({
164164
}).catch((err) => {
165165
console.error(err)
166166
const errorMessage = this.$t('Invidious API Error (Click to copy)')
167-
showToast(`${errorMessage}: ${err.responseText}`, 10000, () => {
168-
copyToClipboard(err.responseText)
167+
showToast(`${errorMessage}: ${err}`, 10000, () => {
168+
copyToClipboard(err)
169169
})
170170

171171
if (process.env.SUPPORTS_LOCAL_API && (this.backendPreference === 'invidious' && this.backendFallback)) {

src/renderer/views/Watch/Watch.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -919,8 +919,8 @@ export default defineComponent({
919919
.catch(err => {
920920
console.error(err)
921921
const errorMessage = this.$t('Invidious API Error (Click to copy)')
922-
showToast(`${errorMessage}: ${err.responseText}`, 10000, () => {
923-
copyToClipboard(err.responseText)
922+
showToast(`${errorMessage}: ${err}`, 10000, () => {
923+
copyToClipboard(err)
924924
})
925925
console.error(err)
926926
if (process.env.SUPPORTS_LOCAL_API && this.backendPreference === 'invidious' && this.backendFallback) {

yarn.lock

+61-61
Original file line numberDiff line numberDiff line change
@@ -5327,10 +5327,10 @@ jest-worker@^29.7.0:
53275327
merge-stream "^2.0.0"
53285328
supports-color "^8.0.0"
53295329

5330-
jintr@^1.1.0:
5331-
version "1.1.0"
5332-
resolved "https://registry.yarnpkg.com/jintr/-/jintr-1.1.0.tgz#223a3b07f5e03d410cec6e715c537c8ad1e714c3"
5333-
integrity sha512-Tu9wk3BpN2v+kb8yT6YBtue+/nbjeLFv4vvVC4PJ7oCidHKbifWhvORrAbQfxVIQZG+67am/mDagpiGSVtvrZg==
5330+
jintr@^2.0.0:
5331+
version "2.0.0"
5332+
resolved "https://registry.yarnpkg.com/jintr/-/jintr-2.0.0.tgz#bc8e78efc04743f5c67c625587ce4d1c94afad9a"
5333+
integrity sha512-RiVlevxttZ4eHEYB2dXKXDXluzHfRuw0DJQGsYuKCc5IvZj5/GbOakeqVX+Bar/G9kTty9xDJREcxukurkmYLA==
53345334
dependencies:
53355335
acorn "^8.8.0"
53365336

@@ -5483,59 +5483,59 @@ lazy-val@^1.0.4, lazy-val@^1.0.5:
54835483
resolved "https://registry.yarnpkg.com/lazy-val/-/lazy-val-1.0.5.tgz#6cf3b9f5bc31cee7ee3e369c0832b7583dcd923d"
54845484
integrity sha512-0/BnGCCfyUMkBpeDgWihanIAF9JmZhHBgUhEqzvf+adhNGLoP6TaiI5oF8oyb3I45P+PcnrqihSf01M0l0G5+Q==
54855485

5486-
lefthook-darwin-arm64@1.6.18:
5487-
version "1.6.18"
5488-
resolved "https://registry.yarnpkg.com/lefthook-darwin-arm64/-/lefthook-darwin-arm64-1.6.18.tgz#9908a442b1cedd3f2d1f01dd4c021e97815e1605"
5489-
integrity sha512-AkpsTeO7aLZIIy6CKQ7Chx8RltE8a9uItbwQWoeaCkIdzpV8TFjq7/Pw4F5CkoJ2315sHtB8k+VFkgipQMBw1w==
5490-
5491-
lefthook-darwin-x64@1.6.18:
5492-
version "1.6.18"
5493-
resolved "https://registry.yarnpkg.com/lefthook-darwin-x64/-/lefthook-darwin-x64-1.6.18.tgz#e26ed583764f80652f242e48a824c7fbefa3bbb5"
5494-
integrity sha512-qwKa+PaNIYjZ2PVrRRLq+HjNjQsjEItXN21byvSD89r7EYCULsIC8aW4H6aniOP2A6X1DIZ+djpg+3hNJ/94NA==
5495-
5496-
lefthook-freebsd-arm64@1.6.18:
5497-
version "1.6.18"
5498-
resolved "https://registry.yarnpkg.com/lefthook-freebsd-arm64/-/lefthook-freebsd-arm64-1.6.18.tgz#e4b5c86d178572cd562c52b0ce1f5af247de8383"
5499-
integrity sha512-UIOzQ+okwB7Ah9p8sNqomOiU6cPfmJnyW3HDPutRsdoHRD8udIap9d+ja4Kg4m/PkoYtkcLO78omANqAgA5wxQ==
5500-
5501-
lefthook-freebsd-x64@1.6.18:
5502-
version "1.6.18"
5503-
resolved "https://registry.yarnpkg.com/lefthook-freebsd-x64/-/lefthook-freebsd-x64-1.6.18.tgz#45bf1c30aabc6ef9b7e0d576798f5606d8a48b3c"
5504-
integrity sha512-UQANUgyNpaAh0+2/PjPFiJ7yd6aF15yyJxKZCXyna5cQF7VU8pSHu5tiDDquNpjToXOg+6TmiIAJKyfrrwTF3w==
5505-
5506-
lefthook-linux-arm64@1.6.18:
5507-
version "1.6.18"
5508-
resolved "https://registry.yarnpkg.com/lefthook-linux-arm64/-/lefthook-linux-arm64-1.6.18.tgz#50d03e8e11217aec005464ba4da16f6b76be6e6c"
5509-
integrity sha512-4erletIa2HKUgY17/1ROvndAj6xn/9wkqO2GhBT3C0vFwIv6ycy5wpFzXOwKRZpFYv7UacN7iXhAZSK+vSOZZg==
5510-
5511-
lefthook-linux-x64@1.6.18:
5512-
version "1.6.18"
5513-
resolved "https://registry.yarnpkg.com/lefthook-linux-x64/-/lefthook-linux-x64-1.6.18.tgz#b630496aebcc360b570f8807a50099350dc00eeb"
5514-
integrity sha512-l5SRqYMYygw9RjZncEg8uh29wShYN8kiYr53sp74DkntrlCttqWhLILBUlIr3fxH5s0ZyrmqUEjtMBryMk7b/g==
5515-
5516-
lefthook-windows-arm64@1.6.18:
5517-
version "1.6.18"
5518-
resolved "https://registry.yarnpkg.com/lefthook-windows-arm64/-/lefthook-windows-arm64-1.6.18.tgz#f18afb1f173c41d666d1780102d0a122a685553f"
5519-
integrity sha512-jeNBRoya3+mOEsKyT4wXf29Kng1nkJD7Uv/dqGBszoGMktGVNUFdIjWoxx6HSfhUssucs5pKRZpXSMgK/KCP+Q==
5520-
5521-
lefthook-windows-x64@1.6.18:
5522-
version "1.6.18"
5523-
resolved "https://registry.yarnpkg.com/lefthook-windows-x64/-/lefthook-windows-x64-1.6.18.tgz#9051e6d3f78ef0208521e31b200ad03c45f4d07d"
5524-
integrity sha512-iEG8PbFOwMqlpAgCiqzANTxutERjwlwMx6WF6HDGEYwFJSCJsvi06TehDxaPIFbhmLLYYlbVrfSBlttWGoN0dg==
5525-
5526-
lefthook@^1.6.18:
5527-
version "1.6.18"
5528-
resolved "https://registry.yarnpkg.com/lefthook/-/lefthook-1.6.18.tgz#ba15055f5a57c77ecda2c1e0cbdfde3c3fe317f5"
5529-
integrity sha512-Ftr/NkU1P1EsEyphsCqCX7lesGZA+QDXyUx4dS1RlSKB72xKtGW9VPjbGLK2kSQkONG5M+XYfbJkGA/r9NLTYQ==
5486+
lefthook-darwin-arm64@1.7.1:
5487+
version "1.7.1"
5488+
resolved "https://registry.yarnpkg.com/lefthook-darwin-arm64/-/lefthook-darwin-arm64-1.7.1.tgz#d6cbbfe6988a995ea32e4c92d6f99d54c2bbd440"
5489+
integrity sha512-WNM92Ix2rKmDKXzjlkVGCdzSkzzj3Z9D7yKi22KeOZ1iCXG1EtXEWmXO5M2g28FNb4cZI0r2DACNH5hz8JsfgA==
5490+
5491+
lefthook-darwin-x64@1.7.1:
5492+
version "1.7.1"
5493+
resolved "https://registry.yarnpkg.com/lefthook-darwin-x64/-/lefthook-darwin-x64-1.7.1.tgz#b2683a73da0a1ea86c6bc16be188743a955f12a7"
5494+
integrity sha512-SDPEciuP+eNzuKN8kx1x0dRzFElpO65on5q0raKgTbTvSOyVd3c7sMLGluz6OSM5qqEWEdEeA8QYKpdA56uXEw==
5495+
5496+
lefthook-freebsd-arm64@1.7.1:
5497+
version "1.7.1"
5498+
resolved "https://registry.yarnpkg.com/lefthook-freebsd-arm64/-/lefthook-freebsd-arm64-1.7.1.tgz#0cc51b81236bc0465fd8c1842a7cf63840d24d90"
5499+
integrity sha512-Ym2hhv6w7RWva3jfjtBOYck+GiaCx1JpnsOCf9tDYKFiV6ve/DoLrGQ+uI0UOqtiHN/bJzt5BrNXygfAubXaEg==
5500+
5501+
lefthook-freebsd-x64@1.7.1:
5502+
version "1.7.1"
5503+
resolved "https://registry.yarnpkg.com/lefthook-freebsd-x64/-/lefthook-freebsd-x64-1.7.1.tgz#47b2584a578dc9a28d185c94e3bd620b30a79c70"
5504+
integrity sha512-u9WYd+LDJr1A+VQV6lTe1a0yG0Ew9Wgeb9Ym9IKr9eLblrt6JNvW1x9u0e9OFteLwnqBCCT8omBY+NARcvqVvg==
5505+
5506+
lefthook-linux-arm64@1.7.1:
5507+
version "1.7.1"
5508+
resolved "https://registry.yarnpkg.com/lefthook-linux-arm64/-/lefthook-linux-arm64-1.7.1.tgz#4ce35be13553a78c0800ddc5771fb29848e39dee"
5509+
integrity sha512-Sgc+vHNnAbiJ5b1yMJsFn/rQ6eVQ0KLzuL0x0KJqFZvmffFenVmqABrFHKNDzhj8//KUbHdgCgLzqQAkAbCNcg==
5510+
5511+
lefthook-linux-x64@1.7.1:
5512+
version "1.7.1"
5513+
resolved "https://registry.yarnpkg.com/lefthook-linux-x64/-/lefthook-linux-x64-1.7.1.tgz#b757ff298724083c1fa06cee5fa05480e1f96e24"
5514+
integrity sha512-UDIM6Cf0aHrfvIxeVz05M7g+omLdyTQpmB2BqkeANpd/5+1LqRMOBOdtW+y3X47NKYL++iFh2EtIhlIqVBj6Kw==
5515+
5516+
lefthook-windows-arm64@1.7.1:
5517+
version "1.7.1"
5518+
resolved "https://registry.yarnpkg.com/lefthook-windows-arm64/-/lefthook-windows-arm64-1.7.1.tgz#45c5f9b2b0ab2d7260602037b98e156eacb43d1f"
5519+
integrity sha512-cz3vhIdmORA25YF4ZnPjDQwi/KQd8cB89q7jHEQ9sv+bpSOTXiauMOM9jvXbnvGrmFaR1qbLRTYpKQs6oyGdsA==
5520+
5521+
lefthook-windows-x64@1.7.1:
5522+
version "1.7.1"
5523+
resolved "https://registry.yarnpkg.com/lefthook-windows-x64/-/lefthook-windows-x64-1.7.1.tgz#9575fe23af4f6d7ef0c958431f20dd6ca5fe7162"
5524+
integrity sha512-Fa9HEkJczbD1zu6wBKP2rR738uRei5sb76d/DzgqW09ZBTwQl+6Oiyg3kicVU1N1X8bhZ/g1h49tcHrVtjU5ww==
5525+
5526+
lefthook@^1.7.1:
5527+
version "1.7.1"
5528+
resolved "https://registry.yarnpkg.com/lefthook/-/lefthook-1.7.1.tgz#c31f57dd42a28fed22376db519fb40c4c3064398"
5529+
integrity sha512-WNgjrPH4bYZyAYsiK7y7roQCQFIgqdCFxVCVe7ylAFD+QvW8tMceG19mR3GS2if1fGHC/cs+Z0r6PI52b/G1eA==
55305530
optionalDependencies:
5531-
lefthook-darwin-arm64 "1.6.18"
5532-
lefthook-darwin-x64 "1.6.18"
5533-
lefthook-freebsd-arm64 "1.6.18"
5534-
lefthook-freebsd-x64 "1.6.18"
5535-
lefthook-linux-arm64 "1.6.18"
5536-
lefthook-linux-x64 "1.6.18"
5537-
lefthook-windows-arm64 "1.6.18"
5538-
lefthook-windows-x64 "1.6.18"
5531+
lefthook-darwin-arm64 "1.7.1"
5532+
lefthook-darwin-x64 "1.7.1"
5533+
lefthook-freebsd-arm64 "1.7.1"
5534+
lefthook-freebsd-x64 "1.7.1"
5535+
lefthook-linux-arm64 "1.7.1"
5536+
lefthook-linux-x64 "1.7.1"
5537+
lefthook-windows-arm64 "1.7.1"
5538+
lefthook-windows-x64 "1.7.1"
55395539

55405540
levn@^0.4.1:
55415541
version "0.4.1"
@@ -8589,11 +8589,11 @@ yocto-queue@^1.0.0:
85898589
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.0.0.tgz#7f816433fb2cbc511ec8bf7d263c3b58a1a3c251"
85908590
integrity sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==
85918591

8592-
youtubei.js@^10.0.0:
8593-
version "10.0.0"
8594-
resolved "https://registry.yarnpkg.com/youtubei.js/-/youtubei.js-10.0.0.tgz#73ef7421302569c6cd6a163c12df393f13da480f"
8595-
integrity sha512-4Mmguxyw1TK1Co+gbx+41SFR55DR3OzMCdFW8OrSENjAjjOY9RDg7sKFbR+ZLsT3ga9AH1/nq+14KUItT9pPHQ==
8592+
youtubei.js@^10.1.0:
8593+
version "10.1.0"
8594+
resolved "https://registry.yarnpkg.com/youtubei.js/-/youtubei.js-10.1.0.tgz#38b3d95907441040df1e8031e04e0e6200ed52cf"
8595+
integrity sha512-MokZMAnpWH11VYvWuW6qjPiiPmgRl5rfDgPQOpif9qXcVHoVw1hi8ePuRSD0AZSZ+uvWGe8rvas2dzp+Jv5JKQ==
85968596
dependencies:
8597-
jintr "^1.1.0"
8597+
jintr "^2.0.0"
85988598
tslib "^2.5.0"
85998599
undici "^5.19.1"

0 commit comments

Comments
 (0)