Update of /cvsroot/freevo/freevo/src/video
In directory sc8-pr-cvs1:/tmp/cvs-serv8892

Modified Files:
        fxdimdb.py videoitem.py 
Log Message:
cleanup

Index: fxdimdb.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/video/fxdimdb.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** fxdimdb.py  14 Sep 2003 20:09:37 -0000      1.13
--- fxdimdb.py  20 Sep 2003 09:50:07 -0000      1.14
***************
*** 12,57 ****
  # -----------------------------------------------------------------------
  # $Log$
  # Revision 1.13  2003/09/14 20:09:37  dischi
  # removed some TRUE=1 and FALSE=0 add changed some debugs to _debug_
  #
- # Revision 1.12  2003/09/14 16:14:25  dischi
- # Oops, remove debug
- #
- # Revision 1.11  2003/09/14 16:14:02  dischi
- # fix imdb redirect
- #
- # Revision 1.10  2003/09/03 18:00:24  dischi
- # use mmpython to get the disc label
- #
- # Revision 1.9  2003/08/30 12:21:13  dischi
- # small changes for the changed xml_parser
- #
- # Revision 1.8  2003/08/27 19:24:08  dischi
- # smarter search
- #
- # Revision 1.7  2003/08/23 12:51:43  dischi
- # removed some old CVS log messages
- #
- # Revision 1.6  2003/08/23 10:41:24  dischi
- # Oops, remove debug
- #
- # Revision 1.5  2003/08/23 10:39:13  dischi
- # fixed "&" handling
- #
- # Revision 1.4  2003/08/20 21:54:13  outlyer
- # Use my Python version of 'touch'
- #
- # Revision 1.3  2003/07/20 16:09:19  dischi
- # & -> &
- #
- # Revision 1.2  2003/07/18 19:48:24  dischi
- # support for datadir
- #
- # Revision 1.1  2003/07/12 11:19:49  dischi
- # add new fxdimdb from den_RDC
- #
- # Revision 0.1  2003/07/08 22:31:00  den_RDC
- # Initial release.
- #
  # -----------------------------------------------------------------------
  # Freevo - A Home Theater PC framework
--- 12,21 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.14  2003/09/20 09:50:07  dischi
+ # cleanup
+ #
  # Revision 1.13  2003/09/14 20:09:37  dischi
  # removed some TRUE=1 and FALSE=0 add changed some debugs to _debug_
  #
  # -----------------------------------------------------------------------
  # Freevo - A Home Theater PC framework
***************
*** 91,101 ****
  import urllib, urllib2, urlparse
  import sys
- import string
  import codecs
  import os
- import util
- 
  
  import config 
  from xml_parser import parseMovieFile
  from mmpython.disc.discinfo import cdrom_disc_id
--- 55,64 ----
  import urllib, urllib2, urlparse
  import sys
  import codecs
  import os
  
  import config 
+ import util
+ 
  from xml_parser import parseMovieFile
  from mmpython.disc.discinfo import cdrom_disc_id
***************
*** 131,135 ****
          self.imdb_id_list = []
          self.imdb_id = None
!         self.isdiscset = FALSE
          self.title = ''
          self.info = {}
--- 94,98 ----
          self.imdb_id_list = []
          self.imdb_id = None
!         self.isdiscset = False
          self.title = ''
          self.info = {}
***************
*** 141,145 ****
          self.fxdfile = None # filename, full path, WITHOUT extension
  
!         self.append = FALSE
          self.device = None
          self.regexp = None
--- 104,108 ----
          self.fxdfile = None # filename, full path, WITHOUT extension
  
!         self.append = False
          self.device = None
          self.regexp = None
***************
*** 261,269 ****
  
      
!     def setFxdFile(self, fxdfilename = None, overwrite = FALSE):
          """
          fxdfilename (string, full path)
          Set fxd file to write to, may be omitted, may be an existing file
!         (data will be added) unless overwrite = TRUE
          """
          
--- 224,232 ----
  
      
!     def setFxdFile(self, fxdfilename = None, overwrite = False):
          """
          fxdfilename (string, full path)
          Set fxd file to write to, may be omitted, may be an existing file
!         (data will be added) unless overwrite = True
          """
          
***************
*** 274,278 ****
          
          else:
!             if self.isdiscset == TRUE:
                  self.fxdfile = os.path.join(config.MOVIE_DATA_DIR, 'disc-set',
                                              self.getmedia_id(self.device))
--- 237,241 ----
          
          else:
!             if self.isdiscset == True:
                  self.fxdfile = os.path.join(config.MOVIE_DATA_DIR, 'disc-set',
                                              self.getmedia_id(self.device))
***************
*** 284,296 ****
                                                    self.getmedia_id(device))
          
!         if overwrite == FALSE:
              try:
                  open(self.fxdfile + '.fxd')
!                 self.append = TRUE
              except: 
                  pass
