forked from hummypkg/webif
updates
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1946 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
de2035e1e0
commit
61b09db04b
@ -1,7 +1,7 @@
|
||||
Package: webif
|
||||
Priority: optional
|
||||
Section: web
|
||||
Version: 1.0.14-4
|
||||
Version: 1.0.14-5
|
||||
Architecture: mipsel
|
||||
Maintainer: af123@hummypkg.org.uk
|
||||
Depends: webif-channelicons(>=1.1.11),lighttpd(>=1.4.35-2),jim(>=0.75-1),jim-oo,jim-sqlite3(>=0.75),jim-cgi(>=0.7),jim-binary(>=0.75),service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.13),hmt(>=1.1.19),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2-1),stripts(>=1.2.5-3),smartmontools,tmenu(>=1.08),ffmpeg,id3v2,multienv(>=1.6),mongoose
|
||||
|
@ -91,10 +91,10 @@ foreach tw [$db query {
|
||||
src=/images/421_1_00_CH_Title_2R_Arrow.png>
|
||||
view
|
||||
</a></td>"
|
||||
puts "<td>$ehs</th>"
|
||||
puts "<td>$ehs</td>"
|
||||
puts "</tr>"
|
||||
puts "<tr id=mchan_$tsIdx class=mchan style=\"display: none\">
|
||||
<td colspan=5>"
|
||||
<td colspan=9>"
|
||||
puts "<table style=\"margin-left: 5em\">"
|
||||
puts "<tr>
|
||||
<th colspan=3>Channel</th>
|
||||
@ -107,15 +107,13 @@ foreach tw [$db query {
|
||||
set name [string range $name 1 end]
|
||||
set prv [string range $prv 3 end]
|
||||
altrow
|
||||
puts "<td class=va>"
|
||||
puts "[epg channelicon $name 50]</td>
|
||||
<td>$lcn</td><td>$name</td>"
|
||||
puts "</td><td>"
|
||||
puts $prv
|
||||
puts "</td><td>"
|
||||
puts $auth
|
||||
puts "</td>"
|
||||
puts "</tr>"
|
||||
puts "
|
||||
<td class=va>[epg channelicon $name 50]</td>
|
||||
<td>$lcn</td><td>$name</td>
|
||||
<td>$prv</td>
|
||||
<td>$auth</td>
|
||||
</tr>
|
||||
"
|
||||
}
|
||||
puts "</table>"
|
||||
puts "</td></tr>"
|
||||
|
@ -24,20 +24,27 @@ if {[catch {set pid [exec pgrep -n humaxtv]}]} {
|
||||
exit
|
||||
}
|
||||
|
||||
set exts {.ts .mkv .mp4}
|
||||
|
||||
proc get_data {} {
|
||||
global pid
|
||||
global pid exts
|
||||
|
||||
set ret {}
|
||||
if {[catch {set data \
|
||||
[exec /mod/bin/lsof -p $pid | grep Video | fgrep .ts]} ]} {
|
||||
[exec /mod/bin/lsof -p $pid | grep Video]} msg]} {
|
||||
set ret {}
|
||||
} else {
|
||||
foreach line [split $data "\n"] {
|
||||
regsub -all -- {[[:space:]]+} $line " " line
|
||||
regsub -- { \([^\)]+\)$} $line "" line
|
||||
set name [file rootname [file tail $line]]
|
||||
set file [file tail $line]
|
||||
set ext [file extension $line]
|
||||
if {$ext ni $exts} continue
|
||||
set name [file rootname $file]
|
||||
if {[dict exists $ret $name]} {
|
||||
set ret($name) -1
|
||||
if {$ext eq ".ts"} {
|
||||
set ret($name) -1
|
||||
}
|
||||
} else {
|
||||
set size [lindex [split $line " "] 6]
|
||||
set ret($name) $size
|
||||
|
@ -390,7 +390,24 @@ function preparedmenu(el, menu)
|
||||
//fixdmenu(el, menu, 'autoexpire', '#expire', 'Auto-expire', 0);
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
function flagdir(file, flag, iconset, output, options)
|
||||
{
|
||||
var url = '/browse/flagdir.jim?dir=' + file +
|
||||
'&flag=' + flag;
|
||||
|
||||
$(output).slideDown().load(url, function() {
|
||||
$(iconset)
|
||||
.empty()
|
||||
.html('<img src=/img/loading.gif> Updating...')
|
||||
.load('/browse/iconset.jim?file=' + file);
|
||||
if ($(options).attr(flag) == '1')
|
||||
$(options).attr(flag, 0);
|
||||
else
|
||||
$(options).attr(flag, 1);
|
||||
}).delay(3000).slideUp();
|
||||
}
|
||||
|
||||
$(function() {
|
||||
|
||||
dir = $('#dir').text();
|
||||
|
||||
@ -507,23 +524,6 @@ var menuclick = function(action, el, pos)
|
||||
}
|
||||
};
|
||||
|
||||
function flagdir(file, flag, iconset, output, options)
|
||||
{
|
||||
var url = '/browse/flagdir.jim?dir=' + file +
|
||||
'&flag=' + flag;
|
||||
|
||||
$(output).load(url, function() {
|
||||
$(iconset)
|
||||
.empty()
|
||||
.html('<img src=/img/loading.gif> Updating...')
|
||||
.load('/browse/iconset.jim?file=' + file);
|
||||
if ($(options).attr(flag) == '1')
|
||||
$(options).attr(flag, 0);
|
||||
else
|
||||
$(options).attr(flag, 1);
|
||||
}).delay(3000).slideUp();
|
||||
}
|
||||
|
||||
var dmenuclick = function(action, el, pos)
|
||||
{
|
||||
var direl = $(el).parent().parent();
|
||||
@ -656,7 +656,7 @@ var dmenuclick = function(action, el, pos)
|
||||
|
||||
default:
|
||||
if (plugins.dmenu[action])
|
||||
plugins.dmenu[action](file);
|
||||
plugins.dmenu[action](file, iconset, results, el);
|
||||
else
|
||||
alert('Unhandled action: ' + action);
|
||||
break;
|
||||
|
@ -14,9 +14,7 @@ set event [rsv slot $table $slot]
|
||||
# Humax TV replaces these characters.
|
||||
# "%*./:<>?\|
|
||||
|
||||
set dir "[system mediaroot]/[\
|
||||
regsub -all {["%*\./:<>?\\|]} [$event folder] "_"]"
|
||||
|
||||
set dir "[system mediaroot]/[system filename [$event_folder]]"
|
||||
|
||||
if {[file exists $dir]} {
|
||||
puts "Folder $dir already exists."
|
||||
|
@ -62,7 +62,7 @@ foreach service $services {
|
||||
|
||||
puts "<tr><td class=even>$name</td>"
|
||||
if (!$installed) {
|
||||
puts "<td colspan=3><i>Not installed</i></td></tr>"
|
||||
puts "<td colspan=2><i>Not installed</i></td></tr>"
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -352,3 +352,10 @@ proc {system uptime} {} {
|
||||
return $uptime
|
||||
}
|
||||
|
||||
proc {system filename} {str {extra ""}} {
|
||||
# Humax TV replaces these characters.
|
||||
# "%*./:<>?\|
|
||||
set chars "\"%*\./:<>?\\\\|$extra"
|
||||
return [regsub -all "\[$chars]" $str "_"]
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,10 @@ class ts {
|
||||
resume 0
|
||||
}
|
||||
|
||||
ts method bfile {} {
|
||||
return [file tail [file rootname $file]]
|
||||
}
|
||||
|
||||
ts method duration {{raw 0}} {
|
||||
set d [expr $end - $start]
|
||||
if {!$raw} { set d $($d / 60) }
|
||||
@ -305,22 +309,22 @@ proc {ts renamegroup} {from to} {
|
||||
|
||||
exec /mod/bin/hmt "+setfilename=$to" "${dir}/${to}.hmt"
|
||||
|
||||
set ndir [file normalize $dir]
|
||||
|
||||
if {![catch {set db [sqlite3.open $::dmsfile]}]} {
|
||||
catch {
|
||||
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
|
||||
}
|
||||
# set ndir [file normalize $dir]
|
||||
#
|
||||
# if {![catch {set db [sqlite3.open $::dmsfile]}]} {
|
||||
# catch {
|
||||
# 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
|
||||
# }
|
||||
}
|
||||
|
||||
proc {ts touchgroup} {target ref} {
|
||||
@ -407,8 +411,10 @@ proc {ts iterate} {callback {verbose 0} {dir ""}} {{rootdev 0}} {
|
||||
|
||||
if {$verbose} { puts "Scanning directory ($dir)" }
|
||||
|
||||
file stat "$dir/" st
|
||||
if {$st(dev) != $rootdev} return
|
||||
if {$rootdev != 0} {
|
||||
file stat "$dir/" st
|
||||
if {$st(dev) != $rootdev} return
|
||||
}
|
||||
|
||||
foreach entry [readdir -nocomplain $dir] {
|
||||
if {[file isdirectory "$dir/$entry"]} {
|
||||
|
Loading…
Reference in New Issue
Block a user