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

Modified Files:
        videoitem.py 
Log Message:
o remove trailing whitespaces
o use new database attribute names


Index: videoitem.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/video/videoitem.py,v
retrieving revision 1.153
retrieving revision 1.154
diff -C2 -d -r1.153 -r1.154
*** videoitem.py        20 Nov 2004 18:23:05 -0000      1.153
--- videoitem.py        18 Dec 2004 18:10:57 -0000      1.154
***************
*** 1,6 ****
  # -*- coding: iso-8859-1 -*-
! # -----------------------------------------------------------------------
  # videoitem.py - Item for video objects
! # -----------------------------------------------------------------------
  # $Id$
  #
--- 1,6 ----
  # -*- coding: iso-8859-1 -*-
! # 
-----------------------------------------------------------------------------
  # videoitem.py - Item for video objects
! # 
-----------------------------------------------------------------------------
  # $Id$
  #
***************
*** 10,54 ****
  # VideoItems.
  #
! # Notes:
! #
! # Todo:        
! #
! # -----------------------------------------------------------------------
! # $Log$
! # Revision 1.153  2004/11/20 18:23:05  dischi
! # use python logger module for debug
! #
! # Revision 1.152  2004/11/13 15:54:12  dischi
! # small bugfix
! #
! # Revision 1.151  2004/10/22 18:43:54  dischi
! # make sure aspect is a string
! #
! # Revision 1.150  2004/09/14 20:07:04  dischi
! # restructure and add docs
! #
! # Revision 1.149  2004/08/28 17:18:07  dischi
! # fix multiple files in one video when replaying
! #
! # Revision 1.148  2004/08/27 14:23:39  dischi
! # VideoItem is now based on MediaItem
! #
! # Revision 1.147  2004/08/24 16:42:44  dischi
! # Made the fxdsettings in gui the theme engine and made a better
! # integration for it. There is also an event now to let the plugins
! # know that the theme is changed.
! #
! # Revision 1.146  2004/08/01 10:46:34  dischi
! # remove menuw hiding, add some test code
! #
! # Revision 1.145  2004/07/26 18:10:19  dischi
! # move global event handling to eventhandler.py
  #
! # Revision 1.144  2004/07/21 11:34:59  dischi
! # disable one track auto-play for dvd
  #
- # -----------------------------------------------------------------------
- # Freevo - A Home Theater PC framework
- # Copyright (C) 2002 Krister Lagerstrom, et al. 
  # Please see the file freevo/Docs/CREDITS for a complete list of authors.
  #
--- 10,20 ----
  # VideoItems.
  #
! # 
-----------------------------------------------------------------------------
! # Freevo - A Home Theater PC framework
! # Copyright (C) 2002-2004 Krister Lagerstrom, Dirk Meyer, et al.
  #
! # First Edition: Dirk Meyer <[EMAIL PROTECTED]>
! # Maintainer:    Dirk Meyer <[EMAIL PROTECTED]>
  #
  # Please see the file freevo/Docs/CREDITS for a complete list of authors.
  #
***************
*** 67,81 ****
  # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  #
! # ----------------------------------------------------------------------- */
! 
  
  import os
  import copy
  
  import config
  import util
  import eventhandler
  import menu
- import configure
  import plugin
  import util.videothumb
--- 33,48 ----
  # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  #
! # 
-----------------------------------------------------------------------------
  
+ # python imports
  import os
  import copy
+ import logging
  
+ # freevo imports
  import config
  import util
  import eventhandler
  import menu
  import plugin
  import util.videothumb
***************
*** 86,92 ****
  from event import *
  
! from database import tv_show_informations, discset_informations
  
! import logging
  log = logging.getLogger('video')
  
--- 53,61 ----
  from event import *
  
! # video imports
! import configure
! import database
  
! # get logging object
  log = logging.getLogger('video')
  
***************
*** 117,121 ****
          self.selected_audio    = None
          self.elapsed           = 0
!         
          self.possible_player   = []
  
--- 86,90 ----
          self.selected_audio    = None
          self.elapsed           = 0
! 
          self.possible_player   = []
  
***************
*** 134,139 ****
                  if image:
                      self.image = image
!                 if tv_show_informations.has_key(show_name[0].lower()):
!                     tvinfo = tv_show_informations[show_name[0].lower()]
                      self.info.set_variables(tvinfo[1])
                      if not self.image:
--- 103,108 ----
                  if image:
                      self.image = image
!                 if database.tv_shows.has_key(show_name[0].lower()):
!                     tvinfo = database.tv_shows[show_name[0].lower()]
                      self.info.set_variables(tvinfo[1])
                      if not self.image:
***************
*** 145,157 ****
                  self.tv_show_name  = show_name[0]
                  self.tv_show_ep    = show_name[3]
!                 
!         # extra infos in discset_informations
          if parent and parent.media:
              fid = parent.media.id + \
                    self.filename[len(os.path.join(parent.media.mountdir,"")):]
!             if discset_informations.has_key(fid):
!                 self.mplayer_options = discset_informations[fid]
  
-         
      def set_url(self, url, info=True):
          """
--- 114,126 ----
                  self.tv_show_name  = show_name[0]
                  self.tv_show_ep    = show_name[3]
! 
!         # extra infos in database.discset
          if parent and parent.media:
              fid = parent.media.id + \
                    self.filename[len(os.path.join(parent.media.mountdir,"")):]
!             if database.discset.has_key(fid):
!                 self.mplayer_options = database.discset[fid]
! 
  
      def set_url(self, url, info=True):
          """
