diff --git a/NUXT/pages/watch.vue b/NUXT/pages/watch.vue index 63be806..ceeb560 100644 --- a/NUXT/pages/watch.vue +++ b/NUXT/pages/watch.vue @@ -343,8 +343,9 @@ export default { this.video = result; //--- Content Stuff ---// - this.likes = result.metadata.likes.toLocaleString(); - this.interactions[0].value = result.metadata.likes.toLocaleString(); + // NOTE: extractor likes are broken, using RYD likes instead + // this.likes = result.metadata.likes.toLocaleString(); + // this.interactions[0].value = result.metadata.likes.toLocaleString(); this.loaded = true; this.recommends = result.renderedData.recommendations; console.log("recommendations:", this.recommends); @@ -362,7 +363,9 @@ export default { }); this.$youtube.getReturnYoutubeDislike(this.$route.query.v, (data) => { + this.likes = data.likes.toLocaleString(); this.dislikes = data.dislikes.toLocaleString(); + this.interactions[0].value = data.likes.toLocaleString(); this.interactions[1].value = data.dislikes.toLocaleString(); }); }, diff --git a/NUXT/plugins/innertube.js b/NUXT/plugins/innertube.js index 027ffd9..8c4011d 100644 --- a/NUXT/plugins/innertube.js +++ b/NUXT/plugins/innertube.js @@ -352,17 +352,19 @@ class Innertube { isPrivate: details.isPrivate, viewCount: details.viewCount, lengthSeconds: details.lengthSeconds, - likes: parseInt( - vidMetadata.contents - .find((content) => content.slimVideoActionBarRenderer) - .slimVideoActionBarRenderer.buttons.find( - (button) => button.slimMetadataToggleButtonRenderer.isLike - ) - .slimMetadataToggleButtonRenderer.button.toggleButtonRenderer.defaultText.accessibility.accessibilityData.label.replace( - /\D/g, - "" - ) - ), // Yes. I know. + // likes: parseInt( + // vidMetadata.contents + // .find((content) => content.slimVideoActionBarRenderer) + // .slimVideoActionBarRenderer.buttons.find( + // (button) => button.slimMetadataToggleButtonRenderer.isLike + // ) + // .slimMetadataToggleButtonRenderer.button.toggleButtonRenderer.defaultText.accessibility.accessibilityData.label.replace( + // /\D/g, + // "" + // ) + // ), // Yes. I know. + likes: "broken", + // NOTE: likes are pulled from RYD for now untill extractor is fixed }, renderedData: { description: responseNext.engagementPanels diff --git a/NUXT/plugins/youtube.js b/NUXT/plugins/youtube.js index 77fb265..d7e1057 100644 --- a/NUXT/plugins/youtube.js +++ b/NUXT/plugins/youtube.js @@ -92,6 +92,7 @@ const innertubeModule = { try { return await InnertubeAPI.VidInfoAsync(id); } catch (error) { + console.error(error); } }, @@ -113,8 +114,7 @@ const innertubeModule = { try { const response = await InnertubeAPI.getChannelAsync(url); return response.data; - } catch (error) { - } + } catch (error) {} }, // It just works™ @@ -177,8 +177,7 @@ const innertubeModule = { try { const response = await InnertubeAPI.getSearchAsync(query); return response.contents.sectionListRenderer; - } catch (err) { - } + } catch (err) {} }, async saveApiStats(query, url) {