I've already read that page, and the existing functionality doesn't
support different rules for compilations.
But if you add this code to Artwork.pm, around line 304, SC will find
"Various Artists - AlbumName.jpg"
and "(Multiple Artists) - AlbumName.jpg"
Code:
--------------------
my $IsCompilation = $track->album->compilation;
if (!$body && $IsCompilation && defined $artDir) {
my $vaStr = $prefs->get('variousArtistsString');
my $aname = $track->album->name;
if ( $vaStr eq "" ) {
$vaStr = "Various Artists";
}
## first look for the image based on
variousArtistsString
my $vaArtwork = $vaStr . " - " . $aname . ".jpg";
if (Slim::Utils::OSDetect::OS() eq 'win') {
# Remove illegal characters from filename.
$vaArtwork =~ s/\\|\/|\:|\*|\?|\"|<|>|\|//g;
}
$artPath = $artDir->file($vaArtwork)->stringify;
$log->info("looking for image $artPath based on VA string $vaStr");
($body, $contentType) = $class->getImageContentAndType($artPath);
## if we didn't find it, look for it based on a
static string rule
if (!$body) {
$vaStr = "(Multiple Artists)";
$vaArtwork = $vaStr . " - " . $aname . ".jpg";
if (Slim::Utils::OSDetect::OS() eq 'win') {
# Remove illegal characters from
filename.
$vaArtwork =~
s/\\|\/|\:|\*|\?|\"|<|>|\|//g;
}
$artPath =
$artDir->file($vaArtwork)->stringify;
$log->info("looking for image $artPath based
on VA string $vaStr");
($body, $contentType) =
$class->getImageContentAndType($artPath);
}
}
--------------------
--
jmx
------------------------------------------------------------------------
jmx's Profile: http://forums.slimdevices.com/member.php?userid=10536
View this thread: http://forums.slimdevices.com/showthread.php?t=44399
_______________________________________________
discuss mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/discuss