Compare commits
3 Commits
0.6.3@2148
...
0.64@2148
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
767021557f | ||
|
|
4f900f47b4 | ||
|
|
8383651367 |
@@ -1,10 +1,10 @@
|
||||
Package: webif
|
||||
Priority: optional
|
||||
Section: web
|
||||
Version: 0.6.3
|
||||
Version: 0.6.4
|
||||
Architecture: mipsel
|
||||
Maintainer: af123@hummypkg.org.uk
|
||||
Depends: mongoose(>=3.0),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.2),hmt(>=1.0.6),ssmtp
|
||||
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.2),hmt(>=1.0.6),ssmtp
|
||||
Replaces: af123-webif
|
||||
Conflicts: af123-webif
|
||||
Suggests: ffmpeg
|
||||
|
||||
@@ -203,7 +203,8 @@ var menuclick = function(action, el, pos)
|
||||
break;
|
||||
|
||||
case 'download':
|
||||
window.location.href = file;
|
||||
window.location.href = '/cgi-bin/browse/download.jim?file=' +
|
||||
encodeURIComponent(file);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
48
var/mongoose/cgi-bin/browse/download.jim
Executable file
48
var/mongoose/cgi-bin/browse/download.jim
Executable file
@@ -0,0 +1,48 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
package require cgi
|
||||
package require sqlite3
|
||||
source /mod/var/mongoose/lib/setup
|
||||
require ts.class
|
||||
|
||||
cgi_input
|
||||
#cgi_dump
|
||||
|
||||
set file [dict get $_cgi file]
|
||||
set rfile [file normalize $file]
|
||||
set ts [ts fetch $file]
|
||||
|
||||
set dmsfile /mnt/hd2/dms_cds.db
|
||||
|
||||
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 = '$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"
|
||||
}
|
||||
}
|
||||
|
||||
puts "Content-Type: text/plain"
|
||||
puts "Refresh: 0; url=$url"
|
||||
puts "Content-length: 0"
|
||||
puts ""
|
||||
|
||||
#puts "Pragma: public"
|
||||
#puts "Expires: 0"
|
||||
#puts "Cache-Control: must-revalidate, post-check=0, pre-check=0"
|
||||
#puts "Content-Type: application/force-download"
|
||||
#puts "Content-Type: application/download"
|
||||
#puts "Content-Type: $mime"
|
||||
#puts "Content-Disposition: attachment; filename=\"[file tail $file]\""
|
||||
#puts "Content-Transfer-Encoding: binary"
|
||||
#puts "Content-Length: [file size $rfile]"
|
||||
|
||||
@@ -17,7 +17,7 @@ foreach df [split [exec df -h 2>>/dev/null] "\n\r"] {
|
||||
extract $df
|
||||
break;
|
||||
}
|
||||
if {[string match *media/drive* $df]} {
|
||||
if {[string match *media/drive? $df]} {
|
||||
extract $df
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,8 +163,6 @@ epg method process_sched {} {
|
||||
set sched_type 0
|
||||
if {$event_crid ne "" && "$channel_hsvc$event_crid" in $::rsvlookup} {
|
||||
set sched_type 1
|
||||
lappend set \
|
||||
"<img src=/images/175_1_11_Reservation_Record.png $height>"
|
||||
} elseif {$series_crid ne "" &&
|
||||
"$channel_hsvc$series_crid" in $::rsvlookup} {
|
||||
set sched_type 2
|
||||
@@ -181,6 +179,10 @@ epg method icon_set {{height 0}} {
|
||||
}
|
||||
|
||||
$self process_sched
|
||||
if {$sched_type == 1} {
|
||||
lappend set \
|
||||
"<img src=/images/175_1_11_Reservation_Record.png $height>"
|
||||
}
|
||||
|
||||
if {$sched_type == 2} {
|
||||
lappend set \
|
||||
|
||||
@@ -55,6 +55,8 @@ cts 9 "Education" "Education/Science/Factual"
|
||||
puts "</td><td>"
|
||||
cts 10 "Leisure" "Leisure"
|
||||
|
||||
puts "</td><td><a href=/epg.shtml>Now/Next</a>"
|
||||
|
||||
puts "</td></tr><tr><td>"
|
||||
|
||||
cts 7 "Art" "Arts/Culture"
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
/mod/bin/ffmpeg "$@" 2>&1 | sed '
|
||||
1,8d
|
||||
$d
|
||||
'
|
||||
if [ -x /mod/bin/ffprobe ]; then
|
||||
/mod/bin/ffprobe "$@" 2>&1 | sed '
|
||||
1,10d
|
||||
'
|
||||
else
|
||||
/mod/bin/ffmpeg "$@" 2>&1 | sed '
|
||||
1,8d
|
||||
$d
|
||||
'
|
||||
fi
|
||||
exit 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user