diff --git a/var/mongoose/cgi-bin/browse.jim b/var/mongoose/cgi-bin/browse.jim
index ecb26eb..cee9442 100755
--- a/var/mongoose/cgi-bin/browse.jim
+++ b/var/mongoose/cgi-bin/browse.jim
@@ -2,7 +2,7 @@
package require cgi
source /mod/var/mongoose/lib/setup
-require ts.class pretty_size
+require ts.class pretty_size system.class
puts "Content-Type: text/html"
puts ""
@@ -82,6 +82,7 @@ proc entry {file} {{i 0}} {
set locked 0
set encd 0
set def unknown
+ set bx 0
if {$type eq "ts"} {
# HD / SD
if {[$ts get definition] eq "HD"} {
@@ -114,6 +115,8 @@ proc entry {file} {{i 0}} {
src=/images/174_1_26_GuidancePolicy.png
height=21>"
}
+
+ set bx [$ts get bookmarks]
}
# Opt+ button
@@ -121,7 +124,7 @@ proc entry {file} {{i 0}} {
puts "
@@ -129,11 +132,7 @@ proc entry {file} {{i 0}} {
puts ""
}
-if {[dict exists $_cgi dir]} {
- set dir [dict get $_cgi dir]
-} else {
- set dir "/media/My Video"
-}
+set dir [cgi_get dir [system mediaroot]]
######################################################################
# Render web page
@@ -145,12 +144,17 @@ puts {
+
+}
+
diff --git a/var/mongoose/cgi-bin/browse/file.jim b/var/mongoose/cgi-bin/browse/file.jim
index 72b7e3e..e82a8ae 100755
--- a/var/mongoose/cgi-bin/browse/file.jim
+++ b/var/mongoose/cgi-bin/browse/file.jim
@@ -79,16 +79,22 @@ if {$type eq "ts"} {
$sz |
"
set dlna [$ts dlnaloc]
+lassign $dlna url
if {[llength $dlna]} {
- puts "DLNA URL | [lindex $dlna 0] | "
+ puts "
---|
DLNA URL |
+ $url | "
}
puts "
---|
Flags |
- [$ts get flags] |
-
-
- "
+ [$ts get flags]
+"
+if {[$ts get bookmarks]} {
+ puts " \[Bookmarks: [$ts get bookmarks]\]"
+}
+
+ puts ""
+ puts ""
exit
}
diff --git a/var/mongoose/html/css/jquery.contextMenu.css b/var/mongoose/html/css/jquery.contextMenu.css
index a18aac0..71be894 100644
--- a/var/mongoose/html/css/jquery.contextMenu.css
+++ b/var/mongoose/html/css/jquery.contextMenu.css
@@ -54,9 +54,15 @@
classes to the respective LI element(s)
*/
-.contextMenu LI.edit A { background-image: url(images/page_white_edit.png); }
-.contextMenu LI.cut A { background-image: url(images/cut.png); }
-.contextMenu LI.copy A { background-image: url(images/page_white_copy.png); }
-.contextMenu LI.paste A { background-image: url(images/page_white_paste.png); }
-.contextMenu LI.delete A { background-image: url(images/page_white_delete.png); }
-.contextMenu LI.quit A { background-image: url(images/door.png); }
+.contextMenu LI.pwedit A { background-image: url(/img/context/page_white_edit.png); }
+.contextMenu LI.pwcopy A { background-image: url(/img/context/page_white_copy.png); }
+.contextMenu LI.pwpaste A { background-image: url(/img/context/page_white_paste.png); }
+.contextMenu LI.pwdelete A { background-image: url(/img/context/page_white_delete.png); }
+.contextMenu LI.edit A { background-image: url(/img/context/edit.png); }
+.contextMenu LI.copy A { background-image: url(/img/context/copy.png); }
+.contextMenu LI.paste A { background-image: url(/img/context/paste.png); }
+.contextMenu LI.delete A { background-image: url(/img/context/delete.png); }
+.contextMenu LI.cut A { background-image: url(/img/context/cut.png); }
+.contextMenu LI.quit A { background-image: url(/img/context/door.png); }
+
+
diff --git a/var/mongoose/html/css/style.css b/var/mongoose/html/css/style.css
index b85f240..ae6d7b1 100644
--- a/var/mongoose/html/css/style.css
+++ b/var/mongoose/html/css/style.css
@@ -263,3 +263,25 @@ input.text
border: 2px solid red;
}
+div.cut, div.keep
+{
+ position: absolute;
+ top: 0px;
+ text-align: center;
+ overflow: hidden;
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+}
+
+div.keep
+{
+ background: green;
+ color: white;
+}
+
+div.cut
+{
+ background: #ff4000;
+ color: black;
+}
+
diff --git a/var/mongoose/html/img/context/cut.png b/var/mongoose/html/img/context/cut.png
new file mode 100644
index 0000000..f215d6f
Binary files /dev/null and b/var/mongoose/html/img/context/cut.png differ
diff --git a/var/mongoose/html/img/context/delete.png b/var/mongoose/html/img/context/delete.png
new file mode 100644
index 0000000..e40a61a
Binary files /dev/null and b/var/mongoose/html/img/context/delete.png differ
diff --git a/var/mongoose/html/img/context/door.png b/var/mongoose/html/img/context/door.png
new file mode 100644
index 0000000..369fc46
Binary files /dev/null and b/var/mongoose/html/img/context/door.png differ
diff --git a/var/mongoose/html/img/context/edit.png b/var/mongoose/html/img/context/edit.png
new file mode 100644
index 0000000..e7e1851
Binary files /dev/null and b/var/mongoose/html/img/context/edit.png differ
diff --git a/var/mongoose/html/img/context/page_white_copy.png b/var/mongoose/html/img/context/page_white_copy.png
new file mode 100644
index 0000000..a9f31a2
Binary files /dev/null and b/var/mongoose/html/img/context/page_white_copy.png differ
diff --git a/var/mongoose/html/img/context/page_white_delete.png b/var/mongoose/html/img/context/page_white_delete.png
new file mode 100644
index 0000000..af1ecaf
Binary files /dev/null and b/var/mongoose/html/img/context/page_white_delete.png differ
diff --git a/var/mongoose/html/img/context/page_white_edit.png b/var/mongoose/html/img/context/page_white_edit.png
new file mode 100644
index 0000000..b93e776
Binary files /dev/null and b/var/mongoose/html/img/context/page_white_edit.png differ
diff --git a/var/mongoose/html/img/context/page_white_paste.png b/var/mongoose/html/img/context/page_white_paste.png
new file mode 100644
index 0000000..5b2cbb3
Binary files /dev/null and b/var/mongoose/html/img/context/page_white_paste.png differ
diff --git a/var/mongoose/html/img/context/plus.png b/var/mongoose/html/img/context/plus.png
new file mode 100644
index 0000000..fefc08e
Binary files /dev/null and b/var/mongoose/html/img/context/plus.png differ
diff --git a/var/mongoose/lib/ts.class b/var/mongoose/lib/ts.class
index 44fa316..2c0b217 100644
--- a/var/mongoose/lib/ts.class
+++ b/var/mongoose/lib/ts.class
@@ -16,10 +16,13 @@ class ts {
flags ""
error ""
guidance ""
+ bookmarks 0
}
-ts method duration {} {
- return [expr [expr $end - $start] / 60]
+ts method duration {{raw 0}} {
+ set d [expr $end - $start]
+ if {!$raw} { set d $($d / 60) }
+ return $d
}
ts method size {} {
@@ -30,15 +33,15 @@ ts method size {} {
ts method _parse {line} {
set vars [split $line "\t"]
- set title [lindex $vars 0]
- set synopsis [lindex $vars 1]
- set definition [lindex $vars 2]
- set channel_num [lindex $vars 3]
- set channel_name [lindex $vars 4]
- set start [lindex $vars 5]
- set end [lindex $vars 6]
- set flags [split [string range [lindex $vars 7] 0 end-1] ,]
- set guidance [lindex $vars 8]
+ lassign [split $line "\t"] \
+ title synopsis definition channel_num channel_name \
+ start end flags_list guidance bookmarks
+
+ set flags [split [string range $flags_list 0 end-1] ,]
+}
+
+ts method bookmarks {} {
+ return [exec /mod/bin/hmt -bookmarks $file]
}
ts method flag {f} {
|