forked from hummypkg/webif
various updates
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1768 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
d08475daaa
commit
13af77c1e4
@ -1,7 +1,7 @@
|
||||
Package: webif
|
||||
Priority: optional
|
||||
Section: web
|
||||
Version: 1.0.7-12
|
||||
Version: 1.0.8
|
||||
Architecture: mipsel
|
||||
Maintainer: af123@hummypkg.org.uk
|
||||
Depends: webif-channelicons(>=1.1.8),mongoose(>=3.0-9),jim(>=0.74-4),jim-oo,jim-sqlite3(>=0.74-1),jim-cgi(>=0.7),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.13),hmt(>=1.1.14),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.2.3),smartmontools,tmenu(>=1.05),ffmpeg,id3v2,multienv(>=1.6)
|
||||
|
@ -40,6 +40,7 @@ set pkgdev [$settings pkgdev]
|
||||
set notoolbar [$settings notoolbar]
|
||||
set nomobile [$settings nomobile]
|
||||
set nohelplinks [$settings nohelplinks]
|
||||
set notwitfeed [$settings notwitfeed]
|
||||
set nounwatchedcount [$settings nounwatchedcount]
|
||||
set chanchangenc [$settings chanchangenc]
|
||||
set xepghours [$settings xepghours]
|
||||
@ -86,6 +87,7 @@ handle_int_update pkgdev $pkgdev "Development Package Display"
|
||||
handle_int_update notoolbar $notoolbar "Disable toolbar"
|
||||
handle_int_update nomobile $nomobile "Disable mobile link"
|
||||
handle_int_update nohelplinks $nohelplinks "Disable help links"
|
||||
handle_int_update notwitfeed $notwitfeed "Disable twitter feed ticker"
|
||||
handle_int_update chanchangenc $chanchangenc \
|
||||
"Disable channel change confirmation"
|
||||
handle_int_update nounwatchedcount $nounwatchedcount "Disable unwatched count"
|
||||
@ -176,6 +178,7 @@ setting_toggle "HTTPS web server?" "https" \
|
||||
setting_toggle "Slide-down toolbar?" "notoolbar" $(!$notoolbar) 1
|
||||
setting_toggle "Mobile link on main page?" "nomobile" $(!$nomobile) 1
|
||||
setting_toggle "Help links on main page?" "nohelplinks" $(!$nohelplinks) 1
|
||||
setting_toggle "Twitter feed ticker on main page?" "notwitfeed" $(!$notwitfeed) 1
|
||||
setting_toggle "Unwatched count on folders?" "nounwatchedcount" $(!$nounwatchedcount) 1
|
||||
if {[system pkginst ir]} {
|
||||
setting_toggle "Disable channel change confirmation?" \
|
||||
|
@ -60,7 +60,12 @@ $(document).ready(function() {
|
||||
$('#pkgtabs').tabs('option',
|
||||
'active', tswitch);
|
||||
else
|
||||
{
|
||||
$('.ui-tabs-panel')
|
||||
.html("<img src=/img/loading.gif>" +
|
||||
"Loading data... Please wait...");
|
||||
$('#pkgtabs').tabs('load', tswitch);
|
||||
}
|
||||
tswitch = false;
|
||||
$('button.va').enable();
|
||||
}
|
||||
|
@ -71,10 +71,25 @@ menuitem "Diagnostics" "/img/diagnostics.png" \
|
||||
|
||||
eval_plugins menu
|
||||
|
||||
if {[$settings notwitfeed] == 0} {
|
||||
|
||||
puts {
|
||||
<script type="text/javascript" async=true
|
||||
src='http://twitcker.com/ticker/HummyPkg.js?open=true&container=own-container&own-container=twitfeed&speed=3&count=5&background=cccccc'>
|
||||
</script>
|
||||
|
||||
<div id=twitfeed
|
||||
style="clear: both; padding-top: 3em; width: 100%">
|
||||
</div>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if {[$settings nohelplinks] == 0} {
|
||||
|
||||
menuitem "-reset" "" ""
|
||||
puts {</div><div style="clear: both; padding-top: 3em">}
|
||||
puts {</div><div style="clear: both; padding-top: 2em">}
|
||||
|
||||
menuitem "hummy.tv<br>Forums" "/img/forum.png" \
|
||||
"http://hummy.tv/ target=_blank" 0 100 \
|
||||
|
@ -18,7 +18,13 @@ if {[file exists $logfile] && [file size $logfile] > 2097152} {
|
||||
file delete $logfile
|
||||
}
|
||||
|
||||
set logfd [open "/mod/tmp/auto.log" "a+"]
|
||||
if {[lindex $argv 0] eq "-d"} {
|
||||
set argv [lrange $argv 1 end]
|
||||
set loglevel 2
|
||||
set logfd stdout
|
||||
} else {
|
||||
set logfd [open "/mod/tmp/auto.log" "a+"]
|
||||
}
|
||||
proc log {msg {level 1}} {
|
||||
if {$level > $::loglevel} return
|
||||
puts $::logfd "[\
|
||||
@ -502,7 +508,7 @@ proc expire {dir} {
|
||||
entries $dir do_expire
|
||||
}
|
||||
|
||||
proc scan {dir attr {force 0}} {{indent 0}} {
|
||||
proc scan {dir attr {force 0} {recurse 1}} {{indent 0}} {
|
||||
global dustbin
|
||||
|
||||
incr indent 2
|
||||
@ -511,6 +517,7 @@ proc scan {dir attr {force 0}} {{indent 0}} {
|
||||
|
||||
if {$dir eq $dustbin} {
|
||||
log "Dustbin, skipping." 2
|
||||
incr indent -2
|
||||
return
|
||||
}
|
||||
|
||||
@ -519,6 +526,7 @@ proc scan {dir attr {force 0}} {{indent 0}} {
|
||||
file stat "$dir/" st
|
||||
if {$st(dev) != $::rootdev} {
|
||||
log "Special folder on different device, skipping." 2
|
||||
incr indent -2
|
||||
return
|
||||
}
|
||||
if {$force} {
|
||||
@ -538,7 +546,7 @@ proc scan {dir attr {force 0}} {{indent 0}} {
|
||||
if {$force || [file exists "$dir/.auto$attr"]} { $attr $dir }
|
||||
|
||||
foreach entry [readdir -nocomplain $dir] {
|
||||
if {[file isdirectory "$dir/$entry"]} {
|
||||
if {$recurse && [file isdirectory "$dir/$entry"]} {
|
||||
scan "$dir/$entry" $attr $force
|
||||
}
|
||||
}
|
||||
@ -548,12 +556,50 @@ proc scan {dir attr {force 0}} {{indent 0}} {
|
||||
incr indent -2
|
||||
}
|
||||
|
||||
proc scanup {dir flag} {
|
||||
global root
|
||||
|
||||
set rl [string length $root]
|
||||
while {[string length $dir] >= $rl} {
|
||||
if {[string match {\[*} [file tail $dir]]} {
|
||||
return -1
|
||||
}
|
||||
if {[file exists "$dir/.auto${flag}r"]} {
|
||||
log "scanup: Found ${flag}r ($dir)" 2
|
||||
return 1
|
||||
}
|
||||
set dir [file dirname $dir]
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
proc scansingle {dirs} {
|
||||
global modules root
|
||||
|
||||
foreach dir $dirs {
|
||||
log "Scanning single directory '$dir'"
|
||||
foreach arg $modules {
|
||||
set st [clock milliseconds]
|
||||
set sup [scanup $dir $arg]
|
||||
if {$sup == -1} {
|
||||
log "Encountered special directory."
|
||||
break
|
||||
}
|
||||
scan $dir $arg $sup 0
|
||||
log "$arg scan completed in [elapsed $st] seconds."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set root [system mediaroot]
|
||||
file stat "$root/" rootstat
|
||||
set rootdev $rootstat(dev)
|
||||
log "Root device: $rootdev" 2
|
||||
|
||||
if {[llength $argv] > 0} {
|
||||
if {[lindex $argv 0] eq "-single"} {
|
||||
scansingle [lrange $argv 1 end]
|
||||
} elseif {[llength $argv] > 0} {
|
||||
set loglevel 2
|
||||
foreach arg $argv { scan $root $arg }
|
||||
} else {
|
||||
|
@ -25,6 +25,7 @@ class settings {
|
||||
notoolbar 0
|
||||
nomobile 0
|
||||
nohelplinks 0
|
||||
notwitfeed 0
|
||||
nounwatchedcount 0
|
||||
xepghours 4
|
||||
genrededup 0
|
||||
@ -167,6 +168,10 @@ settings method nohelplinks {{val -1}} {
|
||||
return [$self _nval_setting nohelplinks $val]
|
||||
}
|
||||
|
||||
settings method notwitfeed {{val -1}} {
|
||||
return [$self _nval_setting notwitfeed $val]
|
||||
}
|
||||
|
||||
settings method nounwatchedcount {{val -1}} {
|
||||
return [$self _nval_setting nounwatchedcount $val]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user