Update of /cvsroot/freevo/freevo/src/record
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26861/record

Modified Files:
        server.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: server.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/record/server.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** server.py   4 Dec 2004 01:22:18 -0000       1.24
--- server.py   9 Dec 2004 20:26:32 -0000       1.25
***************
*** 85,90 ****
          config.detect('tvcards', 'channels')
          plugin.init(exclusive = [ 'record' ])
-         # db access to match favorites
-         self.epgdb = pyepg.get_epg(EPGDB)
          # file to load / save the recordings and favorites
          self.fxdfile = sysconfig.datafile('recordserver.fxd')
--- 85,88 ----
***************
*** 194,204 ****
          log.info('recordserver.check_favorites')
          for f in copy.copy(self.favorites):
!             for entry in self.epgdb.search_programs(f.name):
!                 dbid, channel, title, subtitle, descr, episode, \
!                       start, stop = entry[:8]
!                 if not f.match(title, channel, start):
                      continue
!                 r = Recording(self.rec_id, title, channel, f.priority,
!                               start, stop)
                  if r in self.recordings:
                      # This does not only avoids adding recordings twice, it
--- 192,200 ----
          log.info('recordserver.check_favorites')
          for f in copy.copy(self.favorites):
!             for p in pyepg.guide.search_programs(f.name):
!                 if not f.match(p.title, p.channel.id, p.start):
                      continue
!                 r = Recording(self.rec_id, p.title, p.channel.id, f.priority,
!                               p.start, p.stop)
                  if r in self.recordings:
                      # This does not only avoids adding recordings twice, it
***************
*** 206,213 ****
                      # again.
                      continue
!                 r.episode  = episode
!                 r.subtitle = subtitle
!                 log.info('added %s: %s (%s)' % (String(channel),
!                                                 String(title), start))
                  f.add_data(r)
                  self.recordings.append(r)
--- 202,209 ----
                      # again.
                      continue
!                 r.episode  = p.episode
!                 r.subtitle = p.subtitle
!                 log.info('added %s: %s (%s)' % (String(p.channel.id),
!                                                 String(p.title), p.start))
                  f.add_data(r)
                  self.recordings.append(r)
***************
*** 331,335 ****
                    self.parse_parameter(val, ( int, int, dict ))
              channel, name, subtitle, descr, episode, \
!                      start, stop = self.epgdb.get_programs_by_id(dbid)[1:8]
              if subtitle and not info.has_key('subtitle'):
                  info['subtitle'] = subtitle
--- 327,331 ----
                    self.parse_parameter(val, ( int, int, dict ))
              channel, name, subtitle, descr, episode, \
!                      start, stop = pyepg.guide.get_programs_by_id(dbid)[1:8]
              if subtitle and not info.has_key('subtitle'):
                  info['subtitle'] = subtitle



-------------------------------------------------------
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

Reply via email to