diff --git a/CONTROL/control b/CONTROL/control index fc66faa..9e78f77 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,10 +1,10 @@ Package: webif Priority: optional Section: web -Version: 0.7.7 +Version: 0.7.8 Architecture: mipsel Maintainer: af123@hummypkg.org.uk -Depends: mongoose(>=3.0-2),jim(>=0.71-1),jim-sqlite3(>=0.71-1),jim-cgi(>=0.4),jim-oo,jim-pack,service-control,busybox(>=1.18.3-1),lsof,epg(>=1.0.6),hmt(>=1.0.6),ssmtp +Depends: mongoose(>=3.0-2),jim(>=0.71-1),jim-sqlite3(>=0.71-1),jim-cgi(>=0.4),jim-oo,jim-pack,service-control,busybox(>=1.18.3-1),lsof,epg(>=1.0.7),hmt(>=1.0.8),ssmtp Replaces: af123-webif Conflicts: af123-webif Suggests: ffmpeg,webif-iphone diff --git a/var/mongoose/cgi-bin/browse/delete.jim b/var/mongoose/cgi-bin/browse/delete.jim index bfc8ace..cd9e145 100755 --- a/var/mongoose/cgi-bin/browse/delete.jim +++ b/var/mongoose/cgi-bin/browse/delete.jim @@ -23,5 +23,6 @@ if {$type eq "ts"} { } file delete $file +file delete "[file rootname $file].hmi" puts "Successfully deleted $file." diff --git a/var/mongoose/lib/system.class b/var/mongoose/lib/system.class index 21b5f11..483ca92 100644 --- a/var/mongoose/lib/system.class +++ b/var/mongoose/lib/system.class @@ -36,6 +36,14 @@ proc {system pkgver} {{pkg webif}} { return [lrange [split [exec opkg list-installed $pkg] " "] 2 end] } +proc {system mediaroot} {} { + switch [system model] { + HDR { return "/media/My Video" } + HD { return "/media/drive1/Video" } + } + return "" +} + proc {system diskspace} {} { switch [system model] { HDR { set part /mnt/hd2 } diff --git a/var/mongoose/lib/ts.class b/var/mongoose/lib/ts.class index 36b1be4..44fa316 100644 --- a/var/mongoose/lib/ts.class +++ b/var/mongoose/lib/ts.class @@ -164,5 +164,22 @@ proc {ts renamegroup} {from to} { #puts "rename $f \"${dir}/${to}${ext}\"" file rename $f "${dir}/${to}${ext}" } + + exec /mod/bin/hmt "+setfilename=$to" "${dir}/${to}.hmt" + + set ndir [file normalize $dir] + + if {![catch {set db [sqlite3.open $::dmsfile]}]} { + set x [lindex [$db query {select mediaid from tblMedia + where localUrl = '%s'} [file normalize $from]] 0] + lassign $x key mediaid + if {$mediaid ne ""} { + $db query {update tblMedia set localUrl = '%s' + where mediaid = %s} "${ndir}/{$to}.ts" $mediaid + $db query {update tblMedia set title = '%s' + where mediaid = %s} "{$to}.ts" $mediaid + } + $db close + } }