diff --git a/CONTROL/control b/CONTROL/control
index 193bc9cd..b1398b12 100644
--- a/CONTROL/control
+++ b/CONTROL/control
@@ -1,9 +1,9 @@
Package: webif
Priority: optional
Section: web
-Version: 0.13.3-2
+Version: 0.13.3-3
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
-Depends: webif-channelicons(>=1.0.4-1),mongoose(>=3.0-7),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73-1),jim-cgi(>=0.7),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.10),hmt(>=1.1.13),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.1.2),smartmontools,tmenu(>=1.05)
-Suggests: ffmpeg
+Depends: webif-channelicons(>=1.0.4-1),mongoose(>=3.0-7),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73-1),jim-cgi(>=0.7),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.10),hmt(>=1.1.13),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.1.2),smartmontools,tmenu(>=1.05),ffmpeg,id3v2
+Suggests:
Description: An evolving web interface for the Humax.
diff --git a/var/mongoose/html/browse/assets.jim b/var/mongoose/html/browse/assets.jim
index f1ad784c..9831c901 100755
--- a/var/mongoose/html/browse/assets.jim
+++ b/var/mongoose/html/browse/assets.jim
@@ -291,5 +291,9 @@ Please wait...
+
+
+
+
}
diff --git a/var/mongoose/html/browse/file.jim b/var/mongoose/html/browse/file.jim
index 0c952b80..c4990b98 100755
--- a/var/mongoose/html/browse/file.jim
+++ b/var/mongoose/html/browse/file.jim
@@ -23,7 +23,12 @@ if {$type eq "ts"} {
Title |
- [$ts get title] |
+
+ "
+ if {[file exists "[file rootname $file].thm"]} {
+ puts ""
+ }
+ puts "[$ts get title] |
Synopsis |
[$ts get synopsis] |
diff --git a/var/mongoose/html/browse/script.js b/var/mongoose/html/browse/script.js
index f2e33350..c05fd24d 100755
--- a/var/mongoose/html/browse/script.js
+++ b/var/mongoose/html/browse/script.js
@@ -271,7 +271,7 @@ function preparemenu(el, menu)
else
$(menu).disableContextMenuItems('#crop');
- if (el.attr('bx') > 0 && el.attr('odencd') == 0)
+ if (el.attr('odencd') == 0)
$(menu).enableContextMenuItems('#thm');
else
$(menu).disableContextMenuItems('#thm');
@@ -449,14 +449,16 @@ var menuclick = function(action, el, pos)
break;
case 'thm':
- confirm_action('re-generate the thumbnail for',
- thumbnail_callback, file, dir, id);
+ window.location.href = '/browse/thumbnail/index.jim?file=' +
+ file;
break;
case 'vthm':
- window.open('/browse/bmp.jim?file=' + file, 'hxwebifbmp',
- 'height=78,width=140,toolbar=no,' +
- 'scrollbars=no,menubar=no,location=no,titlebar=no');
+// window.open('/browse/bmpw.jim?file=' + file, 'hxwebifbmp',
+// 'height=156,width=280,toolbar=no,' +
+// 'scrollbars=no,menubar=no,location=no,titlebar=no');
+ $('#thmbmp').attr('src', 'bmp.jim?file=' + file);
+ $('#bmpdialogue').dialog('open');
break;
case 'download':
@@ -783,6 +785,18 @@ var dmenuclick = function(action, el, pos)
close: function() { $('#savestream_name').val(''); }
});
+ $('#bmpdialogue').dialog({
+ autoOpen: false,
+ height: 'auto', width: 'auto',
+ modal: true,
+ buttons: {
+ "Close": function() {
+ $(this).dialog('close');
+ }
+ },
+ close: function() { $('#thmbmp').attr('src', 'about:blank'); }
+ });
+
// Create re-usable confirmation dialogue.
$confirm = $('#confirm').dialog({
modal: true, autoOpen: false,
diff --git a/var/mongoose/html/browse/thumbnail/_mk.jim b/var/mongoose/html/browse/thumbnail/_mk.jim
new file mode 100755
index 00000000..da888c4e
--- /dev/null
+++ b/var/mongoose/html/browse/thumbnail/_mk.jim
@@ -0,0 +1,19 @@
+#!/mod/bin/jimsh
+
+package require cgi
+source /mod/webif/lib/setup
+require ts.class cat
+
+httpheader "image/bmp"
+
+set rfile [cgi_get file]
+set pos [cgi_get pos 0]
+
+if {![catch {set ts [ts fetch $rfile]}]} {
+ $ts mkbmp $pos ".pos$pos"
+
+ set f "[file rootname $rfile].pos$pos.bmp"
+ cat $f
+ file delete $f
+}
+
diff --git a/var/mongoose/html/browse/thumbnail/fetch.jim b/var/mongoose/html/browse/thumbnail/fetch.jim
new file mode 100755
index 00000000..37be02bc
--- /dev/null
+++ b/var/mongoose/html/browse/thumbnail/fetch.jim
@@ -0,0 +1,17 @@
+#!/mod/bin/jimsh
+
+package require cgi
+source /mod/webif/lib/setup
+require cat
+
+httpheader "image/bmp"
+
+set rfile [cgi_get file]
+set pos [cgi_get pos 0]
+
+set f "[file rootname $rfile].pos$pos.bmp"
+if {[file exists $f]} {
+ cat $f
+ file delete $f
+}
+
diff --git a/var/mongoose/html/browse/thumbnail/index.jim b/var/mongoose/html/browse/thumbnail/index.jim
new file mode 100755
index 00000000..720eb6c8
--- /dev/null
+++ b/var/mongoose/html/browse/thumbnail/index.jim
@@ -0,0 +1,98 @@
+#!/mod/bin/jimsh
+
+package require cgi
+source /mod/webif/lib/setup
+require ts.class pretty_size
+
+header
+
+set rfile [cgi_get file]
+set ts [ts fetch $rfile]
+set dir [file dirname $rfile]
+
+set len [$ts duration 1]
+
+lassign [$ts bookmarks] book
+if {$book eq ""} { set book 0 }
+
+set pos [cgi_get pos $book]
+set pos $($pos + 0)
+if {$pos < 0} { set pos 0 }
+
+puts "
+
+
+
+