Index: Slim/Music/Info.pm =================================================================== RCS file: /home/cvs/cvsroot/slim/server/Slim/Music/Info.pm,v retrieving revision 1.39 diff -u -p -B -r1.39 Info.pm --- Slim/Music/Info.pm 18 Dec 2003 02:36:25 -0000 1.39 +++ Slim/Music/Info.pm 20 Dec 2003 11:11:31 -0000 @@ -1951,12 +1951,23 @@ sub readCoverArt { $::d_info && Slim::Utils::Misc::msg("Looking for image files\n"); my @filestotry = (); - if ($image eq 'thumb') { - if (Slim::Utils::Prefs::get('coverThumb')) { push @filestotry, Slim::Utils::Prefs::get('coverThumb'); } + if (Slim::Utils::Prefs::get('coverThumb')) { + my $cover = Slim::Utils::Prefs::get('coverThumb'); + if ($cover =~ m/\%(.*?)/isg) { + $cover = infoFormat($file, $1, "TITLE").".jpg"; + } + push @filestotry, $cover; + } push @filestotry, ('thumb.jpg', 'albumartsmall.jpg', 'cover.jpg', 'folder.jpg', 'album.jpg'); } else { - if (Slim::Utils::Prefs::get('coverArt')) { push @filestotry, Slim::Utils::Prefs::get('coverArt'); } + if (Slim::Utils::Prefs::get('coverArt')) { + my $cover = Slim::Utils::Prefs::get('coverArt'); + if ($cover =~ m/\%(.*?)/isg) { + $cover = infoFormat($file, $1, "TITLE").".jpg"; + } + push @filestotry, $cover; + } push @filestotry, ('cover.jpg', 'albumartsmall.jpg', 'folder.jpg', 'album.jpg', 'thumb.jpg'); }