CDPedia and itunes artwork

Report your bugs here - if someone else has already mentioned the same bug, just add on to their post with as much info as possible to make the hunting easier.
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: CDPedia and itunes artwork

Post by Conor »

I been trying to repeat it by moving my library to an external drive and then connecting over the network (TimeCapsule) but so far have gotten the correct results. But please try the beta version of CDpedia, the only change I made was increased the timeout from 7 seconds to a whole minute. So it might take a while to import your library, but at least it will give the mounted drive more than enough time to respond with the cover image for each CD.
daniel_m
Bruji Friend
Bruji Friend
Posts: 16
Joined: Sat Jul 03, 2010 6:19 am
Location: Auckland, New Zealand

Re: CDPedia and itunes artwork

Post by daniel_m »

I loaded my library again over the network after I checked that the covers on the 'Sting' Albums are correctly set on all titles

Checking the Import in CDPedia reveals that 3 Covers are not loaded.
The Error in the Console is the same I posted earlier

I now copied all my CD's from Sting to a new local iTunes Library

I reimport all files from the local library and all covers are now set correctly.

@Conor if you have any script I should run on my system to make some checks, I will try it....

?? where can I get the beta Version ??
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: CDPedia and itunes artwork

Post by Conor »

The beta version should fix this, as it does sound like 7 seconds is not enough in some cases for iTunes to respond with the cover information from the network drive, especially if the drive has to spin up first. Sorry I forgot the link to the beta, download here.
daniel_m
Bruji Friend
Bruji Friend
Posts: 16
Joined: Sat Jul 03, 2010 6:19 am
Location: Auckland, New Zealand

Re: CDPedia and itunes artwork

Post by daniel_m »

looks like something went wrong with the beta, the import reveals no covers at all...
..and no log in the Console
jschaffe
Addicted to Bruji
Addicted to Bruji
Posts: 57
Joined: Mon Mar 09, 2009 7:58 pm

Re: CDPedia and itunes artwork

Post by jschaffe »

Conor wrote:The beta version should fix this, as it does sound like 7 seconds is not enough in some cases for iTunes to respond with the cover information from the network drive, especially if the drive has to spin up first. Sorry I forgot the link to the beta, download here.
I just downloaded the beta and was about to try reimporting from iTunes when I noticed something interesting.

I downloaded the beta and opened my existing library. Sorting by artist, the top group, all the artists whose name is numeric, or at least not simply alphabetic, sort to the top in CDPedia and are all missing artwork:

...soihadto...
3Style
The 5th Dimension
8 Stops 7
10 Years
10,000 Maniacs
10cc
20 Below
22-20's
33Miles
The 88
408
801

But as soon as I get to Aaron Neville and ABBA (sorry!) the covers show up! Sample testing farther in the list shows many with artwork, but when I happened to click on a Beach Boys album, the artwork was missing. Looking before and after that album, I saw that the earlier Beach Boys tracks had artwork, the later ones did not.

So I deleted everything in my Library, quit the beta version, restarted it and reimported my music library from iTunes again.

By default, the list comes up sorted by title, I think. When I reorder by Artist, the exact same first run of albums has no artwork, then starting with Aaron Neville, there is artwork, this time until I get to the Beatles Anthology 3 (which is after the Beach Boys...all the Beach Boys albums have artwork this time). Starting with Anthology 3 through all the later albums I was able to look at (I down-arrowed for a while, no art, then I paged down and sampled every 2 or 3 pages), there were no covers I was able to find.

The bottom line seems to be either there's a capture problem with a definite, though not exact, pattern, or there's something when sorting or looking through the albums that breaks things.
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: CDPedia and itunes artwork

Post by Conor »

Hi,

Thank you for all the additional information. Since there nothing in your console log it means that CDpedia is not encountering an error. I have created a special version of CDpedia that will print out information to the console log for every step of the cover search. Please download this version and then in ITunes create a small playlist of some of the CDs that did not import (the artists that start with a number) and try to import that new playlist from CDpedia. Check that the covers where not imported and then send me the entire console log. With that information I should be able to at least reduce the possibilities. Thank you for all the time and information.
daniel_m
Bruji Friend
Bruji Friend
Posts: 16
Joined: Sat Jul 03, 2010 6:19 am
Location: Auckland, New Zealand

Re: CDPedia and itunes artwork

Post by daniel_m »

Hi Conor

I also tried the special Version for jschaffe and found that if I import a short playlist (still my 'Sting' Playlist) using iTunes Import I get all covers.
Then I tried to import my complete music library. I starts okay, but at one time it starts crashing...

Code: Select all

