diff --git a/CONTROL/control b/CONTROL/control index be7990b..bdfe33b 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 0.12.0 +Version: 0.12.0-1 Architecture: mipsel Maintainer: af123@hummypkg.org.uk Depends: webif-channelicons(>=1.0.4-1),mongoose(>=3.0-7),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73-1),jim-cgi(>=0.7),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.10),hmt(>=1.1.12),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.1.2),smartmontools,tmenu(>=1.05) diff --git a/var/mongoose/cgi-bin/browse/rename.jim b/var/mongoose/cgi-bin/browse/rename.jim index d618e9f..76993a6 100755 --- a/var/mongoose/cgi-bin/browse/rename.jim +++ b/var/mongoose/cgi-bin/browse/rename.jim @@ -25,8 +25,11 @@ if {[file isdirectory $file]} { if {[catch { set new [string trim [cgi_get "rename_$attr"]] set old [$ts get $attr] - if {[string length $new] > 0 && $new ne $old} { - $ts set$attr $new + if {$new ne $old} { + if {$attr eq "guidance" || + [string length $new] > 0} { + $ts set$attr $new + } } } msg]} { puts "$attr: $msg" diff --git a/var/mongoose/lib/bin/auto b/var/mongoose/lib/bin/auto index 24e5ef6..7c15340 100755 --- a/var/mongoose/lib/bin/auto +++ b/var/mongoose/lib/bin/auto @@ -62,8 +62,8 @@ log "Media scan starting, DLNA server status: $dlnaok" 1 proc dsc {{size 0}} { set free [system diskfree] - # Required disk space is 10GiB + 4 times the file size. - set req $($size * 4 + 10 * 1073741824) + # Required disk space is 1GiB + 3 times the file size. + set req $($size * 3 + 1073741824) if {$free < $req} { log "Insufficient disk space. Require=$req, Free=$free" 1 @@ -134,6 +134,7 @@ proc do_shrink {ts} { return } set size [$ts size] + dsc $size startclock log " SHRINK: $file" 1 log " Estimate $perc% saving." 1 @@ -208,6 +209,7 @@ proc do_decrypt {ts} { } set size [$ts size] + dsc $size startclock log " DECRYPT: $rfile" 1 log " DLNA: $url" 1 @@ -267,6 +269,8 @@ proc do_mpg {ts} { return } + dsc [$ts size] + log " MPG: $file" 1 log " Converting..." 1 if {[catch { @@ -295,7 +299,7 @@ proc entries {dir callback} { log "$entry - in use\n" 1 continue } - dsc [file size "$dir/$entry"] + #dsc [file size "$dir/$entry"] $callback $ts } } @@ -327,9 +331,17 @@ proc scan {dir attr {force 0}} {{indent 0}} { return } - if {$force && [string match {\[*} [file tail $dir]]} { - log "Special folder, skipping." - set force 0 + if {[string match {\[*} [file tail $dir]]} { + # Special folder + file stat "$dir/" st + if {$st(dev) != $::rootdev} { + log "Special folder on different device, skipping." + return + } + if {$force} { + set force 0 + log "Special folder, overriding recursion." + } } # Recursion @@ -352,6 +364,9 @@ proc scan {dir attr {force 0}} {{indent 0}} { } set root [system mediaroot] +file stat "$root/" rootstat +set rootdev $rootstat(dev) +#log "Root device: $rootdev" 1 if {[llength $argv] > 0} { if {[lindex $argv 0] eq "test"} { set debug 1 } diff --git a/var/mongoose/lib/ts.class b/var/mongoose/lib/ts.class index 2775de0..491451e 100644 --- a/var/mongoose/lib/ts.class +++ b/var/mongoose/lib/ts.class @@ -180,7 +180,11 @@ ts method setsynopsis {newsynopsis} { ts method setguidance {newguidance} { if {[string length newguidance] > 48} { return } - exec /mod/bin/hmt "+setguidance=${newguidance}" $file + if {$newguidance eq ""} { + exec /mod/bin/hmt "-guidance" $file + } else { + exec /mod/bin/hmt "+setguidance=${newguidance}" $file + } } ts method setgenre {newgenre} {