fetchart: sort image filenames (GC-452)

This commit is contained in:
Adrian Sampson 2012-10-25 18:02:22 -07:00
parent cf98bfcbe6
commit 57e66d7b1a
2 changed files with 5 additions and 2 deletions

View file

@ -117,10 +117,11 @@ def art_in_path(path):
for ext in IMAGE_EXTENSIONS:
if fn.lower().endswith('.' + ext):
images.append(fn)
images.sort()
# Look for "preferred" filenames.
for fn in images:
for name in COVER_NAMES:
for name in COVER_NAMES:
for fn in images:
if fn.lower().startswith(name):
log.debug('Using well-named art file %s' % fn)
return os.path.join(path, fn)

View file

@ -38,6 +38,8 @@ Changelog
the whitelist (thanks to Fabrice Laporte).
* :doc:`/plugins/lastgenre`: Add a ``lastgenre`` command for fetching genres
post facto (thanks to Jakob Schnitzer).
* :doc:`/plugins/fetchart`: Local image filenames are now used in alphabetical
order.
* :doc:`/plugins/fetchart`: Fix a bug where cover art filenames could lack
a ``.jpg`` extension.
* :doc:`/plugins/lyrics`: Fix an exception with non-ASCII lyrics.