Update of /cvsroot/freevo/freevo/lib/pyepg
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29035

Modified Files:
        channel.py 
Log Message:
do not import programs after STOP_TIME

Index: channel.py
===================================================================
RCS file: /cvsroot/freevo/freevo/lib/pyepg/channel.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** channel.py  28 Dec 2004 19:50:01 -0000      1.9
--- channel.py  8 Jan 2005 12:02:32 -0000       1.10
***************
*** 104,108 ****
  
  
!     def __import_programs(self, start, stop=-1, progs=[]):
          """
          Get programs from the database to create Program from then
--- 104,108 ----
  
  
!     def __import_programs(self, start, stop=-1):
          """
          Get programs from the database to create Program from then
***************
*** 115,121 ****
          # keep the notifier alive
          notifier_counter = 0
!         if not progs:
!             progs = self.__epg.sql_get_programs(self.id, start, stop)
!         for p in progs:
              i = Program(p.id, p.title, p.start, p.stop, p.episode, p.subtitle,
                          p['description'], channel=self)
--- 115,119 ----
          # keep the notifier alive
          notifier_counter = 0
!         for p in self.__epg.sql_get_programs(self.id, start, stop):
              i = Program(p.id, p.title, p.start, p.stop, p.episode, p.subtitle,
                          p['description'], channel=self)
***************
*** 128,133 ****
              #       ratings and advisories.
  
!         l = len(new_progs)
!         if not l:
              # No programs found? That's bad. Try to find the last before start
              # and the first after end and create a dummy.
--- 126,130 ----
              #       ratings and advisories.
  
!         if not new_progs:
              # No programs found? That's bad. Try to find the last before start
              # and the first after end and create a dummy.
***************
*** 178,183 ****
                  # __import_programs calling the first one and the last could
                  # already be in self.programs
!                 if (p == new_progs[0] or p == new_progs[-1]) and \
!                    p in self.programs:
                      continue
                  self.programs.append(p)
--- 175,179 ----
                  # __import_programs calling the first one and the last could
                  # already be in self.programs
!                 if (p == p0 or p == p1) and p in self.programs:
                      continue
                  self.programs.append(p)
***************
*** 212,215 ****
--- 208,213 ----
          if start < START_TIME + 120:
              start = START_TIME + 120
+         if start > STOP_TIME - 120:
+             start = STOP_TIME - 120
          if stop > 0 and stop > STOP_TIME - 120:
              stop = STOP_TIME - 120



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to