***************
*** 178,187 ****
              else:
                  self.filename = ''
!                 
          elif url.endswith('.iso') and self.info['mime'] == 'video/dvd':
              self.mimetype = 'dvd'
              self.mode     = 'dvd'
              self.url      = 'dvd' + self.url[4:] + '/'
!             
          if not self.image or (self.parent and self.image == 
self.parent.image):
             image = vfs.getoverlay(self.filename + '.raw')
--- 147,156 ----
              else:
                  self.filename = ''
! 
          elif url.endswith('.iso') and self.info['mime'] == 'video/dvd':
              self.mimetype = 'dvd'
              self.mode     = 'dvd'
              self.url      = 'dvd' + self.url[4:] + '/'
! 
          if not self.image or (self.parent and self.image == 
self.parent.image):
             image = vfs.getoverlay(self.filename + '.raw')
***************
*** 194,199 ****
              # force deinterlacing
              self['deinterlace'] = 1
!                
!         
      def id(self):
          """
--- 163,168 ----
              # force deinterlacing
              self['deinterlace'] = 1
! 
! 
      def id(self):
          """
***************
*** 221,225 ****
              aspect = str(self.info['aspect'])
              return aspect[:aspect.find(' ')].replace('/', ':')
!             
          if key == 'runtime':
              length = None
--- 190,194 ----
              aspect = str(self.info['aspect'])
              return aspect[:aspect.find(' ')].replace('/', ':')
! 
          if key == 'runtime':
              length = None
***************
*** 249,253 ****
          return MediaItem.__getitem__(self, key)
  
!     
      def sort(self, mode=None):
          """
--- 218,222 ----
          return MediaItem.__getitem__(self, key)
  
! 
      def sort(self, mode=None):
          """
***************
*** 282,286 ****
              del self.conf_select_this_item
              return True
!             
          cont = 1
          from_start = 0
--- 251,255 ----
              del self.conf_select_this_item
              return True
! 
          cont = 1
          from_start = 0
***************
*** 332,337 ****
          possible_player.sort(lambda l, o: -cmp(l[0], o[0]))
          return possible_player
!     
!         
      # ------------------------------------------------------------------------
      # actions:
--- 301,306 ----
          possible_player.sort(lambda l, o: -cmp(l[0], o[0]))
          return possible_player
! 
! 
      # ------------------------------------------------------------------------
      # actions:
***************
*** 361,365 ****
                  items = [ ( self.dvd_vcd_title_menu, _('DVD title list') ),
                            (self.play, _('Play default track')) ]
!                     
          elif self.url == 'vcd://':
              if self.player_rating >= 20:
--- 330,334 ----
                  items = [ ( self.dvd_vcd_title_menu, _('DVD title list') ),
                            (self.play, _('Play default track')) ]
! 
          elif self.url == 'vcd://':
              if self.player_rating >= 20:
***************
*** 412,416 ****
          # delete the submenu that got us here
          menuw.delete_submenu(False)
!         
          # build a menu
          items = []
--- 381,385 ----
          # delete the submenu that got us here
          menuw.delete_submenu(False)
! 
          # build a menu
          items = []
***************
*** 453,457 ****
          self.play(menuw=menuw, arg='-cache 65536')
  
!         
      def play_alternate(self, arg=None, menuw=None):
          """
--- 422,426 ----
          self.play(menuw=menuw, arg='-cache 65536')
  
! 
      def play_alternate(self, arg=None, menuw=None):
          """
***************
*** 477,481 ****
          else:
              menuw = self.menuw
!             
          if self.variants:
              # if we have variants, play the first one as default
--- 446,450 ----
          else:
              menuw = self.menuw
! 
          if self.variants:
              # if we have variants, play the first one as default
***************
*** 513,517 ****
                      # eventhandler()
                      self.eventhandler(PLAY_END)
!                     
              elif not result:
                  # No media at all was found: error
--- 482,486 ----
                      # eventhandler()
                      self.eventhandler(PLAY_END)
! 
              elif not result:
                  # No media at all was found: error
***************
*** 563,567 ****
          if not self.possible_player:
              self.possible_player = self._get_possible_player()
!         
          if alternateplayer:
              self.possible_player.reverse()
--- 532,536 ----
          if not self.possible_player:
              self.possible_player = self._get_possible_player()
! 
          if alternateplayer:
              self.possible_player.reverse()
***************
*** 626,630 ****
                  self._set_next_available_subitem()
                  # Loop until we find a subitem which plays without error
!                 while self.current_subitem: 
                      log.info('playing next item')
                      error = self.current_subitem.play()
--- 595,599 ----
                  self._set_next_available_subitem()
                  # Loop until we find a subitem which plays without error
!                 while self.current_subitem:
                      log.info('playing next item')
                      error = self.current_subitem.play()
***************
*** 638,642 ****
                      # No more subitems to play, and an error occured
                      AlertBox(text=self.last_error_msg).show()
!                     
              elif event == USER_END:
                  pass
--- 607,611 ----
                      # No more subitems to play, and an error occured
                      AlertBox(text=self.last_error_msg).show()
! 
              elif event == USER_END:
                  pass
***************
*** 649,652 ****
              self.menuw.pushmenu(confmenu)
              return True
!         
          return MediaItem.eventhandler(self, event)
--- 618,621 ----
              self.menuw.pushmenu(confmenu)
              return True
! 
          return MediaItem.eventhandler(self, event)



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