Thanks, Carsten. I think I might have a more automated solution, but
it's "random perl hacking." The hack consists of adding one line to
Common.pm in the MusicArtistInfo plugin directory. If you're comfortable
modifying a perl file (after backing it up) I was wondering if you'd
mind trying to reproduce the fix since you've already reproduced the
problem. The change is in the bottom code block of this post.

*Background:* If I am reading the code correctly, the file names for the
Artist images are calculated in Imported::filename as

Code:
--------------------
    Slim::Utils::Misc::cleanupFilename(
                Slim::Utils::Unicode::encode_locale(
                        Slim::Utils::Text::ignorePunct($artist)
                )
--------------------

However, when checking for the existence of the file, it calls
Common::getLocalNameVariants which doesn't have the same transformation
of the name in the candidate list.

*Fix?:* So I tried to fix by simply adding the same expression to the
list of candidate file names by adding the bolded line below.

Code:
--------------------
    sub getLocalnameVariants {
  my ($name) = @_;
  
  my @candidates = (
  $name,
  Slim::Utils::Unicode::utf8encode($name),
  
*Slim::Utils::Misc::cleanupFilename(Slim::Utils::Unicode::encode_locale(Slim::Utils::Text::ignorePunct($name))),
 # Added this line*
  Slim::Utils::Text::ignorePunct($name)
  );
  push @candidates, 
Slim::Utils::Unicode::utf8toLatin1Transliterate($candidates[-1]);
  
  # de-dupe results
  my %seen;
  return [ grep { !$seen{$_}++ } @candidates ];
  }
  
--------------------

and it seems to work!

Thanks,
Mike


------------------------------------------------------------------------
mps's Profile: http://forums.slimdevices.com/member.php?userid=36351
View this thread: http://forums.slimdevices.com/showthread.php?t=99537

_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to