21.07.10 21:07:03	CDpedia[367]	look for cover: 74166E21AB2AD20A
21.07.10 21:07:03	CDpedia[367]	Script to retrieve image:
with timeout of 30 seconds
tell application "iTunes"
set these_tracks to every track of library playlist 1 whose persistent ID is "74166E21AB2AD20A"
set theTrack to these_tracks
if ((these_tracks count) is greater than 0) then
set theTrack to item 1 of these_tracks
end if
if (class of theTrack is file track and artworks of theTrack is not {}) then
set artworkData to (data of artwork 1 of theTrack) as picture
set artworkFormat to (format of artwork 1 of theTrack) as string
return {artworkData, artworkFormat}
end if
end tell
end timeout
21.07.10 21:07:03	CDpedia[367]	type: JPEG picture length: 355350
21.07.10 21:07:03	CDpedia[367]	First bytes: <6c160000 00000320 03200011 02ff0c00 fffe0000 00480000 00480000 00000000 03200320 00000000 001f8000 80008000 001e0001 000a0000 00000320 03208200 00056b52 00000001 00000000 00000000 00000000 00000001 00000000 00000000 00000000 00004000 00000000 00000000 00000000 00000040 00000000 03200320 00000300 00000000 00000056 6a706567 00000000 00000000 00000000 6170706c 00000000 00000200 03200320 00480000 00480000 00056ab8 00010b46 6f746f20 2d204a50 45470000 00000000 00000000 00000000 00000000 00000018 ffff>
21.07.10 21:07:03	CDpedia[367]	image: <NSImage 0x16aea6e0 Size={800, 800} Reps=(
    NSPICTImageRep 0x16ae95c0 Size={800, 800} ColorSpace=NSCalibratedRGBColorSpace BPS=0 Pixels=800x800 Alpha=NO
)>
21.07.10 21:07:03	CDpedia[367]	Save image at: /Network/Servers/leo.mohni.info/Users/daniel/Library/Application Support/CDpedia/Covers/8255.jpg
21.07.10 21:07:03	CDpedia[367]	look for cover: E386FF08D6A2B707
21.07.10 21:07:03	CDpedia[367]	Script to retrieve image:
with timeout of 30 seconds
tell application "iTunes"
set these_tracks to every track of library playlist 1 whose persistent ID is "E386FF08D6A2B707"
set theTrack to these_tracks
if ((these_tracks count) is greater than 0) then
set theTrack to item 1 of these_tracks
end if
if (class of theTrack is file track and artworks of theTrack is not {}) then
set artworkData to (data of artwork 1 of theTrack) as picture
set artworkFormat to (format of artwork 1 of theTrack) as string
return {artworkData, artworkFormat}
end if
end tell
end timeout
21.07.10 21:07:04	CDpedia[367]	type: JPEG picture length: 355350
21.07.10 21:07:04	CDpedia[367]	First bytes: <6c160000 00000320 03200011 02ff0c00 fffe0000 00480000 00480000 00000000 03200320 00000000 001f8000 80008000 001e0001 000a0000 00000320 03208200 00056b52 00000001 00000000 00000000 00000000 00000001 00000000 00000000 00000000 00004000 00000000 00000000 00000000 00000040 00000000 03200320 00000300 00000000 00000056 6a706567 00000000 00000000 00000000 6170706c 00000000 00000200 03200320 00480000 00480000 00056ab8 00010b46 6f746f20 2d204a50 45470000 00000000 00000000 00000000 00000000 00000018 ffff>
21.07.10 21:07:04	CDpedia[367]	image: <NSImage 0x16ae95e0 Size={800, 800} Reps=(
    NSPICTImageRep 0x16ae92a0 Size={800, 800} ColorSpace=NSCalibratedRGBColorSpace BPS=0 Pixels=800x800 Alpha=NO
)>
21.07.10 21:07:04	CDpedia[367]	Save image at: /Network/Servers/leo.mohni.info/Users/daniel/Library/Application Support/CDpedia/Covers/8255.jpg
21.07.10 21:07:04	CDpedia[367]	look for cover: 40DF742700B83EC1
21.07.10 21:07:04	CDpedia[367]	Script to retrieve image:
with timeout of 30 seconds
tell application "iTunes"
set these_tracks to every track of library playlist 1 whose persistent ID is "40DF742700B83EC1"
set theTrack to these_tracks
if ((these_tracks count) is greater than 0) then
set theTrack to item 1 of these_tracks
end if
if (class of theTrack is file track and artworks of theTrack is not {}) then
set artworkData to (data of artwork 1 of theTrack) as picture
set artworkFormat to (format of artwork 1 of theTrack) as string
return {artworkData, artworkFormat}
end if
end tell
end timeout
21.07.10 21:07:04	CDpedia[367]	Error running script: {
    NSAppleScriptErrorBriefMessage = "Das Ergebnis der Berechnung ist zu gro\U00df.";
    NSAppleScriptErrorMessage = "Das Ergebnis der Berechnung ist zu gro\U00df.";
    NSAppleScriptErrorNumber = -2702;
    NSAppleScriptErrorRange = NSRange: {498, 13};
}
with timeout of 30 seconds
tell application "iTunes"
set these_tracks to every track of library playlist 1 whose persistent ID is "40DF742700B83EC1"
set theTrack to these_tracks
if ((these_tracks count) is greater than 0) then
set theTrack to item 1 of these_tracks
end if
if (class of theTrack is file track and artworks of theTrack is not {}) then
set artworkData to (data of artwork 1 of theTrack) as picture
set artworkFormat to (format of artwork 1 of theTrack) as string
return {artworkData, artworkFormat}
end if
end tell
end timeout
21.07.10 21:07:04	CDpedia[367]	look for cover: 02DCBA1842A8977E
21.07.10 21:07:04	CDpedia[367]	Script to retrieve image:
with timeout of 30 seconds
tell application "iTunes"
set these_tracks to every track of library playlist 1 whose persistent ID is "02DCBA1842A8977E"
set theTrack to these_tracks
if ((these_tracks count) is greater than 0) then
set theTrack to item 1 of these_tracks
end if
if (class of theTrack is file track and artworks of theTrack is not {}) then
set artworkData to (data of artwork 1 of theTrack) as picture
set artworkFormat to (format of artwork 1 of theTrack) as string
return {artworkData, artworkFormat}
end if
end tell
end timeout
21.07.10 21:07:04	CDpedia[367]	Error running script: {
    NSAppleScriptErrorBriefMessage = "Das Ergebnis der Berechnung ist zu gro\U00df.";
    NSAppleScriptErrorMessage = "Das Ergebnis der Berechnung ist zu gro\U00df.";
    NSAppleScriptErrorNumber = -2702;
    NSAppleScriptErrorRange = NSRange: {498, 13};
}
with timeout of 30 seconds
tell application "iTunes"
set these_tracks to every track of library playlist 1 whose persistent ID is "02DCBA1842A8977E"
set theTrack to these_tracks
if ((these_tracks count) is greater than 0) then
set theTrack to item 1 of these_tracks
end if
if (class of theTrack is file track and artworks of theTrack is not {}) then
set artworkData to (data of artwork 1 of theTrack) as picture
set artworkFormat to (format of artwork 1 of theTrack) as string
return {artworkData, artworkFormat}
end if
end tell
end timeout
It never recovers from the first crash....
If you can tell my how to find the Album behind the persistent ID, I can check the album artwork...
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: CDPedia and itunes artwork