!         else: self.append = FALSE
  
!         if self.append == TRUE and \
             parseMovieFile(self.fxdfile + '.fxd', None, []) == []:
              raise FxdImdb_XML_Error("FXD file to be updated is invalid, please 
correct it.")
--- 247,259 ----
                                                    self.getmedia_id(device))
          
!         if overwrite == False:
              try:
                  open(self.fxdfile + '.fxd')
!                 self.append = True
              except: 
                  pass
!         else: self.append = False
  
!         if self.append == True and \
             parseMovieFile(self.fxdfile + '.fxd', None, []) == []:
              raise FxdImdb_XML_Error("FXD file to be updated is invalid, please 
correct it.")
***************
*** 307,311 ****
          Set media file(s) for fxd
          """
!         if self.isdiscset == TRUE:
              raise FxdImdb_XML_Error("<disc-set> already used, can't use both "+
                                      "<movie> and <disc-set>")
--- 270,274 ----
          Set media file(s) for fxd
          """
!         if self.isdiscset == True:
              raise FxdImdb_XML_Error("<disc-set> already used, can't use both "+
                                      "<movie> and <disc-set>")
***************
*** 323,327 ****
          Set Variants & parts
          """
!         if self.isdiscset == TRUE:
              raise FxdImdb_XML_Error("<disc-set> already used, can't use both "+
                                      "<movie> and <disc-set>")
--- 286,290 ----
          Set Variants & parts
          """
!         if self.isdiscset == True:
              raise FxdImdb_XML_Error("<disc-set> already used, can't use both "+
                                      "<movie> and <disc-set>")
***************
*** 341,346 ****
          try:
              #should we add to an existing file?
!             if self.append == TRUE :
!                 if self.isdiscset == TRUE:
                      self.update_discset()
                  else: self.update_movie()
--- 304,309 ----
          try:
              #should we add to an existing file?
!             if self.append == True :
!                 if self.isdiscset == True:
                      self.update_discset()
                  else: self.update_movie()
***************
*** 349,353 ****
                  self.fetch_image()
                  #should we write a disc-set ?
!                 if self.isdiscset == TRUE:
                      self.write_discset()
                  else:
--- 312,316 ----
                  self.fetch_image()
                  #should we write a disc-set ?
!                 if self.isdiscset == True:
                      self.write_discset()
                  else:
***************
*** 391,395 ****
                                      "<movie> and <disc-set>")
          
!         self.isdiscset = TRUE
          if (not device and not regexp) or (device and regexp):
              raise FxdImdb_XML_Error("Can't use both media-id and regexp")
--- 354,358 ----
                                      "<movie> and <disc-set>")
          
!         self.isdiscset = True
          if (not device and not regexp) or (device and regexp):
              raise FxdImdb_XML_Error("Can't use both media-id and regexp")
***************
*** 419,423 ****
  
          
!     def guessImdb(self, filename, label=FALSE):
          """Guess possible imdb movies from filename. Same return as searchImdb"""
  
--- 382,386 ----
  
          
!     def guessImdb(self, filename, label=False):
          """Guess possible imdb movies from filename. Same return as searchImdb"""
  
***************
*** 429,433 ****
          name  = re.sub('([0-9])([a-zA-Z])', point_maker, name.lower())
  
!         if label == TRUE:
              for r in config.IMDB_REMOVE_FROM_LABEL:
                  name  = re.sub(r, '', name)
--- 392,396 ----
          name  = re.sub('([0-9])([a-zA-Z])', point_maker, name.lower())
  
!         if label == True:
              for r in config.IMDB_REMOVE_FROM_LABEL:
                  name  = re.sub(r, '', name)
***************
*** 545,549 ****
      def update_movie(self):
          """Updates an existing file, adds exftra dvd|vcd|file and variant tags"""
!         passedvid = FALSE
          #read existing file in memory
          try:
--- 508,512 ----
      def update_movie(self):
          """Updates an existing file, adds exftra dvd|vcd|file and variant tags"""
!         passedvid = False
          #read existing file in memory
          try:
***************
*** 567,571 ****
  
          for line in content.split('\n'):
!             if passedvid == TRUE and content.find('<variants>') == -1:
                  #there is no variants tag
                  if len(self.variant) != 0:
--- 530,534 ----
  
          for line in content.split('\n'):
!             if passedvid == True and content.find('<variants>') == -1:
                  #there is no variants tag
                  if len(self.variant) != 0:
***************
*** 574,578 ****
                      file.write('    </variants>\n')
                  file.write(line + '\n')
!                 passedvid = FALSE
                  
              elif regexp_video_end.match(line):
--- 537,541 ----
                      file.write('    </variants>\n')
                  file.write(line + '\n')
!                 passedvid = False
                  
              elif regexp_video_end.match(line):
