add catch to decrypt wget

git-svn-id: file:///root/webif/svn/pkg/webif/trunk@3516 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2017-01-12 10:16:30 +00:00
parent c21504b43f
commit 5104dbd387
3 changed files with 9 additions and 3 deletions

View File

@ -1,7 +1,7 @@
Package: webif
Priority: optional
Section: web
Version: 1.3.5-5
Version: 1.3.5-6
Architecture: mipsel
Maintainer: af123@hpkg.tv
Depends: tcpfix,webif-channelicons(>=1.1.24),lighttpd(>=1.4.39-1),jim(>=0.77),jim-oo(>=0.77),jim-sqlite3(>=0.76),jim-cgi(>=0.7-1),jim-binary(>=0.76),service-control(>=2.3),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.5),hmt(>=2.0.10),ssmtp,cron-daemon(>=1.18.3-3),at(>=3.1.18),anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.1.9),webif-charts(>=1.2-1),stripts(>=1.2.5-3),tmenu(>=1.21-2),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7),hwctl,nugget(>=0.95),sqlite3(>=3.15.1)

View File

@ -44,7 +44,9 @@ proc ::decrypt::dequeue {q ts} {
}
# Check that the file is not already decrypted by analysing it.
set anencd [exec /mod/bin/stripts -qE $rfile]
if {[catch {set anencd [exec /mod/bin/stripts -qE $rfile]} msg]} {
return [list "DEFER" "plugin failure - $msg"]
}
if {$anencd != "1"} {
exec /mod/webif/lib/bin/fixencflags $file
return {"OK"
@ -80,7 +82,9 @@ proc ::decrypt::dequeue {q ts} {
::auto::startclock
log " DECRYPT: $rfile" 0
log " DLNA: $url" 0
exec wget -O "$tmp/$bfile" $url
if {[catch {exec wget -O "$tmp/$bfile" $url} msg opts]} {
::auto::log "Wget error - $msg - $opts"
}
# Release the helper lock once finished.
if {$helper} { system dlnahelper -release }

View File

@ -54,12 +54,14 @@ proc ::mp3::dequeue {q ts} {
}
if {[system pkginst id3v2]} {
catch {
log [exec /mod/bin/id3v2 \
--song "[$ts get title]" \
--comment "[$ts get synopsis]" \
--album "[$ts get channel_name]" \
--year "[clock format [$ts get start] -format {%Y}]" \
"$tmp/mp3.mp3"] 0
}
}
# Move the MP3 into the local directory