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

Modified Files:
        __init__.py 
Log Message:
save coversearch result

Index: __init__.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/__init__.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** __init__.py 31 Jan 2004 12:39:47 -0000      1.23
--- __init__.py 13 Feb 2004 17:26:25 -0000      1.24
***************
*** 10,13 ****
--- 10,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.24  2004/02/13 17:26:25  dischi
+ # save coversearch result
+ #
  # Revision 1.23  2004/01/31 12:39:47  dischi
  # delete unused audio variables
***************
*** 77,80 ****
--- 80,84 ----
  import os
  import re
+ import stat
  
  import config
***************
*** 131,145 ****
          """
          if not diritem.image:
!             # Pick an image if it is the only image in this dir, or it matches
!             # the configurable regexp
!             files = util.find_matches(vfs.listdir(diritem.dir, include_overlay=True),
!                                       ('jpg', 'gif', 'png' ))
!             if len(files) == 1:
!                 diritem.image = os.path.join(diritem.dir, files[0])
!             elif len(files) > 1:
!                 covers = filter(cover_filter, files)
!                 if covers:
!                     diritem.image = os.path.join(diritem.dir, covers[0])
! 
          if not diritem.info.has_key('title') and diritem.parent:
              # ok, try some good name creation
--- 135,156 ----
          """
          if not diritem.image:
!             timestamp = os.stat(diritem.dir)[stat.ST_MTIME]
!             if not diritem['coversearch_timestamp'] or \
!                    timestamp > diritem['coversearch_timestamp']:
!                 # Pick an image if it is the only image in this dir, or it matches
!                 # the configurable regexp
!                 files = util.find_matches(vfs.listdir(diritem.dir, 
include_overlay=True),
!                                           ('jpg', 'gif', 'png' ))
!                 if len(files) == 1:
!                     diritem.image = os.path.join(diritem.dir, files[0])
!                 elif len(files) > 1:
!                     covers = filter(cover_filter, files)
!                     if covers:
!                         diritem.image = os.path.join(diritem.dir, covers[0])
!                 diritem.store_info('coversearch_timestamp', timestamp)
!                 diritem.store_info('coversearch_result', diritem.image)
!             else:
!                 diritem.image = diritem['coversearch_result']
!                 
          if not diritem.info.has_key('title') and diritem.parent:
              # ok, try some good name creation



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to