Bug 2131 - Artwork Scan as an importer
: Artwork Scan as an importer
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Database
: 6.2.0
: PC Linux (other)
: P2 enhancement (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-16 04:59 UTC by Hakan Tandogan
Modified: 2011-03-16 04:39 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
have artwork scan part of importer hash (732 bytes, patch)
2005-09-17 14:25 UTC, KDF
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hakan Tandogan 2005-09-16 04:59:50 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
Comment 1 KDF 2005-09-16 09:09:07 UTC
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.
Comment 2 Hakan Tandogan 2005-09-16 10:04:24 UTC
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()
Comment 3 KDF 2005-09-16 10:07:39 UTC
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.
Comment 4 Hakan Tandogan 2005-09-16 13:03:29 UTC
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
Comment 5 Blackketter Dean 2005-09-16 16:48:58 UTC
the question is then, why isn't artwork scanning part of the scan process.  it should make:

Slim::Music::Import::stillScanning()

return true, no?
Comment 6 KDF 2005-09-16 19:54:07 UTC
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.
Comment 7 Blackketter Dean 2005-09-17 07:18:02 UTC
I like the idea of the art scanner being an importer.  hmm... heck, you could write an art scanner 
importer plugin that scanned amazon.  :)
Comment 8 Blackketter Dean 2005-09-17 10:11:40 UTC
Let's hold off on this til after 6.2
Comment 9 KDF 2005-09-17 14:25:32 UTC
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.
Comment 10 Hakan Tandogan 2005-09-18 06:11:31 UTC
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
Comment 11 KDF 2005-09-18 16:31:38 UTC
committed partial fix to trunk at change 4348
Comment 12 Dan Sully 2006-01-25 17:06:38 UTC
This looks like it's done.. ?

Closing. Please reopen if needed.