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

Modified Files:
        __init__.py channels.py tvcards.py 
Log Message:
delete old tv variables, rename some and fix detection

Index: tvcards.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/config/tvcards.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** tvcards.py  4 Dec 2004 01:19:48 -0000       1.3
--- tvcards.py  5 Dec 2004 13:01:10 -0000       1.4
***************
*** 88,91 ****
--- 88,92 ----
  class DVBCard:
      def __init__(self, number):
+         self.number  = number
          self.adapter = '/dev/dvb/adapter' + number
          self.number = number
***************
*** 111,115 ****
  
  
! # auto-load TV_SETTINGS:
  tvn = 0
  ivtvn = 0
--- 112,117 ----
  
  
! # auto-load TV_CARDS:
! log.info('Detecting TV cards.')
  tvn = 0
  ivtvn = 0
***************
*** 118,125 ****
          if os.path.exists('/dev/bktr%s' % i):
              key = 'tv%s' % i
!             config.TV_SETTINGS[key] = TVCard
!             config.TV_SETTINGS[key].vdev = '/dev/bktr%s' % i
!             config.TV_SETTINGS[key].driver = 'bsdbt848'
!             config.TV_SETTINGS[key].input = 1
              log.debug('BSD TV card detected as %s' % key)
  
--- 120,127 ----
          if os.path.exists('/dev/bktr%s' % i):
              key = 'tv%s' % i
!             config.TV_CARDS[key] = TVCard
!             config.TV_CARDS[key].vdev = '/dev/bktr%s' % i
!             config.TV_CARDS[key].driver = 'bsdbt848'
!             config.TV_CARDS[key].input = 1
              log.debug('BSD TV card detected as %s' % key)
  
***************
*** 128,132 ****
      if os.path.isdir('/dev/dvb/adapter%s' % i):
          try:
!             config.TV_SETTINGS['dvb%s' % i] = DVBCard
              log.debug('DVB card detected as dvb%s' % i)
          except OSError:
--- 130,134 ----
      if os.path.isdir('/dev/dvb/adapter%s' % i):
          try:
!             config.TV_CARDS['dvb%s' % i] = DVBCard
              log.debug('DVB card detected as dvb%s' % i)
          except OSError:
***************
*** 160,166 ****
              key = '%s%s' % (type,ivtvn)
              log.debug('IVTV card detected as %s' % key)
!             config.TV_SETTINGS[key]  = IVTVCard
              if ivtvn != i:
!                 config.TV_SETTINGS[key].vdev = vdev
              ivtvn = ivtvn + 1
  
--- 162,168 ----
              key = '%s%s' % (type,ivtvn)
              log.debug('IVTV card detected as %s' % key)
!             config.TV_CARDS[key]  = IVTVCard
              if ivtvn != i:
!                 config.TV_CARDS[key].vdev = vdev
              ivtvn = ivtvn + 1
  
***************
*** 169,183 ****
              key = '%s%s' % (type,tvn)
              log.debug('TV card detected as %s' % key)
!             config.TV_SETTINGS[key]  = TVCard
              if tvn != i:
!                 config.TV_SETTINGS[key].vdev = vdev
              tvn = tvn + 1
  
!         config.TV_SETTINGS[key].driver = driver
  
! if not config.TV_DEFAULT_SETTINGS:
      for type in ['dvb0', 'tv0', 'ivtv0']:
!         if type in config.TV_SETTINGS.keys():
!             config.TV_DEFAULT_SETTINGS = type
              break
  
--- 171,187 ----
              key = '%s%s' % (type,tvn)
              log.debug('TV card detected as %s' % key)
!             config.TV_CARDS[key]  = TVCard
              if tvn != i:
!                 config.TV_CARDS[key].vdev = vdev
              tvn = tvn + 1
  
!         config.TV_CARDS[key].driver = driver
  
! 
! # set default device
! if not config.TV_DEFAULT_DEVICE:
      for type in ['dvb0', 'tv0', 'ivtv0']:
!         if type in config.TV_CARDS.keys():
!             config.TV_DEFAULT_DEVICE = type[:-1]
              break
  

Index: channels.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/config/channels.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** channels.py 4 Dec 2004 01:19:48 -0000       1.1
--- channels.py 5 Dec 2004 13:01:10 -0000       1.2
***************
*** 44,54 ****
      log.info('Detecting TV channels.')
  
!     config.TV_ALL_CHANNELS = ChannelList()
!     log.debug('got %d channels' % len(config.TV_ALL_CHANNELS.channel_list))
  
      # add all possible channels to the cards
!     for card in config.TV_SETTINGS:
          channels = {}
!         for chan in config.TV_ALL_CHANNELS.get_all():
              for u in chan.uri:
                  if u.find(':') == -1: continue  # safeguard, shouldn't happen
--- 44,54 ----
      log.info('Detecting TV channels.')
  
!     config.TV_CHANNELLIST = ChannelList()
!     log.debug('got %d channels' % len(config.TV_CHANNELLIST.channel_list))
  
      # add all possible channels to the cards
!     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
***************
*** 56,60 ****
                      channels[String(chan.chan_id)] = u.split(':', 1)[1]
      
!         config.TV_SETTINGS[card].channels = channels
  
  refresh()
--- 56,60 ----
                      channels[String(chan.chan_id)] = u.split(':', 1)[1]
      
!         config.TV_CARDS[card].channels = channels
  
  refresh()

Index: __init__.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/config/__init__.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** __init__.py 4 Dec 2004 01:34:02 -0000       1.2
--- __init__.py 5 Dec 2004 13:01:10 -0000       1.3
***************
*** 145,152 ****
          dict.__setitem__(self, key, val(number))
      
! TV_SETTINGS = TVSettings()
! 
! TV_DEFAULT_SETTINGS = None
! 
  
  # Internal list of all channels Freevo cares about.  This is a ChannelList
--- 145,149 ----
          dict.__setitem__(self, key, val(number))
      
! TV_CARDS = TVSettings()
  
  # Internal list of all channels Freevo cares about.  This is a ChannelList
***************
*** 156,160 ****
  # definative list of channels that Freevo cares about.
  
! TV_ALL_CHANNELS = None
  
  
--- 153,157 ----
  # definative list of channels that Freevo cares about.
  
! TV_CHANNELLIST = None
  
  



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