summaryrefslogtreecommitdiff
path: root/nephilim
diff options
context:
space:
mode:
authorAnton Khirnov <wyskas@gmail.com>2009-03-02 18:34:02 +0100
committerAnton Khirnov <wyskas@gmail.com>2009-03-02 18:34:02 +0100
commitde1000591c9afbc95322171e088a6fb8a0349ff8 (patch)
treeb4a83b3b2e925f59433f06450c0657afc4a5725f /nephilim
parent8176f78a7b97b1618dff2387136d3413c6cfb822 (diff)
AlbumCover: fix guessing cover names.
Diffstat (limited to 'nephilim')
-rw-r--r--nephilim/plugins/AlbumCover.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/nephilim/plugins/AlbumCover.py b/nephilim/plugins/AlbumCover.py
index a1e9981..55e93e8 100644
--- a/nephilim/plugins/AlbumCover.py
+++ b/nephilim/plugins/AlbumCover.py
@@ -117,17 +117,18 @@ class wgAlbumCover(QtGui.QLabel):
self.cover_loaded = True
def fetch_local(self, song):
+ logging.info('Trying to guess local cover name.')
# guess cover name
covers = ['cover', 'album', 'front']
exts = []
for ext in QtGui.QImageReader().supportedImageFormats():
- exts.append(str(ext))
+ exts.append('*.%s'%str(ext))
filter = []
for cover in covers:
for ext in exts:
- filter.append('*.%s*.%s'%(cover,ext))
+ filter.append('*.%s%s'%(cover,ext))
dir = QtCore.QDir(self.cover_dirname)
if not dir:
@@ -139,6 +140,7 @@ class wgAlbumCover(QtGui.QLabel):
if files:
cover = QtGui.QPixmap(dir.filePath(files[0]))
if not cover.isNull():
+ logging.info('Found a cover.')
return cover
# if this failed, try any supported image
@@ -146,7 +148,7 @@ class wgAlbumCover(QtGui.QLabel):
files = dir.entryList()
if files:
return QtGui.QPixmap(dir.filePath(files[0]))
- logging.info("done probing: no matching albumcover found")
+ logging.info('No matching cover found')
return None
def fetch_amazon_manual(self):