Update of /cvsroot/freevo/freevo/WIP/Ruelle
In directory sc8-pr-cvs1:/tmp/cvs-serv12694
Modified Files:
tvtime.py
Log Message:
now we need to do custom frequencies
Index: tvtime.py
===================================================================
RCS file: /cvsroot/freevo/freevo/WIP/Ruelle/tvtime.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** tvtime.py 11 Sep 2003 15:19:57 -0000 1.3
--- tvtime.py 17 Sep 2003 15:41:20 -0000 1.4
***************
*** 10,15 ****
# -----------------------------------------------------------------------
# $Log$
! # Revision 1.3 2003/09/11 15:19:57 mikeruelle
! # keep on chugging
#
# Revision 1.17 2003/09/03 17:54:38 dischi
--- 10,15 ----
# -----------------------------------------------------------------------
# $Log$
! # Revision 1.4 2003/09/17 15:41:20 mikeruelle
! # now we need to do custom frequencies
#
# Revision 1.17 2003/09/03 17:54:38 dischi
***************
*** 55,58 ****
--- 55,59 ----
import signal
import cgi
+ import re
import util # Various utilities
***************
*** 71,75 ****
FALSE = 0
-
# Create the OSD object
osd = osd.get_singleton()
--- 72,75 ----
***************
*** 165,168 ****
--- 165,169 ----
def writeStationListXML(self):
print "writing new stationlist.xml"
+ self.createChannelsLookupTables()
norm='freevo'
tvnorm = config.CONF.tv
***************
*** 177,181 ****
c = 0
for m in config.TV_CHANNELS:
! fp.write(' <station name="%s" active="1" position="%s" band="US
Cable" channel="%s"/>\n' % (cgi.escape(m[1]),c,m[2]))
c = c + 1
--- 178,183 ----
c = 0
for m in config.TV_CHANNELS:
! myband = self.lookupChannelBand(m[2])
! fp.write(' <station name="%s" active="1" position="%s" band="%s"
channel="%s"/>\n' % (cgi.escape(m[1]),c,myband,m[2]))
c = c + 1
***************
*** 183,186 ****
--- 185,226 ----
fp.write('</stationlist>\n')
fp.close()
+
+ def lookupChannelBand(self, channel):
+ if (re.search('^\d+$', channel)):
+ print "have number"
+ if self.chanlists.has_key(config.CONF.chanlist):
+ print "found chanlist in our list"
+ return self.chanlists[config.CONF.chanlist]
+ elif self.chan2band.has_key(channel):
+ print "We know this channels band."
+ return self.chan2band[channel]
+ print "ok so we are not that smart"
+ return "US Cable"
+
+ def createChannelsLookupTables(self):
+ chanlisttmp = [ ('us-bcast', 'US Broadcast'), ('us-cable', 'US Cable'),
('us-cable-hrc', 'US Cable'), ('japan-cable', 'Japan Cable'), ('japan-bcast', 'Japan
Broadcast'), ('china-bcast', 'China Broadcast') ]
+ self.chanlists = dict(chanlisttmp)
+ chans_list = [('T' + str(x), 'US Two-Way') for x in range(7, 15)]
+ chans_list += [('A' + str(x), 'China Broadcast') for x in range(1, 8)]
+ chans_list += [('B' + str(x), 'China Broadcast') for x in range(1, 32)]
+ chans_list += [('C' + str(x), 'China Broadcast') for x in range(1, 6)]
+ chans_list += [('E' + str(x), 'VHF E2-E12') for x in range(1, 13)]
+ chans_list += [('S' + str(x), 'VHF S1-S41') for x in range(1, 42)]
+ chans_list += [('Z+1', 'VHF Misc'), ('Z+2', 'VHF Misc')]
+ chans_list += [(chr(x), 'VHF Misc') for x in range(88, 91)]
+ chans_list += [('K%0.2i' % x, 'VHF France') for x in range(1, 11)]
+ chans_list += [('H%0.2i' % x, 'VHF France') for x in range(1, 20)]
+ chans_list += [('K' + chr(x), 'VHF France') for x in range(66, 82)]
+ chans_list += [('SR' + str(x), 'VHF Russia') for x in range(1, 20)]
+ chans_list += [('R' + str(x), 'VHF Russia') for x in range(1, 13)]
+ chans_list += [('AS5A', 'VHF Australia'), ('AS9A', 'VHF Australia')]
+ chans_list += [('AS' + str(x), 'VHF Australia') for x in range(1, 13)]
+ chans_list += [('H1', 'VHF Italy'), ('H2', 'VHF Italy')]
+ chans_list += [(chr(x), 'VHF Italy') for x in range(65, 73)]
+ chans_list += [('I' + str(x), 'VHF Ireland') for x in range(1, 10)]
+ chans_list += [('U' + str(x), 'UHF') for x in range(21, 70)]
+ chans_list += [('AU' + str(x), 'UHF Australia') for x in range(28, 70)]
+ chans_list += [('O' + str(x), 'Australia Optus') for x in range(1, 58)]
+ self.chans2band=dict(chans_list)
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog