Skip already cached songs on startup
This commit is contained in:
1 parent
fe60a4443d
commit
3122bc4bf9
1 file changed
+1
@@ -57,6 +57,7 @@ export function refreshMusicCache() {
|
|||||||
(async () => {
|
(async () => {
|
||||||
await prepareCacheDirectory();
|
await prepareCacheDirectory();
|
||||||
for (const videoId of playlistVideoIds) {
|
for (const videoId of playlistVideoIds) {
|
||||||
|
if (readySongs.has(videoId)) continue;
|
||||||
try {
|
try {
|
||||||
await downloadSong(videoId);
|
await downloadSong(videoId);
|
||||||
console.log(`Music cached: ${videoId}`);
|
console.log(`Music cached: ${videoId}`);
|
||||||
|
|||||||
Reference in new issue
Block a user