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