From 227cde48d9cfcaddae03e8df04a84c5cfee4a2c3 Mon Sep 17 00:00:00 2001 From: oddbyte Date: Mon, 19 Jan 2026 14:47:10 -0500 Subject: [PATCH] write ytmusic stuffs to cache --- .gitignore | 1 + index.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 221cf10..f3c3544 100755 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ private/ package-lock.json .env ytmusic_cache +.vscode diff --git a/index.js b/index.js index 9dd8dc1..c9fa8eb 100755 --- a/index.js +++ b/index.js @@ -88,6 +88,8 @@ async function updateSongs() { if (typeof playlistSongs == 'object') { // For each song that youtube moosic has yelled back at us, give them individually to populateThumbnails() await Promise.all(playlistSongs.map(async song => await populateThumbnails(song))); + // Write all of this to cache + fs.writeFileSync(path.join(baseDir + 'ytmusic_cache'), JSON.stringify({playlistSongs, thumbnails})); } else { // like legit this shouldnt even be possible