Skip to content

Commit

Permalink
Merge commit 'f0c7ace33c792e9657a4a81524b9d6ddc120d49f' into development
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md
#	package.json
  • Loading branch information
MarmadileManteater committed Oct 30, 2024
2 parents 1b94710 + f0c7ace commit b29c34e
Show file tree
Hide file tree
Showing 79 changed files with 1,314 additions and 3,358 deletions.
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "freetube",
"productName": "FreeTube",
"description": "A private YouTube client",
"version": "0.21.3",
"version": "0.22.0",
"license": "AGPL-3.0-or-later",
"main": "./dist/main.js",
"private": true,
Expand Down Expand Up @@ -42,7 +42,7 @@
"lint-json": "eslint --config eslint.config.mjs \"./static/**/*.json\"",
"lint-style": "stylelint \"**/*.{css,scss}\"",
"lint-style-fix": "stylelint --fix \"**/*.{css,scss}\"",
"lint-yml": "eslint --ext .yml,.yaml ./",
"lint-yml": "eslint --config eslint.config.mjs \"./**/*.yml\" \"./**/*.yaml\"",
"pack": "run-p pack:main pack:renderer && node _scripts/injectAllowedPaths.mjs",
"pack:main": "webpack --mode=production --node-env=production --config _scripts/webpack.main.config.js",
"pack:renderer": "webpack --mode=production --node-env=production --config _scripts/webpack.renderer.config.js",
Expand All @@ -66,11 +66,11 @@
"core-js": "^3.35.1",
"electron-context-menu": "^4.0.4",
"lodash.debounce": "^4.0.8",
"marked": "^14.1.2",
"marked": "^14.1.3",
"path-browserify": "^1.0.1",
"portal-vue": "^2.1.7",
"process": "^0.11.10",
"shaka-player": "^4.11.7",
"shaka-player": "^4.11.10",
"swiper": "^11.1.14",
"vue": "^2.7.16",
"vue-i18n": "^8.28.2",
Expand All @@ -85,15 +85,15 @@
"@babel/plugin-transform-class-properties": "^7.25.7",
"@babel/preset-env": "^7.25.8",
"@double-great/stylelint-a11y": "^3.0.2",
"@eslint/compat": "^1.2.0",
"@eslint/compat": "^1.2.1",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.12.0",
"@eslint/js": "^9.13.0",
"@intlify/eslint-plugin-vue-i18n": "^3.0.0",
"babel-loader": "^9.2.1",
"copy-webpack-plugin": "^12.0.2",
"css-loader": "^7.1.2",
"css-minimizer-webpack-plugin": "^7.0.0",
"electron": "^32.2.0",
"electron": "^32.2.2",
"electron-builder": "^25.1.8",
"eslint": "^9.11.1",
"eslint-config-prettier": "^9.1.0",
Expand All @@ -104,23 +104,23 @@
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-promise": "^7.1.0",
"eslint-plugin-unicorn": "^56.0.0",
"eslint-plugin-vue": "^9.29.0",
"eslint-plugin-vue": "^9.29.1",
"eslint-plugin-vuejs-accessibility": "^2.4.1",
"eslint-plugin-yml": "^1.14.0",
"globals": "^15.11.0",
"html-webpack-plugin": "^5.6.0",
"html-webpack-plugin": "^5.6.2",
"js-yaml": "^4.1.0",
"json-minimizer-webpack-plugin": "^5.0.0",
"lefthook": "^1.7.18",
"lefthook": "^1.7.22",
"mini-css-extract-plugin": "^2.9.1",
"npm-run-all2": "^6.2.3",
"npm-run-all2": "^6.2.4",
"postcss": "^8.4.47",
"postcss-scss": "^4.0.9",
"prettier": "^2.8.8",
"rimraf": "^6.0.1",
"string-width": "4.2.3",
"strip-ansi": "6.0.1",
"sass": "^1.79.5",
"sass": "^1.80.3",
"sass-loader": "^16.0.2",
"stylelint": "^16.10.0",
"stylelint-config-sass-guidelines": "^12.1.0",
Expand Down
4 changes: 3 additions & 1 deletion src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,9 @@ function runApp() {
webSecurity: false,
backgroundThrottling: false,
contextIsolation: false
}
},
minWidth: 340,
minHeight: 380
}

const newWindow = new BrowserWindow(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
so we want to make it black as it defaults to transparent
*/
background-color: #000;

/*
Fixes the seek bar thumbnails causing a horizontal scroll bar
to appear after exiting full screen and full window.
*/
overflow-x: hidden;
}

