From 96835dd7037a5770bb6dc5be634d44d9dcfb364c Mon Sep 17 00:00:00 2001 From: RikThePixel <63408969+Rikthepixel@users.noreply.github.com> Date: Sun, 25 Jun 2023 16:40:03 +0200 Subject: [PATCH 01/92] Fix Hide Channel Subscribers setting still displaying subscribers if changed from a secondary window (#3504) (#3692) * Fix Hide Channel Subscribers setting still displaying subscribers if changed from a secondary window (#3504) * Revert naming change subscriptionCountText to channelSubCountText * Use `!=` instead of `!==` for `subscriberCount` in ft-list-channel * Set subscriberCount to null if `data.subscribers` is null in ft-list-channel.js Co-authored-by: absidue <48293849+absidue@users.noreply.github.com> --------- Co-authored-by: absidue <48293849+absidue@users.noreply.github.com> --- .../ft-list-channel/ft-list-channel.js | 13 +++--------- .../ft-list-channel/ft-list-channel.vue | 2 +- .../ft-subscribe-button.js | 6 +++++- src/renderer/views/Channel/Channel.js | 8 ++----- src/renderer/views/Channel/Channel.vue | 2 +- src/renderer/views/Watch/Watch.js | 21 +++++-------------- 6 files changed, 17 insertions(+), 35 deletions(-) diff --git a/src/renderer/components/ft-list-channel/ft-list-channel.js b/src/renderer/components/ft-list-channel/ft-list-channel.js index bd5409241cc47..db21d867c1bd8 100644 --- a/src/renderer/components/ft-list-channel/ft-list-channel.js +++ b/src/renderer/components/ft-list-channel/ft-list-channel.js @@ -53,11 +53,8 @@ export default defineComponent({ this.channelName = this.data.name this.id = this.data.id - if (this.hideChannelSubscriptions || this.data.subscribers == null) { - this.subscriberCount = null - } else { - this.subscriberCount = this.data.subscribers.replace(/ subscriber(s)?/, '') - } + this.subscriberCount = this.data.subscribers != null ? this.data.subscribers.replace(/ subscriber(s)?/, '') : null + if (this.data.videos === null) { this.videoCount = 0 } else { @@ -79,11 +76,7 @@ export default defineComponent({ this.channelName = this.data.author this.id = this.data.authorId - if (this.hideChannelSubscriptions) { - this.subscriberCount = null - } else { - this.subscriberCount = formatNumber(this.data.subCount) - } + this.subscriberCount = formatNumber(this.data.subCount) this.videoCount = formatNumber(this.data.videoCount) this.description = this.data.description } diff --git a/src/renderer/components/ft-list-channel/ft-list-channel.vue b/src/renderer/components/ft-list-channel/ft-list-channel.vue index 6ac9f8ed835dd..cfc85205005e1 100644 --- a/src/renderer/components/ft-list-channel/ft-list-channel.vue +++ b/src/renderer/components/ft-list-channel/ft-list-channel.vue @@ -26,7 +26,7 @@
{{ formattedSubCount }}
diff --git a/src/renderer/views/Watch/Watch.js b/src/renderer/views/Watch/Watch.js
index 70481b1054855..3e79d34f865e7 100644
--- a/src/renderer/views/Watch/Watch.js
+++ b/src/renderer/views/Watch/Watch.js
@@ -357,18 +357,10 @@ export default defineComponent({
this.isUpcoming = !!result.basic_info.is_upcoming
this.isLiveContent = !!result.basic_info.is_live_content
- if (!this.hideChannelSubscriptions) {
- const subCount = parseLocalSubscriberCount(result.secondary_info.owner.subscriber_count.text)
+ const subCount = parseLocalSubscriberCount(result.secondary_info.owner.subscriber_count.text)
- if (!isNaN(subCount)) {
- if (subCount >= 10000) {
- this.channelSubscriptionCountText = formatNumber(subCount, { notation: 'compact' })
- } else {
- this.channelSubscriptionCountText = formatNumber(subCount)
- }
- } else {
- this.channelSubscriptionCountText = ''
- }
+ if (!isNaN(subCount)) {
+ this.channelSubscriptionCountText = formatNumber(subCount, subCount >= 10000 ? { notation: 'compact' } : undefined)
} else {
this.channelSubscriptionCountText = ''
}
@@ -720,6 +712,7 @@ export default defineComponent({
this.videoTitle = result.title
this.videoViewCount = result.viewCount
+ this.channelSubscriptionCountText = result.subCountText || 'FT-0'
if (this.hideVideoLikesAndDislikes) {
this.videoLikeCount = null
this.videoDislikeCount = null
@@ -727,11 +720,7 @@ export default defineComponent({
this.videoLikeCount = result.likeCount
this.videoDislikeCount = result.dislikeCount
}
- if (this.hideChannelSubscriptions) {
- this.channelSubscriptionCountText = ''
- } else {
- this.channelSubscriptionCountText = result.subCountText || 'FT-0'
- }
+
this.channelId = result.authorId
this.channelName = result.author
const channelThumb = result.authorThumbnails[1]
From 427ec794c4724855274661eacb0ad8d5474df6db Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 26 Jun 2023 19:32:00 +0200
Subject: [PATCH 02/92] Bump lefthook from 1.4.2 to 1.4.3 (#3707)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.4.2 to 1.4.3.
- [Release notes](https://github.com/evilmartians/lefthook/releases)
- [Changelog](https://github.com/evilmartians/lefthook/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evilmartians/lefthook/compare/v1.4.2...v1.4.3)
---
updated-dependencies:
- dependency-name: lefthook
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
@@ -223,7 +225,10 @@
@click="chooseScreenshotFolder"
/>
{{ $t('Settings.Player Settings.Screenshot.File Name Label') }}
-
, , , , ,
export function stripHTML(value) {
- return value.replaceAll(/(<(?!br|\/?[bis]|img>)([^>]+)>)/gi, '')
+ return value.replaceAll(/(<(?!br|\/?[abis]|img>)([^>]+)>)/gi, '')
}
/**
From afffbf69fc67270f06df2083d9720587946258d0 Mon Sep 17 00:00:00 2001
From: absidue <48293849+absidue@users.noreply.github.com>
Date: Wed, 28 Jun 2023 08:15:44 +0200
Subject: [PATCH 19/92] Fix reading instances from the Invidious fallback file
(#3712)
---
src/renderer/store/modules/invidious.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/renderer/store/modules/invidious.js b/src/renderer/store/modules/invidious.js
index 0f88ab53a9930..fd6fc272588a1 100644
--- a/src/renderer/store/modules/invidious.js
+++ b/src/renderer/store/modules/invidious.js
@@ -45,7 +45,7 @@ const actions = {
const filePath = `${fileLocation}${fileName}`
if (!process.env.IS_ELECTRON || await pathExists(filePath)) {
console.warn('reading static file for invidious instances')
- const fileData = process.env.IS_ELECTRON ? JSON.parse(await fs.readFile(filePath)) : await (await fetch(createWebURL(filePath))).text()
+ const fileData = process.env.IS_ELECTRON ? await fs.readFile(filePath, 'utf8') : await (await fetch(createWebURL(filePath))).text()
instances = JSON.parse(fileData).filter(e => {
return process.env.IS_ELECTRON || e.cors
}).map(e => {
From fc7c252722169a382ac82ddac67e861b9095dd24 Mon Sep 17 00:00:00 2001
From: Jaden <97551221+jadenet@users.noreply.github.com>
Date: Fri, 30 Jun 2023 12:18:43 -0400
Subject: [PATCH 20/92] Use playlist thumbnail provided by YT (#3710)
* Use playlist thumbnail provided by YT from Local API
* Use correct thumbnails for playlist page
* Fix playlistThumbnail not giving correct value
* Update youtubei.js
* Update package.json
Co-authored-by: PikachuEXE
Co-authored-by: PikachuEXE