forked from hummypkg/webif
restructure requires, add initial plugin class and hook into settings
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@220 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
@@ -1,19 +1,18 @@
|
||||
source /mod/var/mongoose/lib/setup
|
||||
|
||||
if {[expr ! [exists -proc class ]]} { package require oo }
|
||||
if {[expr ! [exists -proc sqlite3.open ]]} { package require sqlite3 }
|
||||
if {[expr ! [exists -proc settings ]]} {
|
||||
source /mod/var/mongoose/lib/settings.class
|
||||
}
|
||||
if {![exists -proc class ]} { package require oo }
|
||||
if {![exists -proc sqlite3.open ]} { package require sqlite3 }
|
||||
if {![exists -proc settings ]} { require settings.class }
|
||||
|
||||
source /mod/var/mongoose/lib/progressbar
|
||||
require progressbar
|
||||
|
||||
set channeldb 0
|
||||
catch { set channeldb [sqlite3.open /var/lib/humaxtv/channel.db] }
|
||||
set ::channeldb 0
|
||||
catch { set ::channeldb [sqlite3.open /var/lib/humaxtv/channel.db] }
|
||||
|
||||
set epgpath /mnt/hd1/dvbepg/epg.dat
|
||||
set hdepgpath /media/drive1/epgsavedata
|
||||
if {![file exists $epgpath] && [file exists $hdepgpath]} {
|
||||
set epgpath $hdepgpath
|
||||
set ::epgpath /mnt/hd1/dvbepg/epg.dat
|
||||
set ::hdepgpath /media/drive1/epgsavedata
|
||||
if {![file exists $::epgpath] && [file exists $::hdepgpath]} {
|
||||
set ::epgpath $::hdepgpath
|
||||
}
|
||||
|
||||
# * service_id, event_id, start, duration, encrypted, name, text
|
||||
@@ -265,3 +264,15 @@ proc {epg favlist} {} {
|
||||
"] { lindex $i end }]
|
||||
}
|
||||
|
||||
proc {epg channellist} {} {
|
||||
global channeldb
|
||||
|
||||
set channels {}
|
||||
lmap i [$channeldb query "
|
||||
select usSvcid, szSvcName
|
||||
from TBL_SVC
|
||||
"] { set channels([string range [lindex $i 3] 1 end]) [lindex $i 1] }
|
||||
|
||||
return $channels
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user