Skip to content

Commit d67a304

Browse files
committed
Merge branch 'development'
2 parents 5d159c1 + 4462a71 commit d67a304

File tree

42 files changed

+540
-382
lines changed

Some content is hidden

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

42 files changed

+540
-382
lines changed

_scripts/webpack.renderer.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,9 @@ const config = {
150150
resolve: {
151151
alias: {
152152
vue$: 'vue/dist/vue.runtime.esm.js',
153+
'portal-vue$': 'portal-vue/dist/portal-vue.esm.js',
153154

154-
'DB_HANDLERS_ELECTRON_RENDERER_OR_WEB$': path.resolve(__dirname, '../src/datastores/handlers/electron.js'),
155+
DB_HANDLERS_ELECTRON_RENDERER_OR_WEB$: path.resolve(__dirname, '../src/datastores/handlers/electron.js'),
155156

156157
'youtubei.js$': 'youtubei.js/web',
157158

_scripts/webpack.web.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,9 @@ const config = {
159159
resolve: {
160160
alias: {
161161
vue$: 'vue/dist/vue.runtime.esm.js',
162+
'portal-vue$': 'portal-vue/dist/portal-vue.esm.js',
162163

163-
'DB_HANDLERS_ELECTRON_RENDERER_OR_WEB$': path.resolve(__dirname, '../src/datastores/handlers/web.js'),
164+
DB_HANDLERS_ELECTRON_RENDERER_OR_WEB$: path.resolve(__dirname, '../src/datastores/handlers/web.js'),
164165

165166
// video.js's mpd-parser uses @xmldom/xmldom so that it can support both node and web browsers
166167
// As FreeTube only runs in electron and web browsers, we can use the native DOMParser class, instead of the "polyfill"

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "freetube",
33
"productName": "FreeTube",
44
"description": "A private YouTube client",
5-
"version": "0.21.0",
5+
"version": "0.21.1",
66
"license": "AGPL-3.0-or-later",
77
"main": "./dist/main.js",
88
"private": true,
@@ -61,9 +61,9 @@
6161
"@seald-io/nedb": "^4.0.4",
6262
"@silvermine/videojs-quality-selector": "^1.3.1",
6363
"autolinker": "^4.0.0",
64-
"electron-context-menu": "^4.0.0",
64+
"electron-context-menu": "^4.0.1",
6565
"lodash.debounce": "^4.0.8",
66-
"marked": "^13.0.0",
66+
"marked": "^13.0.2",
6767
"path-browserify": "^1.0.1",
6868
"portal-vue": "^2.1.7",
6969
"process": "^0.11.10",
@@ -79,7 +79,7 @@
7979
"vue-observe-visibility": "^1.0.0",
8080
"vue-router": "^3.6.5",
8181
"vuex": "^3.6.2",
82-
"youtubei.js": "^10.0.0"
82+
"youtubei.js": "^10.1.0"
8383
},
8484
"devDependencies": {
8585
"@babel/core": "^7.24.7",
@@ -92,7 +92,7 @@
9292
"copy-webpack-plugin": "^12.0.2",
9393
"css-loader": "^7.1.2",
9494
"css-minimizer-webpack-plugin": "^7.0.0",
95-
"electron": "^31.0.1",
95+
"electron": "^31.1.0",
9696
"electron-builder": "^24.13.3",
9797
"eslint": "^8.57.0",
9898
"eslint-config-prettier": "^9.1.0",
@@ -101,33 +101,33 @@
101101
"eslint-plugin-jsonc": "^2.16.0",
102102
"eslint-plugin-n": "^17.9.0",
103103
"eslint-plugin-prettier": "^5.1.3",
104-
"eslint-plugin-promise": "^6.2.0",
104+
"eslint-plugin-promise": "^6.4.0",
105105
"eslint-plugin-unicorn": "^54.0.0",
106-
"eslint-plugin-vue": "^9.26.0",
107-
"eslint-plugin-vuejs-accessibility": "^2.3.0",
106+
"eslint-plugin-vue": "^9.27.0",
107+
"eslint-plugin-vuejs-accessibility": "^2.3.1",
108108
"eslint-plugin-yml": "^1.14.0",
109109
"html-webpack-plugin": "^5.6.0",
110110
"js-yaml": "^4.1.0",
111111
"json-minimizer-webpack-plugin": "^5.0.0",
112-
"lefthook": "^1.6.16",
112+
"lefthook": "^1.7.1",
113113
"mini-css-extract-plugin": "^2.9.0",
114-
"npm-run-all2": "^6.2.0",
115-
"postcss": "^8.4.38",
114+
"npm-run-all2": "^6.2.2",
115+
"postcss": "^8.4.39",
116116
"postcss-scss": "^4.0.9",
117117
"prettier": "^2.8.8",
118-
"rimraf": "^5.0.7",
119-
"sass": "^1.77.5",
118+
"rimraf": "^5.0.8",
119+
"sass": "^1.77.6",
120120
"sass-loader": "^14.2.1",
121121
"stylelint": "^16.6.1",
122122
"stylelint-config-sass-guidelines": "^11.1.0",
123-
"stylelint-config-standard": "^36.0.0",
123+
"stylelint-config-standard": "^36.0.1",
124124
"stylelint-high-performance-animation": "^1.10.0",
125125
"stylelint-use-logical-spec": "^5.0.1",
126126
"tree-kill": "1.2.2",
127127
"vue-devtools": "^5.1.4",
128128
"vue-eslint-parser": "^9.4.3",
129129
"vue-loader": "^15.10.0",
130-
"webpack": "^5.92.0",
130+
"webpack": "^5.92.1",
131131
"webpack-cli": "^5.1.4",
132132
"webpack-dev-server": "^5.0.4",
133133
"yaml-eslint-parser": "^1.2.3"

src/main/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,8 @@ function runApp() {
409409

410410
if (url.startsWith('https://www.youtube.com/youtubei/')) {
411411
requestHeaders['Sec-Fetch-Site'] = 'same-origin'
412+
requestHeaders['Sec-Fetch-Mode'] = 'same-origin'
413+
requestHeaders['X-Youtube-Bootstrap-Logged-In'] = 'false'
412414
} else {
413415
// YouTube doesn't send the Content-Type header for the media requests, so we shouldn't either
414416
delete requestHeaders['Content-Type']
@@ -974,6 +976,13 @@ function runApp() {
974976

975977
try {
976978
const contents = await asyncFs.readFile(filePath)
979+
980+
// Probably a corrupted/broken cache entry, pretend it's absent
981+
// A valid entry should be a few KB large
982+
if (contents.byteLength < 500) {
983+
return undefined
984+
}
985+
977986
return contents.buffer
978987
} catch (e) {
979988
console.error(e)

src/renderer/components/subscription-settings/subscription-settings.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
</div>
3636
<div class="switchColumn">
3737
<ft-toggle-switch
38-
:label="$t('Settings.Subscription Settings.Avoid Accidental Unsubscription')"
38+
:label="$t('Settings.Subscription Settings.Confirm Before Unsubscribing')"
3939
:default-value="unsubscriptionPopupStatus"
4040
:compact="true"
4141
@change="updateUnsubscriptionPopupStatus"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,8 @@ export default defineComponent({
323323
}).catch((err) => {
324324
console.error(err)
325325
const errorMessage = this.$t('Invidious API Error (Click to copy)')
326-
showToast(`${errorMessage}: ${err.responseText}`, 10000, () => {
327-
copyToClipboard(err.responseText)
326+
showToast(`${errorMessage}: ${err}`, 10000, () => {
327+
copyToClipboard(err)
328328
})
329329
switch (failedAttempts) {
330330
case 0:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,8 @@ export default defineComponent({
324324
}).catch((err) => {
325325
console.error(err)
326326
const errorMessage = this.$t('Invidious API Error (Click to copy)')
327-
showToast(`${errorMessage}: ${err.responseText}`, 10000, () => {
328-
copyToClipboard(err.responseText)
327+
showToast(`${errorMessage}: ${err}`, 10000, () => {
328+
copyToClipboard(err)
329329
})
330330
switch (failedAttempts) {
331331
case 0:

src/renderer/components/top-nav/top-nav.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
inline-size: 100%;
2222
z-index: 4;
2323

24-
@media only screen and (width >= 961px) {
24+
@media only screen and (width >= 1122px) {
2525
display: grid;
26-
grid-template-columns: 1fr 440px 1fr;
26+
grid-template-columns: 1fr 720px 1fr;
2727
}
2828

2929
@include top-nav-is-colored {
@@ -190,7 +190,7 @@
190190

191191
.middle {
192192
flex: 1;
193-
max-inline-size: 440px;
193+
max-inline-size: 720px;
194194

195195
.searchContainer {
196196
align-items: center;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default defineComponent({
6363
}
6464
}
6565
},
66-
mounted: function () {
66+
created: function () {
6767
this.currentIndex = this.currentChapterIndex
6868
},
6969
methods: {

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export default defineComponent({
133133
return this.$store.getters.getActiveProfile.subscriptions
134134
}
135135
},
136-
mounted: function () {
136+
created: function () {
137137
// region No comment detection
138138
// For videos without any comment (comment disabled?)
139139
// e.g. https://youtu.be/8NBSwDEf8a8
@@ -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
})

0 commit comments

Comments
 (0)