From 02c4d214fa6ea8505e2a6df868802ef35aa9303d Mon Sep 17 00:00:00 2001 From: rainbow napkin Date: Sat, 1 Nov 2025 08:09:54 -0400 Subject: [PATCH] Started work on re-implementation of youtube raw-link reloading. --- src/utils/media/yanker.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils/media/yanker.js b/src/utils/media/yanker.js index c5109ab..76df22e 100644 --- a/src/utils/media/yanker.js +++ b/src/utils/media/yanker.js @@ -67,7 +67,6 @@ module.exports.yankMedia = async function(url, title){ module.exports.refreshRawLink = async function(mediaObj){ switch(mediaObj.type){ case 'yt': - console.log("lolnope"); /* We're skipping this one for now... //Scrape expiration from query strings const expires = mediaObj.rawLink.match(/expire=([0-9]+)/); @@ -80,14 +79,16 @@ module.exports.refreshRawLink = async function(mediaObj){ return null; } + */ + //Re-fetch media metadata metadata = await ytdlpUtil.fetchYoutubeMetadata(mediaObj.id); + //Refresh media rawlink from metadata mediaObj.rawLink = metadata[0].rawLink; //return media object return mediaObj; - */ } //Return null to tell the calling function there is no refresh required for this media type