This commit is contained in:
Forrest 2026-07-29 15:28:11 -04:00
parent d205277cdd
commit d1cab09a4f
9 changed files with 850 additions and 140 deletions

View file

@ -279,6 +279,12 @@ class DownloadController extends StateNotifier<DownloadState> {
return;
}
// Honor a removal that happened mid-download: don't resurrect the entry.
if (!state.byId.containsKey(song.id)) {
await File(tmpPath).delete().catchError((_) => File(tmpPath));
return;
}
final tmp = File(tmpPath);
await tmp.rename(finalPath);
final size = await File(finalPath).length();