From 7e0de7889ed57998752eb01aa4ca34d20ffe4417 Mon Sep 17 00:00:00 2001 From: HummyPkg Date: Wed, 14 Jun 2017 20:38:42 +0100 Subject: [PATCH] If DLNA download fails completely, defer rather than error --- webif/lib/auto/plugin/decrypt/queue.hook | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webif/lib/auto/plugin/decrypt/queue.hook b/webif/lib/auto/plugin/decrypt/queue.hook index 765f5ac..775fd9d 100644 --- a/webif/lib/auto/plugin/decrypt/queue.hook +++ b/webif/lib/auto/plugin/decrypt/queue.hook @@ -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"