[O] Only init when not already exist
This commit is contained in:
+13
-7
@@ -217,10 +217,16 @@ export const getPlaylist = async (playlistId: number | string) => {
|
|||||||
return plData.data
|
return plData.data
|
||||||
}
|
}
|
||||||
|
|
||||||
await startImport("13555799996")
|
// Check if there are any playlists, if not, import default ones
|
||||||
await startImport("https://music.163.com/playlist?id=14348145982")
|
(async () => {
|
||||||
await startImport("https://music.163.com/playlist?id=14392963638")
|
const count = await db.collection('playlists').countDocuments()
|
||||||
await startImport("https://music.163.com/playlist?id=580208139")
|
if (count === 0) {
|
||||||
await startImport("https://music.163.com/playlist?id=17404030548")
|
console.log("No playlists found. Importing default playlists...")
|
||||||
|
await startImport("13555799996")
|
||||||
// TODO: Filter out non-Japanese songs
|
await startImport("17463338036")
|
||||||
|
await startImport("14348145982")
|
||||||
|
await startImport("14392963638")
|
||||||
|
await startImport("580208139")
|
||||||
|
await startImport("17404030548")
|
||||||
|
}
|
||||||
|
})()
|
||||||
|
|||||||
Reference in New Issue
Block a user