version 0.7.6
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@449 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
0fa394eaa1
commit
02f7c5aad9
@ -1,7 +1,7 @@
|
||||
Package: webif
|
||||
Priority: optional
|
||||
Section: web
|
||||
Version: 0.7.5-1
|
||||
Version: 0.7.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),jim-oo,jim-pack,service-control,busybox(>=1.18.3-1),lsof,epg(>=1.0.5),hmt(>=1.0.6),ssmtp
|
||||
|
@ -10,27 +10,19 @@ require ts.class
|
||||
cgi_input
|
||||
#cgi_dump
|
||||
|
||||
set file [dict get $_cgi file]
|
||||
set file [cgi_get file "/media/My Video/Chuggington/Hodge_and_the_Chugnav.ts"]
|
||||
set rfile [file normalize $file]
|
||||
set ts [ts fetch $file]
|
||||
|
||||
set dmsfile /mnt/hd2/dms_cds.db
|
||||
|
||||
# Default to just downloading the raw file.
|
||||
set url $file
|
||||
set mime "video/ts"
|
||||
if {[file exists $dmsfile]} {
|
||||
set db [sqlite3.open /mnt/hd2/dms_cds.db]
|
||||
set muri [$db query "
|
||||
select tblresource.mimetype, contenturi
|
||||
from tblresource join tblmedia using (mediaid)
|
||||
where localurl = '%s'" $rfile]
|
||||
if {$muri != ""} {
|
||||
set rec [lindex $muri 0]
|
||||
set xuri [lindex $rec 3]
|
||||
set mime [lindex $rec 1]
|
||||
set url "http://$env(HTTP_HOST):9000/web/$xuri"
|
||||
}
|
||||
}
|
||||
|
||||
# Unless the DLNA option is available.
|
||||
set dlna [$ts dlnaloc]
|
||||
if {[llength $dlna]} { lassign $dlna url mime }
|
||||
|
||||
puts "DLNA: $dlna"
|
||||
|
||||
puts "Content-Type: text/plain"
|
||||
puts "Refresh: 0; url=$url"
|
||||
|
@ -77,6 +77,12 @@ if {$type eq "ts"} {
|
||||
</tr><tr>
|
||||
<th>Size</th>
|
||||
<td>$sz</td>
|
||||
"
|
||||
set dlna [$ts dlnaloc]
|
||||
if {[llength $dlna]} {
|
||||
puts "</tr><tr><th>DLNA URL</th><td>[lindex $dlna 0]</td>"
|
||||
}
|
||||
puts "
|
||||
</tr><tr>
|
||||
<th>Flags</th>
|
||||
<td>[$ts get flags]</td>
|
||||
|
@ -18,6 +18,7 @@ proc opkg {cmd} {
|
||||
#chunk_pad
|
||||
}
|
||||
close $fd
|
||||
chunk "\r\n"
|
||||
}
|
||||
|
||||
start_chunked
|
||||
|
@ -1,7 +1,7 @@
|
||||
puts {
|
||||
<!-- start of topbar -->
|
||||
|
||||
<div class=container onclick="location.href='/'; return false;">
|
||||
<div id=topbar class=container onclick="location.href='/'; return false;">
|
||||
<div class=left><img src=/images/154_1_00_WIN_MD116_1L.png></div>
|
||||
<div class=middle>
|
||||
<!-- Start include diskspace - above other items to work around IE feature.. -->
|
||||
@ -19,6 +19,12 @@ puts {
|
||||
</div>
|
||||
<div class=right><img src=/images/154_1_00_WIN_MD116_3R.png></div>
|
||||
</div>
|
||||
<script type=text/javascript>
|
||||
$('#topbar').hover(
|
||||
function() { $(this).css('cursor', 'pointer'); },
|
||||
function() { $(this).css('cursor', 'auto'); }
|
||||
);
|
||||
</script>
|
||||
|
||||
<!-- end of topbar -->
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!-- start of topbar -->
|
||||
|
||||
<div class=container onclick="location.href='/'; return false;">
|
||||
<div id=topbar class=container onclick="location.href='/'; return false;">
|
||||
<div class=left><img src=/images/154_1_00_WIN_MD116_1L.png></div>
|
||||
<div class=middle>
|
||||
<!-- Start include diskspace - above other items to work around IE feature.. -->
|
||||
@ -13,5 +13,11 @@
|
||||
</div>
|
||||
<div class=right><img src=/images/154_1_00_WIN_MD116_3R.png></div>
|
||||
</div>
|
||||
<script type=text/javascript>
|
||||
$('#topbar').hover(
|
||||
function() { $(this).css('cursor', 'pointer'); },
|
||||
function() { $(this).css('cursor', 'auto'); }
|
||||
);
|
||||
</script>
|
||||
|
||||
<!-- end of topbar -->
|
||||
|
@ -1,6 +1,8 @@
|
||||
|
||||
if {![exists -proc class ]} { package require oo }
|
||||
|
||||
set dmsfile /mnt/hd2/dms_cds.db
|
||||
|
||||
class ts {
|
||||
file ""
|
||||
base ""
|
||||
@ -125,6 +127,27 @@ ts method settitle {newtitle} {
|
||||
exec /mod/bin/hmt "+settitle=${newtitle}" $file
|
||||
}
|
||||
|
||||
ts method dlnaloc {} {
|
||||
set mime "video/ts"
|
||||
if {![file exists $::dmsfile]} { return {} }
|
||||
if {[catch {set db [sqlite3.open $::dmsfile]}]} { return {} }
|
||||
set url ""
|
||||
set rfile [file normalize $file]
|
||||
set muri [$db query "
|
||||
select tblresource.mimetype, contenturi
|
||||
from tblresource join tblmedia using (mediaid)
|
||||
where localurl = '%s'" $rfile]
|
||||
if {$muri ne ""} {
|
||||
set rec [lindex $muri 0]
|
||||
set xuri [lindex $rec 3]
|
||||
set mime [lindex $rec 1]
|
||||
set url "http://$::env(HTTP_HOST):9000/web/$xuri"
|
||||
}
|
||||
$db close
|
||||
|
||||
if {$url ne "" } { return [list $url $mime] } else { return {} }
|
||||
}
|
||||
|
||||
proc {ts renamegroup} {from to} {
|
||||
set dir [file dirname $from]
|
||||
set root [file rootname $from]
|
||||
|
Loading…
Reference in New Issue
Block a user