***************
*** 580,584 ****
                      file.write(self.print_video())
                  file.write(line + '\n')
!                 passedvid = TRUE
                  
              elif regexp_variant_end.match(line):
--- 543,547 ----
                      file.write(self.print_video())
                  file.write(line + '\n')
!                 passedvid = True
                  
              elif regexp_variant_end.match(line):

Index: videoitem.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/video/videoitem.py,v
retrieving revision 1.83
retrieving revision 1.84
diff -C2 -d -r1.83 -r1.84
*** videoitem.py        19 Sep 2003 22:10:56 -0000      1.83
--- videoitem.py        20 Sep 2003 09:50:07 -0000      1.84
***************
*** 11,14 ****
--- 11,17 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.84  2003/09/20 09:50:07  dischi
+ # cleanup
+ #
  # Revision 1.83  2003/09/19 22:10:56  dischi
  # clear osd before playing with xine
***************
*** 64,77 ****
  import re
  import md5
  
  import config
  import util
- 
  import rc
- import event as em
  import menu
! import time
! import copy
! import mmpython
  
  from gui.PopupBox import PopupBox
--- 67,80 ----
  import re
  import md5
+ import time
+ import copy
+ import mmpython
  
  import config
  import util
  import rc
  import menu
! import configure
! import plugin
  
  from gui.PopupBox import PopupBox
***************
*** 80,86 ****
  
  from item import Item
! 
! import configure
! import plugin
  
  
--- 83,87 ----
  
  from item import Item
! from event import *
  
  
***************
*** 118,122 ****
              self.name     = util.getname(filename)
          self.basename = os.path.basename(os.path.splitext(filename)[0])
!         self.tv_show  = FALSE
          self.mplayer_options = ''
          self.xml_file = None
--- 119,123 ----
              self.name     = util.getname(filename)
          self.basename = os.path.basename(os.path.splitext(filename)[0])
!         self.tv_show  = False
          self.mplayer_options = ''
          self.xml_file = None
***************
*** 141,145 ****
                      self.mplayer_options = tvinfo[2]
  
!                 self.tv_show = TRUE
                  self.show_name = show_name
              
--- 142,146 ----
                      self.mplayer_options = tvinfo[2]
  
!                 self.tv_show = True
                  self.show_name = show_name
              
***************
*** 308,312 ****
              self.menuw = menuw
  
!         self.plugin_eventhandler(em.PLAY, menuw)
  
          # dvd playback for whole dvd
--- 309,313 ----
              self.menuw = menuw
  
!         self.plugin_eventhandler(PLAY, menuw)
  
          # dvd playback for whole dvd
***************
*** 390,394 ****
                                  handler=do_tryagain ).show()
                      
!                     rc.post_event( em.PLAY_END )
  
                      return
--- 391,395 ----
                                  handler=do_tryagain ).show()
                      
!                     rc.post_event( PLAY_END )
  
                      return
***************
*** 405,409 ****
                      AlertBox(text=_('Media not found for %s track %s') % \
                               (self.mode, file)).show()
!                     rc.post_event(em.PLAY_END)
                      return
  
--- 406,410 ----
                      AlertBox(text=_('Media not found for %s track %s') % \
                               (self.mode, file)).show()
!                     rc.post_event(PLAY_END)
                      return
  
***************
*** 489,493 ****
          if error:
              AlertBox(text=error).show()
!             rc.post_event(em.PLAY_END)
  
  
--- 490,494 ----
          if error:
              AlertBox(text=error).show()
!             rc.post_event(PLAY_END)
  
  
***************
*** 548,556 ****
  
          if self.plugin_eventhandler(event, menuw):
!             return TRUE
  
          # PLAY_END: do have have to play another file?
          if self.subitems:
!             if event == em.PLAY_END:
                  try:
                      pos = self.subitems.index(self.current_subitem)
--- 549,557 ----
  
          if self.plugin_eventhandler(event, menuw):
!             return True
  
          # PLAY_END: do have have to play another file?
          if self.subitems:
!             if event == PLAY_END:
                  try:
                      pos = self.subitems.index(self.current_subitem)
***************
*** 559,574 ****
                          print "playing next item"
                          self.current_subitem.play(menuw=menuw)
!                         return TRUE
                  except:
                      pass
!             elif event == em.USER_END:
                  pass
  
          # show configure menu
!         if event == em.MENU:
              self.video_player.stop()
              self.settings(menuw=menuw)
              menuw.show()
!             return TRUE
          
          # give the event to the next eventhandler in the list
--- 560,575 ----
                          print "playing next item"
                          self.current_subitem.play(menuw=menuw)
!                         return True
                  except:
                      pass
!             elif event == USER_END:
                  pass
  
          # show configure menu
!         if event == MENU:
              self.video_player.stop()
              self.settings(menuw=menuw)
              menuw.show()
!             return True
          
          # give the event to the next eventhandler in the list




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to