mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-08-02 22:30:40 +00:00
Delete dangling exports
This commit is contained in:
parent
f36e9588cb
commit
ab6d7669d7
1 changed files with 12 additions and 0 deletions
|
@ -456,6 +456,18 @@ class StateDownloads {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
val currentDownloads = _downloaded.getItems().map { it.url }.toHashSet();
|
||||||
|
val exporting = _exporting.findItems { !currentDownloads.contains(it.videoLocal.url) };
|
||||||
|
for (export in exporting)
|
||||||
|
_exporting.delete(export);
|
||||||
|
}
|
||||||
|
catch(ex: Throwable) {
|
||||||
|
Logger.e(TAG, "Failed to delete dangling export:", ex);
|
||||||
|
UIDialogs.toast("Failed to delete dangling export:\n" + ex);
|
||||||
|
}
|
||||||
|
|
||||||
return Pair(totalDeletedCount, totalDeleted);
|
return Pair(totalDeletedCount, totalDeleted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue