do not persist downloaders until they have a hashlist

This commit is contained in:
Zlatin Balevsky
2019-06-12 21:02:01 +01:00
parent 6a01d97a8d
commit 04ceaba514

View File

@@ -107,7 +107,7 @@ public class DownloadManager {
File downloadsFile = new File(home,"downloads.json")
downloadsFile.withPrintWriter { writer ->
downloaders.each { downloader ->
if (!downloader.cancelled) {
if (!downloader.cancelled && downloader.infoHash.hashList != null) {
def json = [:]
json.file = Base64.encode(DataUtil.encodei18nString(downloader.file.getAbsolutePath()))
json.length = downloader.length