diff --git a/CONTROL/control b/CONTROL/control index ae803f6..1dd2eda 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 0.8.5-1 +Version: 0.8.6 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-1),jim-oo,jim-pack,service-control,busybox(>=1.19.3-1),lsof,epg(>=1.0.8),hmt(>=1.1.2),ssmtp,anacron diff --git a/var/mongoose/cgi-bin/browse.jim b/var/mongoose/cgi-bin/browse.jim index 5785612..9010e10 100755 --- a/var/mongoose/cgi-bin/browse.jim +++ b/var/mongoose/cgi-bin/browse.jim @@ -8,6 +8,7 @@ puts "Content-Type: text/html" puts "" set nicesplice [system pkginst nicesplice] +set flatten [system pkginst flatten] set ignore {.nts .thm .hmt .hmi} set include {.ts .avi .mpg .mpeg .wmv .mkv .mp3 .mp4 .mov} @@ -15,8 +16,10 @@ set include {.ts .avi .mpg .mpeg .wmv .mkv .mp3 .mp4 .mov} cgi_input #cgi_dump -#set env(REQUEST_URI) '' -#set _cgi(dir) "/media/My Video/\[Don't Die Young\]" +if {![dict exists env REQUEST_URI]} { + set env(REQUEST_URI) '' + set _cgi(dir) "/media/My Video/" +} if {![dict exists $env QUERY_STRING]} { set env(QUERY_STRING) "root" } @@ -28,6 +31,8 @@ if {$order eq "-"} { } proc directory {file bfile} { + global flatten + regsub -all " +" $bfile "" tbfile puts "
" puts "" puts "$bfile " - puts " + + set noflat 0 + if $flatten { + if {[string match {\[*\]} [file tail $file]]} { set noflat 1 } + if {[file exists "$file/.noflatten"]} { + set noflat 1 + } + + if $noflat { + puts "\"No-flatten\"" + } + } + + puts -nonewline " - + " + + puts "
" puts "
" @@ -196,6 +220,13 @@ puts {