Post by Conor »

Hi Daniel,

Thank you for the information. There an Applications called AppleScript Editor in your Utilities folder under Snow Leopard and Applications before that that will let you run the following script to reveal the track for a persistent ID. Open AppleScript Editor and copy the following script and press run button on the toolbar.

Code: Select all

tell application "iTunes"
set these_tracks to every track of library playlist 1 whose persistent ID is "02DCBA1842A8977E"
set theTrack to item 1 of these_tracks
reveal theTrack 
end tell
If you don't mind do please email us the entire file to our support email so we can try it out as well.
jschaffe
Addicted to Bruji
Addicted to Bruji
Posts: 57
Joined: Mon Mar 09, 2009 7:58 pm

Re: CDPedia and itunes artwork

Post by jschaffe »

Conor wrote:Hi,

Thank you for all the additional information. Since there nothing in your console log it means that CDpedia is not encountering an error. I have created a special version of CDpedia that will print out information to the console log for every step of the cover search. Please download this version and then in ITunes create a small playlist of some of the CDs that did not import (the artists that start with a number) and try to import that new playlist from CDpedia. Check that the covers where not imported and then send me the entire console log. With that information I should be able to at least reduce the possibilities. Thank you for all the time and information.
I created a playlist and copied all the tracks from all the artists I listed above into it. Then I deleted everything from CDpedia and exited it. I restarted CDpedia, and imported my new playlist. All the artwork appears to be there.

Here's a theory: CDpedia imports the tracks in some order from iTunes. That order may be something CDpedia specifies or is implicit in the way it accesses iTunes or may be some artifact of the way I've left my Library sorted in iTunes (my Music Library is sorted by Album Artist normally).

In iTunes, sorting by Album artist starts with Aaron Neville and the "numeric" artists appear very late in the list. In CDpedia I think it starts with the ... and numeric artists, and Aaron is the first after that sequence.

