fix: reduce playlist creation wait time after Spotify import
Cap Navidrome scan poll from 3 min to 60s, shrink post-scan buffer from 5s to 3s, and error fallback from 30s to 20s — playlist now appears sooner after downloads complete. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
8f8c38fcf0
commit
7b92cf7444
1 file changed
+3
-3
@@ -357,14 +357,14 @@ async function _pollAndCreatePlaylist(jobId, tracks, playlistName) {
|
||||
await api('startScan', '');
|
||||
toast('🔍 Navidrome scannt Bibliothek…');
|
||||
await new Promise(r => setTimeout(r, 3000));
|
||||
for (let i = 0; i < 90; i++) {
|
||||
for (let i = 0; i < 30; i++) {
|
||||
await new Promise(r => setTimeout(r, 2000));
|
||||
const st = await api('getScanStatus', '');
|
||||
if (!st?.scanStatus?.scanning) break;
|
||||
}
|
||||
await new Promise(r => setTimeout(r, 5000));
|
||||
await new Promise(r => setTimeout(r, 3000));
|
||||
} catch {
|
||||
await new Promise(r => setTimeout(r, 30000));
|
||||
await new Promise(r => setTimeout(r, 20000));
|
||||
}
|
||||
|
||||
await _createNdPlaylist(tracks, playlistName);
|
||||
|
||||
Reference in new issue
Block a user