.player {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default defineComponent({
data: function () {
return {
isLoading: true,
alreadyLoadedRemotely: false,
postList: [],
errorChannels: [],
attemptedFetch: false,
Expand Down Expand Up @@ -97,7 +98,9 @@ export default defineComponent({
},

subscriptionCacheReady() {
this.loadPostsFromCacheSometimes()
if (!this.alreadyLoadedRemotely) {
this.loadPostsFromCacheSometimes()
}
},
},
mounted: async function () {
Expand All @@ -115,6 +118,7 @@ export default defineComponent({
return
}

this.alreadyLoadedRemotely = true
this.loadPostsForSubscriptionsFromRemote()
this.$store.commit('setSubscriptionForCommunityPostsFirstAutoFetchRun')
},
Expand Down Expand Up @@ -231,9 +235,7 @@ export default defineComponent({
this.errorChannels.push(channel)
return []
}
entries.forEach(post => {
post.authorId = channel.id
})

return entries
} catch (err) {
console.error(err)
Expand All @@ -252,9 +254,6 @@ export default defineComponent({
getChannelPostsInvidious: function (channel) {
return new Promise((resolve, reject) => {
invidiousGetCommunityPosts(channel.id).then(result => {
result.posts.forEach(post => {
post.authorId = channel.id
})
resolve(result.posts)
}).catch((err) => {
console.error(err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default defineComponent({
data: function () {
return {
isLoading: true,
alreadyLoadedRemotely: false,
videoList: [],
errorChannels: [],
attemptedFetch: false,
Expand Down Expand Up @@ -107,7 +108,9 @@ export default defineComponent({
},

subscriptionCacheReady() {
this.loadVideosFromCacheSometimes()
if (!this.alreadyLoadedRemotely) {
this.loadVideosFromCacheSometimes()
}
},
},
mounted: async function () {
Expand All @@ -125,6 +128,7 @@ export default defineComponent({
return
}

this.alreadyLoadedRemotely = true
this.loadVideosForSubscriptionsFromRemote()
this.$store.commit('setSubscriptionForLiveStreamsFirstAutoFetchRun')
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default defineComponent({
data: function () {
return {
isLoading: true,
alreadyLoadedRemotely: false,
videoList: [],
errorChannels: [],
attemptedFetch: false,
Expand Down Expand Up @@ -101,7 +102,9 @@ export default defineComponent({
},

subscriptionCacheReady() {
this.loadVideosFromCacheSometimes()
if (!this.alreadyLoadedRemotely) {
this.loadVideosFromCacheSometimes()
}
},
},
mounted: async function () {
Expand All @@ -119,6 +122,7 @@ export default defineComponent({
return
}

this.alreadyLoadedRemotely = true
this.loadVideosForSubscriptionsFromRemote()
this.$store.commit('setSubscriptionForShortsFirstAutoFetchRun')
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default defineComponent({
data: function () {
return {
isLoading: true,
alreadyLoadedRemotely: false,
videoList: [],
errorChannels: [],
attemptedFetch: false,
Expand Down Expand Up @@ -111,7 +112,9 @@ export default defineComponent({
},

subscriptionCacheReady() {
this.loadVideosFromCacheSometimes()
if (!this.alreadyLoadedRemotely) {
this.loadVideosFromCacheSometimes()
}
},
},
mounted: async function () {
Expand All @@ -129,6 +132,7 @@ export default defineComponent({
return
}

this.alreadyLoadedRemotely = true
this.loadVideosForSubscriptionsFromRemote()
this.$store.commit('setSubscriptionForVideosFirstAutoFetchRun')
},
Expand Down
1 change: 1 addition & 0 deletions src/renderer/helpers/api/invidious.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ function parseInvidiousCommunityData(data) {
voteCount: data.likeCount,
postContent: parseInvidiousCommunityAttachments(data.attachment),
commentCount: data?.replyCount ?? 0, // https://github.com/iv-org/invidious/pull/3635/
authorId: data.authorId,
author: data.author,
type: 'community'
}
Expand Down
1 change: 1 addition & 0 deletions src/renderer/helpers/api/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -1488,6 +1488,7 @@ function parseLocalCommunityPost(post) {
voteCount: post.vote_count ? parseLocalSubscriberCount(post.vote_count.text) : 0,
postContent: parseLocalAttachment(post.attachment),
commentCount: replyCount,
authorId: post.author.id,
author: post.author.name,
type: 'community'
}
Expand Down
9 changes: 0 additions & 9 deletions src/renderer/views/Channel/Channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -1697,9 +1697,6 @@ export default defineComponent({
this.communityContinuationData = communityTab.has_continuation ? communityTab : null

if (this.latestCommunityPosts.length > 0) {
this.latestCommunityPosts.forEach(post => {
post.authorId = this.id
})
this.updateSubscriptionPostsCacheByChannel({
channelId: this.id,
// create a copy so that we only cache the first page
Expand Down Expand Up @@ -1761,9 +1758,6 @@ export default defineComponent({
this.communityContinuationData = continuation

if (this.isSubscribedInAnyProfile && !more && this.latestCommunityPosts.length > 0) {
this.latestCommunityPosts.forEach(post => {
post.authorId = this.id
})
this.updateSubscriptionPostsCacheByChannel({
channelId: this.id,
// create a copy so that we only cache the first page
Expand Down Expand Up @@ -2009,9 +2003,6 @@ export default defineComponent({
})
}

this.latestCommunityPosts.forEach(post => {
post.authorId = this.id
})
this.updateSubscriptionPostsCacheByChannel({
channelId: this.id,
posts: [...this.latestCommunityPosts]
Expand Down
3 changes: 1 addition & 2 deletions src/renderer/views/Hashtag/Hashtag.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,12 @@ export default defineComponent({
},
},
watch: {
$route() {
'$route.params.hashtag'() {
this.resetData()
this.getHashtag()
}
},
mounted: function() {
this.resetData()
this.getHashtag()
},
methods: {
Expand Down
6 changes: 5 additions & 1 deletion src/renderer/views/Subscriptions/Subscriptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ export default defineComponent({
} else {
// Restore currentTab
const lastCurrentTabId = sessionStorage.getItem('Subscriptions/currentTab')
if (lastCurrentTabId !== null) { this.changeTab(lastCurrentTabId) }
if (lastCurrentTabId !== null) {
this.changeTab(lastCurrentTabId)
} else if (!this.visibleTabs.includes(this.currentTab)) {
this.currentTab = this.visibleTabs[0]
}
}
},
methods: {
Expand Down
3 changes: 1 addition & 2 deletions src/renderer/views/Watch/Watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -719,9 +719,8 @@ export default defineComponent({
})

downloadLinks.push(...captionLinks)

this.downloadLinks = downloadLinks
}
this.downloadLinks = downloadLinks
} else {
// video might be region locked or something else. This leads to no formats being available
showToast(
Expand Down
13 changes: 0 additions & 13 deletions static/locales/af.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ Channels:
Search bar placeholder: ''
Count: ''
Empty: ''
Unsubscribe: ''
Unsubscribed: ''
Unsubscribe Prompt: ''
Trending:
Trending: ''
Expand All @@ -152,8 +150,6 @@ Feed:
Playlists: ''
User Playlists:
Your Playlists: ''
Playlist Message: ''
Your saved videos are empty. Click on the save button on the corner of a video to have it listed here: ''
You have no playlists. Click on the create new playlist button to create a new one.: ''
Empty Search Message: ''
Search bar placeholder: ''
Expand Down Expand Up @@ -261,7 +257,6 @@ History:
Settings:
# On Settings Page
Settings: ''
Expand All Settings Sections: ''
Sort Settings Sections (A-Z): ''
The app needs to restart for changes to take effect. Restart and apply change?: ''
General Settings:
Expand Down Expand Up @@ -454,7 +449,6 @@ Settings:
Subscription Settings: ''
Hide Videos on Watch: ''
Fetch Feeds from RSS: ''
Manage Subscriptions: ''
Fetch Automatically: ''
Only Show Latest Video for Each Channel: ''
Confirm Before Unsubscribing: ''
Expand Down Expand Up @@ -510,7 +504,6 @@ Settings:
Subscription File: ''
History File: ''
Playlist File: ''
Check for Legacy Subscriptions: ''
Export Subscriptions: ''
Export FreeTube: ''
Export YouTube: ''
Expand Down Expand Up @@ -867,9 +860,6 @@ Playlist:
#& About
Playlist: ''
View Full Playlist: ''
Videos: ''
View: ''
Views: ''
Last Updated On: ''
Sort By:
Sort By: ''
Expand All @@ -884,7 +874,6 @@ Playlist:
# On Video Watch Page
#* Published
#& Views
Toggle Theatre Mode: ''
Change Format:
Change Media Formats: ''
Use Dash Formats: ''
Expand Down Expand Up @@ -987,9 +976,7 @@ Invidious API Error (Click to copy): ''
Falling back to Invidious API: ''
Falling back to Local API: ''
This video is unavailable because of missing formats. This can happen due to country unavailability.: ''
Subscriptions have not yet been implemented: ''
Unknown YouTube url type, cannot be opened in app: ''
Hashtags have not yet been implemented, try again later: ''
Loop is now disabled: ''
Loop is now enabled: ''
Shuffle is now disabled: ''
Expand Down
Loading

0 comments on commit b29c34e

Please sign in to comment.