If DLNA download fails completely, defer rather than error

This commit is contained in:
HummyPkg 2017-06-14 20:38:42 +01:00
parent 87440918e0
commit 7e0de7889e
1 changed files with 6 additions and 0 deletions

View File

@ -99,6 +99,12 @@ proc ::decrypt::dequeue {q ts} {
# Release the helper lock once finished.
if {$helper} { system dlnahelper -release }
if {![file exists "$tmp/$bfile"]} {
log " $file - Download failed." 0
system endop decrypt
return {"DEFER" "File download failed"}
}
if {[file size $file] != [file size "$tmp/$bfile"]} {
log " $file - File size mismatch." 0
file tdelete "$tmp/$bfile"