slimserver
slimserver copied to clipboard
Bug: Musik- und Interpreten-Information (v1.11.2)
Pictures of artists that have special characters in their name are saved with filenames that causes re-downloading into the cache directory upon every library scan.
Pictures of artists without special chars are reused and remain in cache.
Data is stored on a Synology? How do the characters look there? How are you accessing it? What OS is LMS running on? What LMS version?
Characters there look crooked as well:
(See e.g. Wolfgang Müller)
LMS version and environment:
Logitech Media Server-Status Logitech Media Server Version: 8.4.1 - 1707395499 @ Thu Feb 8 14:21:09 CET 2024 Hostname: DISKSTATION01 IP-Adresse des Servers: 192.168.1.11 Server-HTTP-Portnummer: 9000 Betriebssystem: Debian (Docker) - DE - utf8 Plattformarchitektur: x86_64-linux Datenbankversion: SQLite Anzahl erkannter Player: 3
Perl- und Modulversionen Perl-Version: 5.32.1 - x86_64-linux-gnu-thread-multi Audio::Scan: 1.06 DBD::SQLite: 1.58 (sqlite 3.22.0) IO::Socket::SSL: 2.069 Mozilla::CA: Net::SSLeay: 1.88 - OpenSSL 1.1.1w 11 Sep 2023
Now that's actually very interesting that the .missing file was using correct encoding, while the image file didn't. If you renamed one of those image files to the name used by the .missing file, would that be picked up?
Yes, with the missing file's name now it has been picked up.
Wow... that's really odd. I tried to understand the difference. Here's the working code flow for the .missing file:
my $file = Plugins::MusicArtistInfo::Importer::filename('', $imageFolder, $artist->{name});
$file =~ s/\.$/\.missing/;
File::Slurp::write_file($file, { err_mode => 'carp' }, '');
And this one isn't working:
$file = Plugins::MusicArtistInfo::Importer::filename($url, $imageFolder, $artist->{name});
File::Slurp::write_file($file, { err_mode => 'carp' }, $cached->{data_ref});
I'll have to come up with a setup where I can reproduce this. The only difference seems to be that in the former case we apply a regex to append the suffix. In the latter we extract that suffix from another string.
Unfortunately Github doesn't allow us to move issues across organizations. May I ask you to please open an issue over in the MAI repository (https://github.com/michaelherger/MusicArtistInfo/issues) and link to this one? Thanks!