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

Modified Files:
        tvguide.py 
Log Message:
Use TV_ALL_CHANNELS from config. 


Index: tvguide.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/tv/tvguide.py,v
retrieving revision 1.61
retrieving revision 1.62
diff -C2 -d -r1.61 -r1.62
*** tvguide.py  20 Nov 2004 18:23:04 -0000      1.61
--- tvguide.py  4 Dec 2004 01:46:46 -0000       1.62
***************
*** 10,13 ****
--- 10,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.62  2004/12/04 01:46:46  rshortt
+ # Use TV_ALL_CHANNELS from config.
+ #
  # Revision 1.61  2004/11/20 18:23:04  dischi
  # use python logger module for debug
***************
*** 121,127 ****
  from event import *
  from application import MenuApplication
- 
- from channels import get_channels
- 
  from item import Item
  
--- 124,127 ----
***************
*** 162,182 ****
          box.show()
  
!         try:
!             channels = get_channels()
!         except Exception, e:
              box.destroy()
              gui.AlertBox(text=_('TV Guide is corrupt!')).show()
-             print e
-             traceback.print_exc()
              return False
  
          self.current_time = int(time.time())
!         stop_time = self.current_time + 3*3600
!         channels.import_programs(self.current_time-3*3600, stop_time)
  
!         self.channel      = channels.get()
!         self.selected     = self.channel.get(self.current_time)[0]
  
-         self.channel_list = channels
          box.destroy()
          return True
--- 162,178 ----
          box.show()
  
!         if not config.TV_ALL_CHANNELS:
              box.destroy()
              gui.AlertBox(text=_('TV Guide is corrupt!')).show()
              return False
  
          self.current_time = int(time.time())
!         start_time = self.current_time - 1800
!         stop_time  = self.current_time + 3*3600
!         config.TV_ALL_CHANNELS.import_programs(start_time, stop_time)
  
!         self.channel  = config.TV_ALL_CHANNELS.get()
!         self.selected = self.channel.get(self.current_time)[0]
  
          box.destroy()
          return True
***************
*** 221,226 ****
              
          if event == MENU_UP:
!             self.channel_list.up()
!             self.channel  = self.channel_list.get()
              try:
                  self.selected = self.channel.get(self.current_time)[0]
--- 217,222 ----
              
          if event == MENU_UP:
!             config.TV_ALL_CHANNELS.up()
!             self.channel  = config.TV_ALL_CHANNELS.get()
              try:
                  self.selected = self.channel.get(self.current_time)[0]
***************
*** 231,236 ****
  
          elif event == MENU_DOWN:
!             self.channel_list.down()
!             self.channel  = self.channel_list.get()
              try:
                  self.selected = self.channel.get(self.current_time)[0]
--- 227,232 ----
  
          elif event == MENU_DOWN:
!             config.TV_ALL_CHANNELS.down()
!             self.channel  = config.TV_ALL_CHANNELS.get()
              try:
                  self.selected = self.channel.get(self.current_time)[0]
***************
*** 264,269 ****
          elif event == TV_SHOW_CHANNEL:
              items = []
!             channel = channels.get_settings_by_id(self.chan_id)
!             for prog in channel.get(time.time(), -1):
                  items.append(prog)
              cmenu = menu.Menu(self.channel.name, items)
--- 260,266 ----
          elif event == TV_SHOW_CHANNEL:
              items = []
!             # channel = 
config.TV_ALL_CHANNELS.get_settings_by_id(self.chan_id)
!             # for prog in channel.get(time.time(), -1):
!             for prog in self.selected.get(time.time(), -1):
                  items.append(prog)
              cmenu = menu.Menu(self.channel.name, items)
***************
*** 314,319 ****
          p = self.channel.player()
          if p:
!             app, device, freq = p
!             app.play(self.channel, device, freq)
  
  
--- 311,316 ----
          p = self.channel.player()
          if p:
!             app, device, uri = p
!             app.play(self.channel, device, uri)
  
  



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