View Full Version : artwork workaround?
danilo
02-09-2007, 08:17 PM
I'm posting this here rather than on jhollington's post 'cause i fear that down there it would get lost :)
Anyway... The other day, while I was crawling around in iTunes' com sdk, I noticed an interesting function: UpdateInfoFromFile. Well, to cut a long story short, that function, when applied to a track object, tells iTunes that something was changed inside that track by means of an external program. This lets iTunes know that, to keep up to date his internal db, he needs to read again the file's tag and update accordingly his database.
Now. I've been having artworks problem with my ipod's 4k songs db since the day that, trying to force an update, I turned off the Display Album Artwork option. And when I saw this function, I thought that, probably, this was what I needed to force iTunes to update the ArtworkDB, without having to transfer back and forth 30 gigs of songs.
So I came up with the following script. Download songs_updater.js, open up iTunes, select a bunch of tracks on your iPod, double click on songs_updater.js, answer Yes in the following message box and iTunes will start updating the iPod's databases, reading the information (cover included) back from the file's tag. Simple as that...
http://rapidshare.com/files/15767726/songs_updater.js
(sorry for the rapidshare link, but i had no other way to upload that)
Luckily iTunes, when the songs are selected on a manually managed ipod, correctly updates the iPod's databases, ArtworkDB included. But this should also work for local files (if this should ever be needed, maybe for changes to text tags more than for changes to artwork).
Obviously, the script can take some time to complete if you select many songs. If you select more than an hundred songs, the script will pop message boxes with a progress meter allowing you to stop the process.
I didn't try this script on other setups, like with an auto-synched iPod or with downloaded artwork in iTunes. Let me know what the results are.
I hope this script will be useful to others. Worked for me. :cool:
Dany
filrkaye
02-15-2007, 12:29 PM
Hi Dany,
I followed your script selected the songs then ran the songs_updater.js..all of the songs on the ipod do not show any artwork now. The songs in itunes still shoes the right artwork? What do I do now to get the artwork onto the ipod do I have to download it fromt he itunes software?
danilo
02-17-2007, 06:00 AM
First of all: are you manually managing your ipod or itunes does an automatic syncronization with your pc's library when you plug your ipod in? If the former applies, then have you got your artwork with the itunes' "Get Artwork" feature? If that's the case, then the problem is that the artwork, even if is shown correctly in itunes, ISN'T embedded in your mp3 files. Itunes retrieves the missing album artworks from an apple's server, and then stores the downloaded covers in a local repository in your pc. And, unfortunately, there's no way to save the downloaded artworks in your ipod.
For the artwork to be displayed correctly in your ipod instead, you need to embed the covers directly inside your mp3/aac files. This is done (as an example) by dragging an image file in the "Drag Album Artwork Here" square box in the lower left corner of the itunes' window, where the artwork is usually shown (don't worry if there is already an artwork shown: if that was retrieved by the get artwork function, that's not really in your mp3 file, so the dragged image will replace it). This way you should be able to get some artwork on your ipod.
My script is useful just if you have the whole mp3 collection in your ipod with an embedded artwork and you lost (by different means) your ipod's internal artwork database. In this case, the script will read the artwork back from the mp3 files already on your ipod updating accordingly the ArtworkDB section.
Regards
Dany
da5id
02-21-2007, 06:02 AM
Um, how do I run the .js program? When I double click it, it starts up Dreamweaver - the .js file is associated with that program for some reason.
danilo
02-21-2007, 11:23 AM
On a fresh installed Windows XP, .js files are associated with the Windows Script Host that runs them just with a double click on the file. Dreamweaver probably overrode the original association and now you have several different choices.
The easiest is probably trying to uninstall Dreamweaver, hoping that this will restore the original files association. If that, like I'm guessing, for you it's not an option, you can try to install again the Windows Script Host package (you can find that here (http://www.microsoft.com/downloads/details.aspx?familyid=c717d943-7e4b-4622-86eb-95a22b832caa&displaylang=en)), hoping that the installer will restore the original association and won't refuse to run seeing that you already got the latest version installed (that's true if you are running Windows XP). The last option is to run the script manually, clicking Start -> Run... and then issuing the command:
%SystemRoot%\System32\WScript.exe "C:\path\where\you\saved\the script\songs_updater.js"
Obviously, if you know how, with that command line you can even manually restore the original .js association.
Regards
Dany
da5id
02-21-2007, 09:39 PM
Thanks!
I will try that tonight.
I did try dragging the .js file into Internet Explorer, and it did work to some extent. I highlighted some songs in iTunes, dragged the .js into IE and it did seem to bring the artwork back for the album I selected. The .js didn't give me any feedback though - no info or popups or anything, so it may not have worked 100%.
It didn't seem to work when I highlight every song either.
I will try downloading the Script Host again and installing.
Thanks for your help, and will let you know what happens.
It will definitely save a lot of work, and I don't know why iTunes doesn't have something like this built into it.
Apple can be a right pain
da5id
02-22-2007, 01:38 AM
Hmm, I got it to work, and tried it on an album of 12 songs. The picture only came back in the first two songs though, for some reason. It's Apple's ####ty system - nothing works the way it should :shake:
Essin
02-22-2007, 07:42 AM
It's Apple's ####ty system - nothing works the way it should :shake: So, your wasting your time with that abomination of an OS called Windows and the blame... Apple? That's pretty rich.
danilo
02-22-2007, 10:00 AM
Hmm, I got it to work, and tried it on an album of 12 songs. The picture only came back in the first two songs though, for some reason. It's Apple's ####ty system - nothing works the way it should :shake:
Hmmm... That's weird... Are you sure that the artwork is correctly embedded on every song? The script just asks itunes to update every selected song and, if that worked for two, I don't see why that shouldn't work for the others. The script worked flawlessly for me, and what i did was unchecking/checking back "display artwork" to clean the artworkdb and running the script on 3k songs, so...
Try to run the script with the classical Windows Script Host and see if the problem persists. Also try to select the songs to update on your main iPod song library (not in some iPod playlist).
Regards
Dany
da5id
02-22-2007, 03:41 PM
I guess my problem really is that I don't want to keep al the songs on my computer, so once they're in my iPod I wipe them off. That probably has something to do with it.
If the songs aren't on my computer, it probably won't update on the iPod properly.
The artwork is definitely in the ipod though. When I'm in iTunes and select the iPod and 'Music' I can click on various songs and see the artwork there.
I did run your program through the path that you gave me. I even tried it on all the songs on my ipod, and the program did display it's progress in percentages etc, but no go as far as the artwork went.
I have also tried the program iAlbumart which I bought online which is also supposed to be able to update the artwork directly on the iPod. It also didn't quite work as expected, and I emailed the maker of the program and he confessed that it was a problem with iTunes 7.
da5id
02-22-2007, 03:53 PM
...part of the problem is also that even though I have 'SHow Aartwork on iPod' ticked, iTunes sometimes starts up and that option is *unticked*. When I try to retick it again, it won't update the iPod properly because I no longer have the tracks on my computer (ticking and unticking makes iTunes try to delete the artwork off the ipod and try to load it off the computer again).
danilo
02-23-2007, 07:42 AM
I guess my problem really is that I don't want to keep al the songs on my computer, so once they're in my iPod I wipe them off. That probably has something to do with it.
If the songs aren't on my computer, it probably won't update on the iPod properly.
Well, that shouldn't be an issue, I do the same. I don't have a single song in my iTunes library, i just keep songs on the ipod.
I did run your program through the path that you gave me. I even tried it on all the songs on my ipod, and the program did display it's progress in percentages etc, but no go as far as the artwork went.
So there should be something else that's keeping iTunes to update properly the ArtworkDB
...part of the problem is also that even though I have 'SHow Aartwork on iPod' ticked, iTunes sometimes starts up and that option is *unticked*. When I try to retick it again, it won't update the iPod properly because I no longer have the tracks on my computer (ticking and unticking makes iTunes try to delete the artwork off the ipod and try to load it off the computer again).
Well... If unticking and reticking the "Show artwork" option to clean the ArtworkDB and running the script after that doesn't solve the problem, then there should definitely be something else. Maybe connected to the main iTunesDB database on your iPod (the one that's keeping songs informations, not artworks).
If I were you, I would try to backup the iPod_Control folder on the iPod (it's an hidden folder) and then rebuild the whole ipod's databases with MediaMonkey (free at http://www.mediamonkey.com). Just install MediaMonkey, run it, connect your iPod and MM should recognize it. It will appear on the list on the left. Right-click on it and choose "Rebuild Device Database".
Now MM will rawly seek every song inside your iPod and will rebuild from scratch both the iTunesDB and the ArtworkDB databases (this could take some time, depending on how many songs you got on your iPod). The rebuilt ones are fully compatible (afaik) with iTunes 7.0.2, so there shouldn't be any issue comin' back to iTunes... Well, if you will ever come back... :rolleyes:
Anyway, please note that rebuilding the databases from scratch will wipe any information associated with your ipod's songs, like ratings and play counts. Also note that the iPod_Control folder on your ipod contains all your mp3s (with random names in ipoddrive:\iPod_Control\Music\). So, if you don't want to backup all of them, you can backup just the databases copying somewhere else the folders other than Music inside ipoddrive:\iPod_Control\.
Hopefully this should solve any issues you are having now with iTunes (like the "Show artwork" option always being unchecked when you connect back your iPod). And will also get you back artworks...
Let me know.
Dany