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

Modified Files:
        audio_parser.py 
Log Message:
fix None handling

Index: audio_parser.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/mediadb/audio_parser.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** audio_parser.py     5 Apr 2005 18:48:17 -0000       1.2
--- audio_parser.py     5 Apr 2005 18:56:28 -0000       1.3
***************
*** 86,90 ****
      else:
          # no changes in all subdirs, looks good
!         if dirinfo['length'] != None:
              # Since 'length' is not None and the info is stored with mtime,
              # no changes in here. Do not parse everything again
--- 86,90 ----
      else:
          # no changes in all subdirs, looks good
!         if dirinfo['length'] != None and 0:
              # Since 'length' is not None and the info is stored with mtime,
              # no changes in here. Do not parse everything again
***************
*** 107,111 ****
          check_info(item)
          for type in ('artist', 'album', 'year'):
!             exec('%s = strcmp(dirinfo[type], %s)' % (type, type))
          length += item['length']
  
--- 107,111 ----
          check_info(item)
          for type in ('artist', 'album', 'year'):
!             exec('%s = strcmp(item[type], %s)' % (type, type))
          length += item['length']
  
***************
*** 132,136 ****
  
      for type in ('artist', 'album', 'year'):
!         if eval(type):
              dirinfo.store_with_mtime(type, eval(type))
  
--- 132,136 ----
  
      for type in ('artist', 'album', 'year'):
!         if eval(type) not in ( '', VARIOUS ):
              dirinfo.store_with_mtime(type, eval(type))
  
***************
*** 146,151 ****
      equal, return the string. If they are different, return VARIOUS.
      """
!     s1 = Unicode(s1)
!     s2 = Unicode(s2)
  
      if not s1 or not s2:
--- 146,153 ----
      equal, return the string. If they are different, return VARIOUS.
      """
!     if s1 != None:
!         s1 = Unicode(s1)
!     if s2 != None:
!         s2 = Unicode(s2)
  
      if not s1 or not s2:



-------------------------------------------------------
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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to