mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2025-10-03 09:49:21 +02:00
Apply review suggestions
This commit is contained in:
parent
9282cce6a8
commit
21e24c9e34
1 changed files with 3 additions and 6 deletions
|
@ -169,7 +169,7 @@ public class DownloadManager {
|
|||
// DON'T delete missions with storage issues - try to recover them
|
||||
if (mis.hasInvalidStorage() && mis.errCode != ERROR_PROGRESS_LOST) {
|
||||
// Only delete if it's truly unrecoverable (not just progress lost)
|
||||
if (mis.storage == null && mis.errCode != ERROR_PROGRESS_LOST) {
|
||||
if (mis.storage == null) {
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
sub.delete();
|
||||
continue;
|
||||
|
@ -612,12 +612,9 @@ public class DownloadManager {
|
|||
|
||||
// Don't hide recoverable missions
|
||||
remove.removeIf(mission -> {
|
||||
if (mission instanceof DownloadMission) {
|
||||
DownloadMission dm = (DownloadMission) mission;
|
||||
if (canRecoverMission(dm)) {
|
||||
if (mission instanceof DownloadMission dm && canRecoverMission(dm)) {
|
||||
return false; // Don't remove recoverable missions
|
||||
}
|
||||
}
|
||||
return pending.remove(mission) || finished.remove(mission);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue