Fix downloads sometimes running in notification only (#7589)

This commit is contained in:
ByteHamster 2025-01-01 20:46:49 +01:00 committed by GitHub
parent fe7d13f53c
commit 419faed791
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -250,6 +250,9 @@ public class MainActivity extends CastEnabledActivity {
status = DownloadStatus.STATE_QUEUED;
progress = 0;
}
if (updatedEpisodes.containsKey(downloadUrl) && status == DownloadStatus.STATE_COMPLETED) {
continue; // In case of a duplicate, prefer running/queued over completed
}
updatedEpisodes.put(downloadUrl, new DownloadStatus(status, progress));
}
DownloadServiceInterface.get().setCurrentDownloads(updatedEpisodes);