fix: unfinished downloads disappear from the downloads list after app gets killed

Author: InfinityLoop1308
Adapted for NewPipe from a fork's this commit 1cf059ce5e
This commit is contained in:
whistlingwoods 2025-08-17 20:41:03 +05:30
parent 9bc8139b8c
commit 9282cce6a8
2 changed files with 50 additions and 13 deletions

View file

@ -661,7 +661,8 @@ public class DownloadMission extends Mission {
* @return {@code true}, if storage is invalid and cannot be used
*/
public boolean hasInvalidStorage() {
return errCode == ERROR_PROGRESS_LOST || storage == null || !storage.existsAsFile();
// Don't consider ERROR_PROGRESS_LOST as invalid storage - it can be recovered
return storage == null || !storage.existsAsFile();
}
/**