update existing playlist

This commit is contained in:
iou1name 2025-03-22 21:26:12 -04:00
parent 7b06f62fe7
commit 82fbae7942

View File

@ -31,7 +31,8 @@ async def load_playlist(path):
data = [(pid, line) for line in data] data = [(pid, line) for line in data]
stmt = await conn.prepare( stmt = await conn.prepare(
"INSERT INTO playlist_track (playlist_id, filepath) VALUES ($1, $2)") "INSERT INTO playlist_track (playlist_id, filepath) VALUES ($1, $2) "
"ON CONFLICT(playlist_id, filepath) DO NOTHING")
await stmt.executemany(data) await stmt.executemany(data)
print("Done. Loaded", len(data), "tracks") print("Done. Loaded", len(data), "tracks")