do not persist downloaders until they have a hashlist

pull/5/head
Zlatin Balevsky 2019-06-12 21:02:01 +01:00
parent 6a01d97a8d
commit 04ceaba514
1 changed files with 1 additions and 1 deletions

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