Skip to content

Commit cda62cf

Browse files
absiduePillowytuba
authored andcommitted
Clean up Voice Boost detection after YouTube.js update (FreeTubeApp#8822)
1 parent e765e47 commit cda62cf

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

src/renderer/helpers/api/local.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { ClientType, Constants, Innertube, Misc, Mixins, Parser, Platform, UniversalCache, Utils, YT, YTNodes } from 'youtubei.js'
2-
import { FormatXTags } from '../../../../node_modules/youtubei.js/dist/protos/generated/misc/common'
32
import Autolinker from 'autolinker'
43
import { SEARCH_CHAR_LIMIT } from '../../../constants'
54

@@ -2180,16 +2179,3 @@ export async function getLocalCommunityPostComments(postId, channelId) {
21802179

21812180
return await innertube.getPostComments(postId, channelId)
21822181
}
2183-
2184-
/**
2185-
* @param {Misc.Format} format
2186-
*/
2187-
export function formatHasVoiceBoostTag(format) {
2188-
if (!format.xtags) {
2189-
return undefined
2190-
}
2191-
2192-
const xtags = FormatXTags.decode(Utils.base64ToU8(format.xtags)).xtags
2193-
2194-
return xtags.some(tag => tag.key === 'vb' && tag.value === '1')
2195-
}

src/renderer/views/Watch/Watch.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import {
2323
showToast
2424
} from '../../helpers/utils'
2525
import {
26-
formatHasVoiceBoostTag,
2726
getLocalVideoInfo,
2827
mapLocalLegacyFormat,
2928
parseLocalSubscriberCount,
@@ -1575,7 +1574,7 @@ export default defineComponent({
15751574
audioSampleRate: format.audio_sample_rate,
15761575
audioChannels: format.audio_channels,
15771576
isDrc: format.is_drc,
1578-
isVoiceBoost: formatHasVoiceBoostTag(format),
1577+
isVoiceBoost: format.is_vb,
15791578
isOriginal: format.is_original,
15801579
isDubbed: format.is_dubbed,
15811580
isAutoDubbed: format.is_auto_dubbed,

0 commit comments

Comments
 (0)