Update of /cvsroot/freevo/freevo/src/audio
In directory sc8-pr-cvs1:/tmp/cvs-serv24136

Modified Files:
        audioitem.py 
Log Message:
use util functions to get the image

Index: audioitem.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/audioitem.py,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** audioitem.py        28 Nov 2003 20:08:57 -0000      1.41
--- audioitem.py        12 Dec 2003 19:20:46 -0000      1.42
***************
*** 10,13 ****
--- 10,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.42  2003/12/12 19:20:46  dischi
+ # use util functions to get the image
+ #
  # Revision 1.41  2003/11/28 20:08:57  dischi
  # renamed some config variables
***************
*** 49,53 ****
  import time
  import re
- import imghdr
  import traceback
  import config
--- 52,55 ----
***************
*** 96,116 ****
              self.length = 0
              
!         cover_logo = os.path.dirname(file)+'/cover.'
! 
!         # Only draw the cover if the file exists. We'll
!         # use the standard imghdr function to check if
!         # it's a real png, and not a lying one :)
! 
!         # Check for cover in local dir
!         if os.path.isfile(cover_logo+'png') and imghdr.what(cover_logo+'png'):
!             self.image = cover_logo+'png'
!         elif os.path.isfile(cover_logo+'jpg') and imghdr.what(cover_logo+'jpg'):
!             self.image = cover_logo+'jpg'
  
          # Allow per mp3 covers. As per Chris' request ;)
!         if os.path.isfile(os.path.splitext(file)[0] + '.png'):
!             self.image = os.path.splitext(file)[0] + '.png'
!         elif os.path.isfile(os.path.splitext(file)[0] + '.jpg'):
!             self.image = os.path.splitext(file)[0] + '.jpg'
  
          # Let's try to find if there is any image in the current directory
--- 98,105 ----
              self.length = 0
              
!         self.image = util.getimage(os.path.dirname(file)+'/cover', self.image)
  
          # Allow per mp3 covers. As per Chris' request ;)
!         self.image = util.getimage(file[:file.rfind('.')], self.image)
  
          # Let's try to find if there is any image in the current directory




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to