Suppose that my CDpedia import is successful for n albums or tracks. If it uses the default iTunes Music Library order I selected, it starts and succeeds from Aaron until somewhere in my B's, but everything after that fails, including the "numeric" artists, since the iTunes order places the numeric tracks very late in the list.

If this is correct, it isn't specific artists or tracks that cause the problem, but some point into the import, whatever track/album that is.

So in that spirit, I've deleted everything from CDpedia, quit it, waited until the clock ticked to the next minute (12:27 AM), restarted it, and imported my "Music" from iTunes. I'll send you the results, but there may be a clue in the following:

7/22/10 12:36:16 AM CDpedia[3915] Error running script: {
NSAppleScriptErrorBriefMessage = "The result of a numeric operation was too large.";
NSAppleScriptErrorMessage = "The result of a numeric operation was too large.";
NSAppleScriptErrorNumber = -2702;
NSAppleScriptErrorRange = NSRange: {498, 13};
}

Jeff
daniel_m
Bruji Friend
Bruji Friend
Posts: 16
Joined: Sat Jul 03, 2010 6:19 am
Location: Auckland, New Zealand

Re: CDPedia and itunes artwork

Post by daniel_m »

Hi Conor,

I tried your script, but there was no output in the script editor, therefore I changed reveal to play and iTunes started to play a track :)

Code: Select all

tell application "iTunes"
	set these_tracks to every track of library playlist 1 whose persistent ID is "40DF742700B83EC1"
	set theTrack to item 1 of these_tracks
	play theTrack
end tell
I took the Id of the first failing track for the test it's Waiting from Chris Isaak...

I now made a smart playlist with all Albums from Chris Isaak and imported them into CDPedia, all Covers showed up...

I now restarted a full import and the Consolelog is on the way using the support email..

-Daniel
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: CDPedia and itunes artwork

Post by Conor »

Hi Daniel,

Thank you for the information, seem to not be specific to a track but to a limit on the number of lookups iTunes can handle in a row. It looks like iTunes and Applescript together are running out of memory after a number of searches. I thought it might have been an iTunes update as it started to happen recently but after some investigation it seems it might be Snow Leopard issue with 64 bit AppleScript. I'll pass this up to Apple as I don't think I can force AppleScript to 32-bit mode from inside CDpedia.

Not sure if switching the AppleScript Editor to 32-bit mode would affect the system AppleScript but it's worth a try:

Please find your AppleScript Editor program and while selected choose "Get Info" from the file menu. In the new information window check the "Open in 32-bit mode", then open the AppleScript Editor program and with the program running in the background try a new import.
daniel_m
Bruji Friend
Bruji Friend
Posts: 16
Joined: Sat Jul 03, 2010 6:19 am
Location: Auckland, New Zealand

Re: CDPedia and itunes artwork

Post by daniel_m »

When I Imported the 'Chris Isaak' playlist I observed that a call is made for every track.
I currently have about 800 Albums and 10'000 Tracks in my Library (all ripped myself from my CD collection)

Now, is it not possible to only make a call for each album, instead of every track ?
This would help reduce the number of calls to iTunes...
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: CDPedia and itunes artwork

Post by Conor »

Now, is it not possible to only make a call for each album, instead of every track
It's supposed to do that but investigating it a bug was stopping it from optimizing those lookups, thank you for pointing that out. I have fixed CDpedia beta 35, please try it out. It should now make it much further before running into the AppleScript bug.
daniel_m
Bruji Friend
Bruji Friend
Posts: 16
Joined: Sat Jul 03, 2010 6:19 am
Location: Auckland, New Zealand

Re: CDPedia and itunes artwork

Post by daniel_m »

I just loaded my complete iTunes Music Library with Beta 35 and all covers are no available..

well done :D :D :D
jschaffe
Addicted to Bruji
Addicted to Bruji
Posts: 57
Joined: Mon Mar 09, 2009 7:58 pm

Re: CDPedia and itunes artwork

Post by jschaffe »

Conor wrote:
Now, is it not possible to only make a call for each album, instead of every track
It's supposed to do that but investigating it a bug was stopping it from optimizing those lookups, thank you for pointing that out. I have fixed CDpedia beta 35, please try it out. It should now make it much further before running into the AppleScript bug.
It definitely made it much farther into my collection, the first Loggins and Messina has artwork, the rest do not. It's running out in the mid L's instead of the early B's! It's now made it through a little less than halfway through my inflated count of 3808 albums.

(I've been downloading free music from Amazon & iTunes for years, and that's a whole lot of 1 track albums. My real count has to be less than half that number of real albums I actually have, maybe 1,500 or so).

Anyway, this is real progress!
Post Reply