Update of /cvsroot/freevo/freevo/src/config
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26861/config
Modified Files:
__init__.py channels.py
Log Message:
Merged tv/channels into pyepg. It returns now nice channel and program
items. Much cleanup is needed were pyepg is used. I also removed
config.TV_CHANNELLIST, you can use pyepg.channels or pyepg.guide to
access the channel listing / guide
Index: channels.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/config/channels.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** channels.py 7 Dec 2004 16:09:52 -0000 1.4
--- channels.py 9 Dec 2004 20:26:32 -0000 1.5
***************
*** 34,40 ****
import logging
import config
- from tv.channels import ChannelList
log = logging.getLogger('config')
--- 34,41 ----
import logging
+ import pyepg
+ import sysconfig
import config
log = logging.getLogger('config')
***************
*** 78,85 ****
log.info('Detecting TV channels.')
! config.TV_CHANNELLIST = ChannelList(config.TV_CHANNELS,
config.TV_CHANNELS_EXCLUDE)
! log.debug('got %d channels' % len(config.TV_CHANNELLIST.channel_list))
!
! for c in config.TV_CHANNELLIST:
c.uri = []
if isinstance(c.access_id, (list, tuple)):
--- 79,86 ----
log.info('Detecting TV channels.')
! pyepg.connect(sysconfig.datafile('epgdb'))
! pyepg.load(config.TV_CHANNELS, config.TV_CHANNELS_EXCLUDE)
!
! for c in pyepg.channels:
c.uri = []
if isinstance(c.access_id, (list, tuple)):
***************
*** 92,100 ****
for card in config.TV_CARDS:
channels = {}
! for chan in config.TV_CHANNELLIST.get_all():
for u in chan.uri:
! if u.find(':') == -1: continue # safeguard, shouldn't happen
if card == u.split(':')[0]:
! channels[String(chan.chan_id)] = u.split(':', 1)[1]
config.TV_CARDS[card].channels = channels
--- 93,102 ----
for card in config.TV_CARDS:
channels = {}
! for chan in pyepg.channels:
for u in chan.uri:
! if u.find(':') == -1:
! continue # safeguard, shouldn't happen
if card == u.split(':')[0]:
! channels[String(chan.id)] = u.split(':', 1)[1]
config.TV_CARDS[card].channels = channels
Index: __init__.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/config/__init__.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** __init__.py 5 Dec 2004 13:01:10 -0000 1.3
--- __init__.py 9 Dec 2004 20:26:32 -0000 1.4
***************
*** 147,159 ****
TV_CARDS = TVSettings()
- # Internal list of all channels Freevo cares about. This is a ChannelList
- # object that contains information from the EPGDB and TV_CHANNELS and is
- # used internaly only, not modified (directly) by the user. This is used
- # by the tvguide, recordserver, webserver, and other helpers and is the
- # definative list of channels that Freevo cares about.
-
- TV_CHANNELLIST = None
-
-
#
# Read the environment set by the start script
--- 147,150 ----
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog