Open hajduakos opened 2 years ago
When dragging and dropping files, I observed the loading screen to say "240 loaded of 238". I think this inconsistency comes from the fact that the total is given by the number of files (numFiles): https://github.com/erik/derive/blob/ed9d902ad0a0fb1e69d35aaf16d7cb1e60e71129/src/ui.js#L130
numFiles
but numLoaded is incremented for each track (and not for each file): https://github.com/erik/derive/blob/ed9d902ad0a0fb1e69d35aaf16d7cb1e60e71129/src/ui.js#L89-L96
numLoaded
So if there are files with multiple tracks, this inconsistency can occur that the number of loaded is more than the number of total.
Perhaps a quick fix would be to move modal.addSuccess(); out of the loop?
modal.addSuccess();
Nice catch! Thanks for digging into the cause as well.
When dragging and dropping files, I observed the loading screen to say "240 loaded of 238". I think this inconsistency comes from the fact that the total is given by the number of files (
numFiles
): https://github.com/erik/derive/blob/ed9d902ad0a0fb1e69d35aaf16d7cb1e60e71129/src/ui.js#L130but
numLoaded
is incremented for each track (and not for each file): https://github.com/erik/derive/blob/ed9d902ad0a0fb1e69d35aaf16d7cb1e60e71129/src/ui.js#L89-L96So if there are files with multiple tracks, this inconsistency can occur that the number of loaded is more than the number of total.
Perhaps a quick fix would be to move
modal.addSuccess();
out of the loop?