1.0.17 RC

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@2041 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2014-10-07 00:49:22 +00:00
parent 0691577b96
commit e6d7af1fc4
7 changed files with 57 additions and 15 deletions

View File

@ -1,7 +1,7 @@
Package: webif
Priority: optional
Section: web
Version: 1.0.16-4
Version: 1.0.17
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: webif-channelicons(>=1.1.12-2),lighttpd(>=1.4.35-2),jim(>=0.75-1),jim-oo,jim-sqlite3(>=0.75),jim-cgi(>=0.7),jim-binary(>=0.75),service-control(>=1.2),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.0.13),hmt(>=1.1.21),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2-1),stripts(>=1.2.5-3),smartmontools,tmenu(>=1.08),ffmpeg,id3v2,multienv(>=1.6),mongoose

View File

@ -3,7 +3,7 @@
package require cgi
package require sqlite3
source /mod/webif/lib/setup
require altrow progressbar epg.class
require altrow progressbar epg.class system.class
header
@ -51,7 +51,7 @@ foreach tw [$db query {
"
puts "<td>[progressbar $ucLevel]</td>"
puts "<td>[progressbar $ucQuality]</td>"
puts "<td>[string range $netName 3 end]</td>"
puts "<td>[system strip $netName]</td>"
set channels [$db query {
select usLcn, szSvcName, szPrvName, aucDefaultAuthority

View File

@ -70,6 +70,7 @@ if {[llength $records] > 0} {
<th colspan=3>Channel</th>
<th>Programme</th>
<th>Synopsis</th>
<th></th>
</tr>
}
} else {

View File

@ -39,7 +39,6 @@ foreach line $data {
set vars {}
set i 0
foreach f $fields {
if {$f eq "aulEventToRecordInfo"} { continue }
incr i
lappend vars $f [lindex $vals $i]
}

View File

@ -143,7 +143,16 @@ proc eventrow {event {table TBL_RESERVATION} {pending 0}} {
puts "<a class=event href=#
xs=$svcmap($service_id) xe=$event_id>
[clock format $start \
-format {%a %d %b %Y %H:%M}]</a><br>"
-format {%a %d %b %Y %H:%M}]</a>"
if {$service_id != [$event get hsvc]} {
set ch [system strip [\
get_channel_attr_byhsvc \
$service_id szSvcName]]
puts "<img width=15 src=\"[\
epg channeliconpath $ch]\""
puts "title=\"$ch\" alt=\"$ch\">"
}
puts "<br>"
} else {
puts "[clock format $start \
-format {%a %d %b %Y %H:%M}]

View File

@ -21,6 +21,8 @@ $rsvdb query {attach database '/var/lib/humaxtv/rsvp.db' as pending}
# version.
catch { $rsvdb query {alter table pending add column action int} }
set binaryfields {aulEventToRecordInfo}
class rsv {
ulslot -1
ersvtype 0
@ -55,9 +57,9 @@ class rsv {
}
require findhsvc
if {![exists -proc binary]} { package require binary }
rsv method aul {} {
if {![exists -proc binary]} { package require binary }
set aul {}
for {set i 0} {$i < [string length $aulEventToRecordInfo]} {incr i 16} {
binary scan [string range $aulEventToRecordInfo $i $($i + 15)] \
@ -67,6 +69,16 @@ rsv method aul {} {
return $aul
}
proc {rsv mkaul} {e} {
$e get_channel_info
return [binary format iiii \
[$e get channel_hsvc] \
[$e get start] \
[$e end] \
[$e get event_id] \
]
}
rsv method clear_ulslot {} {
set ulslot -1
}
@ -255,7 +267,7 @@ rsv method insert {{table pending} {force 0}} {
set fields [lsort [$self vars]]
foreach field {aulEventToRecordInfo szSvcName usLcn sort} {
foreach field {szSvcName usLcn sort} {
set df [lsearch $fields $field]
set fields [lreplace $fields $df $df]
}
@ -267,10 +279,13 @@ rsv method insert {{table pending} {force 0}} {
set vals {}
foreach field $fields {
# Escape any quotes embedded in the data.
regsub -all {'} [$self get $field] {''} f
lappend vals "'$f'"
#lappend vals "'[$self get $field]'"
# Escape any quotes and percents embedded in the data.
regsub -all {['%]} [$self get $field] {&&} f
if {$field in $::binaryfields} {
lappend vals "X'$f'"
} else {
lappend vals "'$f'"
}
}
set query "insert into ${table}("
@ -486,11 +501,17 @@ proc {rsv construct} {event type} {
set args(ucRecKind) 4
set args(szCRID) "$ccrid[$event get series_crid]"
set args(szFPBRecPath) "$args(szevtname)"
set progs [lmap i [epg fetch dump -scrid [$event get series_crid]] {
set events {}
set progs [lmap i [\
epg dbfetch dump -scrid [$event get series_crid] \
-sort start] {
if {[set ecrid [$i get event_crid]] eq ""} { continue }
binary scan [rsv mkaul $i] H* ret
lappend events $ret
list "1$::ccrid$ecrid"
}]
set args(szEventToRecord) "[join $progs "|"]|"
set args(aulEventToRecordInfo) [join $events ""]
}
return [rsv new $args]
@ -516,8 +537,11 @@ proc {rsv backup} {file} {
puts -nonewline $fd "event\t"
foreach f $fields {
if {$f eq "aulEventToRecordInfo"} { continue }
puts -nonewline $fd "[$event get $f]\t"
set ret [$event get $f]
if {$f in $::binaryfields} {
binary scan $ret H* ret
}
puts -nonewline $fd "$ret\t"
}
puts $fd ""
}
@ -572,7 +596,6 @@ proc {rsv restore} {file} {
set vars {}
set i 0
foreach f $fields {
if {$f eq "aulEventToRecordInfo"} { continue }
incr i
lappend vars $f [lindex $vals $i]
}

View File

@ -382,3 +382,13 @@ proc {system connectivity} {{site "hpkg.tv"}} {
return 1
}
proc {system strip} {str} {
if {[string range $str 1 2] eq "i7"} {
set str [string range $str 3 end]
}
if {[string first "\025" $str] == 0} {
set str [string range $str 1 end]
}
return $str
}