write ytmusic stuffs to cache
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,3 +4,4 @@ private/
|
||||
package-lock.json
|
||||
.env
|
||||
ytmusic_cache
|
||||
.vscode
|
||||
|
||||
2
index.js
2
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
|
||||
|
||||
Reference in New Issue
Block a user