Skip to content

Commit a654a9a

Browse files
committed
Prevent "Error: Couldn't load module: (jpg)" messages
Check for a valid $formatClass before calling loadTagFormatForType() to avoid logging the following error msg when displaying cover art from the Now Playing view. Slim::Formats::loadTagFormatForType (121) Error: Couldn't load module: (jpg) : [syntax error at (eval 5460) line 1, at EOF Signed-off-by: Sam Y <syahres@gmail.com>
1 parent 287ab9a commit a654a9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Slim/Web/Graphics.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ sub artworkRequest {
453453
my $formatClass = Slim::Formats->classForFormat($ct);
454454
my $body;
455455

456-
if (Slim::Formats->loadTagFormatForType($ct) && $formatClass->can('getCoverArt')) {
456+
if ($formatClass && $formatClass->can('getCoverArt') && Slim::Formats->loadTagFormatForType($ct)) {
457457
$body = $formatClass->getCoverArt($fullpath);
458458
}
459459

0 commit comments

Comments
 (0)