update
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@564 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
ddb63e68b7
commit
509c98ee74
@ -1,9 +1,9 @@
|
||||
Package: webif
|
||||
Priority: optional
|
||||
Section: web
|
||||
Version: 0.8.6-2
|
||||
Version: 0.8.7
|
||||
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
|
||||
Suggests: ffmpeg,webif-iphone,nicesplice
|
||||
Suggests: ffmpeg,webif-iphone,nicesplice,id3v2
|
||||
Description: An evolving web interface for the Humax.
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package require cgi
|
||||
source /mod/var/mongoose/lib/setup
|
||||
require ts.class pretty_size system.class settings.class
|
||||
require ts.class pretty_size system.class settings.class escape
|
||||
|
||||
puts "Content-Type: text/html"
|
||||
puts ""
|
||||
@ -40,7 +40,7 @@ proc directory {file bfile} {
|
||||
puts "<input class=\"fs fsdir\" type=checkbox>"
|
||||
puts "<a class=dbf
|
||||
href=\"$::env(REQUEST_URI)?dir=[cgi_quote_url $file]\"
|
||||
file=\"$file\">"
|
||||
file=\"[cgi_quote_url $file]\">"
|
||||
puts "$bfile</a><span class=filesize id=\"$tbfile\">
|
||||
</span>"
|
||||
|
||||
@ -117,7 +117,7 @@ proc entry {file} {{i 0}} {
|
||||
<div class=\"va bf\" id=[incr i]>
|
||||
<img class=va border=0 src=/img/$img.png>
|
||||
<input class=\"$fscl\" type=checkbox>
|
||||
<a class=bf file=\"$file\" type=$type href=#>
|
||||
<a class=bf file=\"[cgi_quote_url $file]\" type=$type href=#>
|
||||
$bfile
|
||||
</a>
|
||||
"
|
||||
|
@ -3,7 +3,7 @@
|
||||
package require sqlite3
|
||||
package require cgi
|
||||
source /mod/var/mongoose/lib/setup
|
||||
require ts.class
|
||||
require ts.class system.class
|
||||
|
||||
puts "Content-Type: text/html\r\n\r\n"
|
||||
|
||||
@ -23,9 +23,18 @@ if {[cgi_get do] eq "it"} {
|
||||
puts "Processing $shname"
|
||||
|
||||
puts [exec /mod/bin/ffmpeg -y -benchmark -v 0 \
|
||||
-i $rfile -f mp2 \
|
||||
-i $rfile -f mp3 \
|
||||
-vn -acodec copy "${base}.mp3"]
|
||||
|
||||
if {[system pkginst id3v2]} {
|
||||
puts [exec /mod/bin/id3v2 \
|
||||
--song "[$ts get title]" \
|
||||
--comment "[$ts get synopsis]" \
|
||||
--album "[$ts get channel_name]" \
|
||||
--year "[clock format [$ts get start] -format {%Y}]" \
|
||||
"${base}.mp3"]
|
||||
}
|
||||
|
||||
set xtime [expr [expr [clock milliseconds] - $xstart] / 1000.0]
|
||||
puts "Time taken: $xtime"
|
||||
|
||||
|
@ -79,8 +79,8 @@ function delete_callback(file, type, id)
|
||||
{
|
||||
var el = 'div.bf#' + id;
|
||||
var results = el + ' .results';
|
||||
var url = '/cgi-bin/browse/delete.jim?file=' +
|
||||
encodeURIComponent(file) + '&type=' + type;
|
||||
var url = '/cgi-bin/browse/delete.jim?file=' + file +
|
||||
'&type=' + type;
|
||||
$(results)
|
||||
.html('<img src=/img/loading.gif>Deleting, please wait...')
|
||||
.slideDown('slow')
|
||||
@ -93,19 +93,19 @@ function delete_callback(file, type, id)
|
||||
|
||||
function lock_callback(file, type, id)
|
||||
{
|
||||
var url = '/cgi-bin/browse/lock.jim?file=' + encodeURIComponent(file);
|
||||
var url = '/cgi-bin/browse/lock.jim?file=' + file;
|
||||
$.get(url, function() { window.location.reload(true); });
|
||||
}
|
||||
|
||||
function enc_callback(file, type, id)
|
||||
{
|
||||
var url = '/cgi-bin/browse/enc.jim?file=' + encodeURIComponent(file);
|
||||
var url = '/cgi-bin/browse/enc.jim?file=' + file;
|
||||
$.get(url, function() { window.location.reload(true); });
|
||||
}
|
||||
|
||||
function new_callback(file, type, id)
|
||||
{
|
||||
var url = '/cgi-bin/browse/new.jim?file=' + encodeURIComponent(file);
|
||||
var url = '/cgi-bin/browse/new.jim?file=' + file;
|
||||
$.get(url, function() { window.location.reload(true); });
|
||||
}
|
||||
|
||||
@ -148,7 +148,7 @@ function confirm_action(action, callback, file, type, id)
|
||||
});
|
||||
$('#confirm').empty().html(
|
||||
'Are you sure you wish to ' + action + '<br>' +
|
||||
'<i>' + bfile + '</i> ?'
|
||||
'<i>' + decodeURIComponent(bfile) + '</i> ?'
|
||||
);
|
||||
$confirm.dialog('open');
|
||||
}
|
||||
@ -261,8 +261,8 @@ var menuclick = function(action, el, pos)
|
||||
break;
|
||||
|
||||
case 'rename':
|
||||
$('#rename').val(bfile);
|
||||
$('#renameorig').val(file);
|
||||
$('#rename').val(decodeURIComponent(bfile));
|
||||
$('#renameorig').val(decodeURIComponent(file));
|
||||
|
||||
$('#titleorig').val('');
|
||||
$('#renametitle').val('');
|
||||
@ -272,7 +272,7 @@ var menuclick = function(action, el, pos)
|
||||
if (type == 'ts')
|
||||
{
|
||||
$.getJSON('/cgi-bin/browse/epgtitle.jim?file=' +
|
||||
encodeURIComponent(file), epginfo_callback);
|
||||
file, epginfo_callback);
|
||||
}
|
||||
|
||||
$('#renameform').dialog('open');
|
||||
@ -280,22 +280,22 @@ var menuclick = function(action, el, pos)
|
||||
|
||||
case 'download':
|
||||
window.location.href = '/cgi-bin/browse/download.jim?file=' +
|
||||
encodeURIComponent(file);
|
||||
file;
|
||||
break;
|
||||
|
||||
case 'crop':
|
||||
window.location.href = '/cgi-bin/browse/crop.jim?file=' +
|
||||
encodeURIComponent(file);
|
||||
file;
|
||||
break;
|
||||
|
||||
case 'decrypt':
|
||||
window.location.href = '/cgi-bin/browse/decrypt.jim?file=' +
|
||||
encodeURIComponent(file);
|
||||
file;
|
||||
break;
|
||||
|
||||
case 'audio':
|
||||
window.location.href = '/cgi-bin/browse/audio.jim?file=' +
|
||||
encodeURIComponent(file);
|
||||
file;
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -315,10 +315,11 @@ var dmenuclick = function(action, el, pos)
|
||||
switch (action)
|
||||
{
|
||||
case 'delete':
|
||||
var url = '/cgi-bin/browse/delete.jim?file=' +
|
||||
encodeURIComponent(file) + '&type=dir';
|
||||
var url = '/cgi-bin/browse/delete.jim?file=' + file +
|
||||
'&type=dir';
|
||||
|
||||
if (confirm('Are you sure you wish to delete "' + file +
|
||||
if (confirm('Are you sure you wish to delete "' +
|
||||
decodeURIComponent(file) +
|
||||
'" and all files within it?'))
|
||||
{
|
||||
$(results)
|
||||
@ -334,14 +335,13 @@ var dmenuclick = function(action, el, pos)
|
||||
break;
|
||||
|
||||
case 'rename':
|
||||
$('#drename').val(bfile);
|
||||
$('#drenameorig').val(file);
|
||||
$('#drename').val(decodeURIComponent(bfile));
|
||||
$('#drenameorig').val(decodeURIComponent(file));
|
||||
$('#drenameform').dialog('open');
|
||||
break;
|
||||
|
||||
case 'flat':
|
||||
var url = '/cgi-bin/browse/flat.jim?file=' +
|
||||
encodeURIComponent(file);
|
||||
var url = '/cgi-bin/browse/flat.jim?file=' + file;
|
||||
$.get(url, function() { window.location.reload(true); });
|
||||
break;
|
||||
|
||||
@ -394,8 +394,8 @@ var dmenuclick = function(action, el, pos)
|
||||
e.preventDefault();
|
||||
var file = $(this).attr('file');
|
||||
var type = $(this).attr('type');
|
||||
var url = '/cgi-bin/browse/file.jim?file=' +
|
||||
encodeURIComponent(file) + '&type=' + type;
|
||||
var url = '/cgi-bin/browse/file.jim?file=' + file
|
||||
+ '&type=' + type;
|
||||
$('#dialogue').load(url);
|
||||
$dialog.dialog('open');
|
||||
});
|
||||
@ -499,7 +499,7 @@ var dmenuclick = function(action, el, pos)
|
||||
.click(function() {
|
||||
var files = new Array();
|
||||
var els = $('input.fs:checked + a').each(function() {
|
||||
files.push(encodeURIComponent($(this).attr('file')));
|
||||
files.push($(this).attr('file'));
|
||||
});
|
||||
//console.log("%o", files);
|
||||
var str = 'Are you sure you want to delete ' + files.length +
|
||||
|
8
var/mongoose/lib/escape
Normal file
8
var/mongoose/lib/escape
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
if {[expr ! [exists -proc escape]]} {
|
||||
proc escape {str} {
|
||||
regsub -all -- {"} "$str" "\\\"" str
|
||||
return $str
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user