Bugzilla – Bug 2131
Artwork Scan as an importer
Last modified: 2011-03-16 04:39:15 UTC
Hi, SlimServer SVN 4318 on Gentoo Linux with mysql backend. The server doesn't find artwork anymore. If I drop the database and rescan, the albums.artwork_path is always empty. I added --d_artwork to the startup flags, but I never see the trace lines for artwork. A SQL query after the rescan shows all artwork_path rows to be empty. If I navigate via "Browse Music Folder", the artwork for my albums is shown, and I can see the logfiles entries for --d_artwork: 2005-09-16 01:11:11.6775 Found cached thumb file: /home/slimserver/Music/P-T/Status Quo/In the Army Now/cover.jpg 2005-09-16 01:11:43.7225 Retrieving artwork (thumb) for: file:///home/slimserver/Music/P-T/Status%20Quo/In%20the%20Army%20Now/02%20-%20Status%20Quo%20-%20Ca lling.mp3 Regards, Hakan
could this be a mysql problem? I'm currently finding artwork without any problem. Thought, I cant think of why the artwork scan wouldn't show up at all. d_import d-artwork shoudl show at least SOME signs of an artwork scan regardless of the db backend.
I think I might have found something... If i run the server with --scan-only, the album_art attribute of albums stays NULL. If I run the server without that flag, later in the scanning process that column is populated (I tested that with a music directory containing only one album and a "cover.jpg". The last lines of the log file (the run without the --scan-only) are: 2005-09-16 19:00:01.4157 finished background scan of playlist folder. 2005-09-16 19:00:01.4159 Import: Completed Playlist Scan in 0 seconds. 2005-09-16 19:00:01.4393 finished background scan of music folder. 2005-09-16 19:00:01.4395 Import: Completed Folder Scan in 0 seconds. 2005-09-16 19:00:01.4396 Adding task for artScan(). 2005-09-16 19:00:01.4397 Adding task for mergeVariousArtistsAlbums(). 2005-09-16 19:00:01.4398 Import: Finished background scanning. 2005-09-16 19:00:01.4403 forceCommit: syncing to the database. 2005-09-16 19:00:01.4438 Retrieving artwork (thumb) for: file:///home/slimserver/Music.test/Sade/Promise/01%20-%20Sade%20-%20Is%20It%20a%20Crime.mp3 2005-09-16 19:00:01.4442 Updating image for file:///home/slimserver/Music.test/Sade/Promise/01%20-%20Sade%20-%20Is%20It%20a%20Crime.mp3 2005-09-16 19:00:01.4447 isFile(/home/slimserver/Music.test/Sade/Promise/01 - Sade - Is It a Crime.mp3) == 1 2005-09-16 19:00:01.4459 Looking for image in ID3 2.2 tag in file /home/slimserver/Music.test/Sade/Promise/01 - Sade - Is It a Crime.mp3 2005-09-16 19:00:01.4464 Looking for image files in /home/slimserver/Music.test/Sade/Promise 2005-09-16 19:00:01.4470 Found thumb file: /home/slimserver/Music.test/Sade/Promise/cover.jpg 2005-09-16 19:00:01.4488 Converting file:///home/slimserver/Music.test/Sade/Promise/cover.jpg to /home/slimserver/Music.test/Sade/Promise/cover.jpg 2005-09-16 19:00:01.4492 jpg file type for file:///home/slimserver/Music.test/Sade/Promise/cover.jpg 2005-09-16 19:00:01.4518 Updating Promise artwork cache: /home/slimserver/Music.test/Sade/Promise/01 - Sade - Is It a Crime.mp3 2005-09-16 19:00:01.4532 Completed Artwork Scan 2005-09-16 19:00:01.4537 forceCommit: syncing to the database. 2005-09-16 19:00:01.4853 Import: Finished with mergeVariousArtistsAlbums()
yes, that makes sense. The scan is metadata only. populating artwork is a POST-scan process, so the --scan_only option closes the server before the thumbnails are collected.
Frankly, I would have expected the artScan() method to be run even in the --scan-only branch of the code. I changed the summary to reflect the true problem. If I start the server after the rescan, it never updates the albums table with image information again, even if I run "Rescan Music Library" with the "Look for new and changes music" option. Just checked, i would have to "Rescan Music Library" with the "Clear Library and recheck everything" option for the server to find artwork again... BTW, is there a way for a plugin to be called *after* a scan is finished or would this be a seperate enchancement request? Regards, Hakan
the question is then, why isn't artwork scanning part of the scan process. it should make: Slim::Music::Import::stillScanning() return true, no?
not at all. doneScanning triggers the artwork scan because the artwork needed to have all the metadata in place and a proper list of albums to make an efficient scan. however, it could add an importer after the last and make stillscanning return true.
I like the idea of the art scanner being an importer. hmm... heck, you could write an art scanner importer plugin that scanned amazon. :)
Let's hold off on this til after 6.2
Created attachment 831 [details] have artwork scan part of importer hash for 6.2, should be easy enough to have artScan run as part of scan-only. the rest would deffo have to wait. This patch is untested as I dont have the time to cycle through scans of my library today.
I just rescanned my library (containing mp3, ogg and flac files, the covers are always in an external cover.jpg file in the directories) with --scan-only and this patch. All my artwork is found perfectly, thanks for the quick fix ;-) Regards, Hakan
committed partial fix to trunk at change 4348
This looks like it's done.. ? Closing. Please reopen if needed.