fix(Accounts): CSV imports for user playlists & "Add Album to Playlist" functions not syncing to DB
This commit is contained in:
parent
61fa053fe0
commit
29dbff13b9
1 changed files with 3 additions and 1 deletions
|
|
@ -821,7 +821,7 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||||
await handlePublicStatus(playlist);
|
await handlePublicStatus(playlist);
|
||||||
// Update DB again with isPublic flag
|
// Update DB again with isPublic flag
|
||||||
await db.performTransaction('user_playlists', 'readwrite', (store) => store.put(playlist));
|
await db.performTransaction('user_playlists', 'readwrite', (store) => store.put(playlist));
|
||||||
syncManager.syncUserPlaylist(playlist, 'create');
|
await syncManager.syncUserPlaylist(playlist, 'create');
|
||||||
ui.renderLibraryPage();
|
ui.renderLibraryPage();
|
||||||
modal.classList.remove('active');
|
modal.classList.remove('active');
|
||||||
});
|
});
|
||||||
|
|
@ -1077,6 +1077,8 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await db.addTracksToPlaylist(playlistId, tracks);
|
await db.addTracksToPlaylist(playlistId, tracks);
|
||||||
|
const updatedPlaylist = await db.getPlaylist(playlistId);
|
||||||
|
await syncManager.syncUserPlaylist(updatedPlaylist, 'update');
|
||||||
const { showNotification } = await loadDownloadsModule();
|
const { showNotification } = await loadDownloadsModule();
|
||||||
showNotification(`Added ${tracks.length} tracks to playlist.`);
|
showNotification(`Added ${tracks.length} tracks to playlist.`);
|
||||||
closeModal();
|
closeModal();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue