iTunes metadata and artwork

I had archived a number of things you helped me out with. (turingtest2). One was "exportimport" script. I tried clicking the link in an old posting and it comes up with a 404 error. Is there a way that could be reposted here?


Also had help in trying to maintain the metadata and album art when replacing files in itunes. I got a few different scripts ( Create Folder Art, Update Tag Info, Sort Date Added and then a few different Date Arranger scripts). I had instructions on the order of how to make sure the album art stays on the file but my notes appear to be incomplete as I don't recall the order/steps necessary for that. I believe it was the create folder art script but the sequence of that is what I've forgotten.


I know itunes is not viable much these days but what I am trying to do is replace all the existing titles in my library that are mp3 160 baud with either 320, or even wav, AIFF or FLAC (perhaps AAC).


It seems no matter what I do, I cannot get it to work properly despite all the wonderful guidance you provided. So here's the gist of what I'm attempting.


  1. Use the newer, high quality versions of the same song for all the songs in the library.
  2. Keep all the same information already on the file. This includes the rating, genre, album art, comments, composer, etc. All the metadata that's on the original file.


So each song will just be the newer, better quality version. My plan is to use AIFF or FLAC files as technology seems to be improved to handle these. But if AAC Apple Lossless is the better option, I can do that. But I do want the best possible quality as space is no issue these days (hard-drives).


Any help would be greatly appreciated.

Posted on Aug 27, 2020 1:15 PM

Reply
Question marked as Top-ranking reply

Posted on Sep 1, 2020 3:49 PM

Hi,


I've updated ExportImport to capture artwork. This is the easier tweak. When running in export mode an image is created for each unique album and saved in same folder as the script in the form <Artist> - <Album>.jpg and another line is added to the exported information for that track. In the import phase the current file is checked to see it it has art, and if not, and if there is an image at the saved path, then it is inserted. As a test I used the script to export data for 27 tracks from three albums. I then removed the artwork and used the import mode to restore the artwork.


So step by step:


  1. Select some tracks that you want to upgrade in iTunes.
  2. Run the ExportImport script.
  3. Replace the low resolution files with your higher rate conversions, in the same file format, and at the same paths.
  4. Drag and drop the Export Import [<Date> <Time>].txt file that was created onto the ExportImport script.
  5. Review the updated files in the library and Explorer to check that all the properties have been restored, artwork embedded, etc.


After reviewing the code for the script I've seen how you can use it to upgrade, for example, mp3 to Apple Lossless. Step 3.1 would be to edit the exported data file in a text editor and perform a search and replace operation to change .mp3 to .m4a before saving the file. As long as you've removed the .mp3 files the script will attempt to relink iTunes to the path specified in the text file.


I should be able to add in something more elegant during the import phase that checks for the existence of a file at the location noted during export of <path>.ext and, if it isn't there, looks to see if there is a file with another valid extension from the list <path>.aif, <path>.mp3, <path>.m4a, <path>.wav, etc. If a potential match is found the script can then relink iTunes to that file before restoring the other properties.


tt2

Similar questions

352 replies

Sep 23, 2020 1:58 PM in response to William Richards3

Hi,

I tried using an previous ITL file. It brought back the description link but then tons more work I had done since any reasonable version of the ITL would make sense. The trade-off is whether to keep these 20 songs or so in the library as is, but just missing description. I did notice the metadata was all there except the Ratings were missing. Weird. I can easily update as well. I tried a variety of things as best I could but never could make it work which brings me back to this:


YOU SAID: You can use the script to copy the current filenames into the description fields, but depending on what you've done playlists membership, plays, etc. might have been lost.


ME: I'm not sure what you mean? Again, it's a balance of these titles being removed from various playlists. Other than the description (and rating which I can easily update), the files are back to the 160 versions. I have the other upgrade audio quality files on another drive in both the Track and Song title and Artist-Title. What I don't know is if those will show the location of where they are (which would be fine - I could just get the description location back and then keep them as they are and not remove them as I did).


I had a horrific two days here. My computer hit the wall. It ended up being a bad SATA cable. Once I replaced that to the OS drive, it's working great. Great timing. So I'm about dead in the brain at the moment. Any help to my question today and from the posts directly above, would be greatly appreciated, as always.


Thank you so much!

Sep 23, 2020 6:19 PM in response to William Richards3

The core of the iTunes library is the ITL file. This is the one that knows what has been added to the library, where it is supposed to be stored, and contains all the information like ratings, play counts, playlist membership, and so on that isn't stored in tags.


The XML file is a file that iTunes can create for third party software to access when iTunes isn't running, so it can find out information about your library. Apart from a special case where iTunes might try to reconstruct your library from the XML file if the ITL is corrupt iTunes doesn't use the XML.


Having gone back to an older library you can use ExportImport in Export mode to save metadata from the 20 tracks, then go back to the "current" library and use it in import mode to restore the missing details. This type of metadata retrieval was what the script was originally built for.


tt2

Sep 24, 2020 11:16 AM in response to William Richards3

STRIKE what I just sent. Sorry. This is more accurate:


Just to make sure, here's what I did again.

  1. Used the ITL and XML from a period (in early September I believe). This copied over the files from yesterday. This had proper location and 160 versions.
  2. Created a playlist with the 27 songs that HAD the file location showing in description column. This earlier ITL was the right location, and 160 baud on the songs.
  3. I highlighted those files.
  4. I ran the latest version of the EI script (1.0.0.21). It saw the 27 songs and worked as expected.
  5. It created the .txt file.
  6. I closed iTunes.
  7. I copied the ITL and XML from yesterday back over the early Sept files that I used to get the proper information.
  8. I opened iTunes again.
  9. The description of those songs was missing the folder location.
  10. I dragged the .txt file onto the latest EI script and as it executed the script, it showed the error message I sent earlier this morning.


I'm clueless. I did try earlier with only the ITL but when that didn't work I thought I'd try with both ITL/XML but it didn't matter.


Please let me know. THANKS!

Sep 24, 2020 1:43 PM in response to William Richards3

William Richards3 wrote:

Should I redo the whole process (putting earlier ITL file in itunes, then run the EI script, get the .txt, then close itunes. Put back in the latest ITL and then drop .txt onto EI script)? Or can I just drop the .txt onto the updated script?


The minor typo affected the import phase of the script preventing it from running. It didn't alter the way the script behaves from the previous versions. You just need to run the script in import mode to import your recently exported data.


BTW, is there a way to get a download of our exchanges or somehow get so I can archive?


Save a bookmark to the thread. It will be here for years to come. Or copy and paste the most useful bits of it to a Word document.


tt2

Sep 24, 2020 2:04 PM in response to turingtest2

I ran the export part. It shows 2 properties being updated. And I'm not sure which two were updated as none of the 30 or so songs I had in the playlist when I ran the Export, show the description.




What should I do? I've...


  1. Found the original file locations with original 160 baud. I created a playlist of those. I highlighted and ran Export script on those. It created the .txt file - this was all using an older ITL file from a couple weeks ago.
  2. I replaced that ITL with a file from late yesterday in which the description is missing. iTunes has been open all afternoon since I tried this earlier today (you 1.0.0.21 version) and it failed. I updated the script file. Then with iTunes still open, I dragged the .txt from earlier today on top of the 1.0.0.22 version. It found 2 files but not the ones in the playlist.


What would you suggest I do? Is there anything with the XML that I am doing wrong? Should I not copy both of those when doing this (XML/ITL)?


Should I just start it over and try again?


Please advise, and thank you as always!


Sep 24, 2020 3:47 PM in response to William Richards3

William Richards3 wrote:

1. Found the original file locations with original 160 baud. I created a playlist of those. I highlighted and ran Export script on those. It created the .txt file - this was all using an older ITL file from a couple weeks ago.


Did those tracks include a filled in Description field as generated using the KeywordsToDescription script?


tt2

Sep 24, 2020 4:46 PM in response to turingtest2

See below. These songs all had a description in the .txt file that was created:


But there is no description in the column for these. Interestingly, it did find two songs as I said. I did find one of them by looking at the playlist I created before doing this script. I exported it out of itunes and opened it up in excel. Here's the description for each song next to the original excel that had the playlist:



Any thoughts? Should I just try this all over? Again, the ITL from a couple of weeks ago had the 160 file and file location in description. I made a playlist. I highlighted the tracks. I ran the script. It successfully created the .txt file.

I copied back over the ITL from earlier today (or yesterday - doesn't matter), and dragged the .txt onto your 1.0.0.22 EI script. It said it found 2. So it's not seeing these other ones for some reason.


Perhaps there's other scripts run between the ITL from a couple weeks ago and the one from yesterday or today that is mucking things up?


As I said, I did copy both XML and ITL for whatever reason. That shouldn't matter though, should it?


Let me know.


Sep 24, 2020 4:48 PM in response to turingtest2

YOU SAID: It may be easier to simply insert the values you want in the Songs layout of the library where you should be able to click twice in the Description field to start editing it.


ME: Maybe I'm not understanding what you mean here. If I can do that successfully to tie the location, then I'd be all updated to this point and would then start working on deleting artwork, converting new versions of higher quality, etc.


Thanks!

Sep 24, 2020 6:23 PM in response to turingtest2

YOU SAID: Leave a gap so each click is isolated rather than being interpreted as a double click.


ME: I tried a few times and finally was able to do this I think. I went to the very left of that field and was able to bring up a box to type in. This is what you mean, right?



Do I just put the song location in such as: I:\MP3's - Master\MP3's - 100s\Aerosmith - Angel.mp3, or do I include "<description> in front of it, and then the song location?


So once I do this then I should be caught up, right? There were two other songs I noticed that I was going to do the older ITL, create a playlist for two songs, then go back into the EI flow as I've been doing to get those back. Can I sidestep that and just do as above and type in the description box?

 

I understand on your work. I'm just so appreciative of all you've done. If you can get tomorrow, that's great. If not until Saturday, that's fine too obviously.

 

Thanks!

Sep 27, 2020 2:16 PM in response to turingtest2

Hi,


I updated those 30 or so missing locations on those songs by entering manually in the description field. Thank you for that tip.


A quick couple of questions if I may. There are some songs I won't be converting to upgraded fidelity because I either purchased from the Apple store or gathered in other ways where I don't have in .wav or other way to improve the fidelity as I can with the .wav files. So there will be no converting or upgrading of audio for those songs.


However, I want them to be on this new Drive location and be part of creating the folder scheme (Artist/Title) that the CBMoving script does. Is that possible? And it's not just the Apple purchased music. I have several folders that are only MP3 as well that I would want to move out and then back in. If I moved "same-quality" files out and moved those same files back (as the flow with CBMoving), would that work the same - if you follow?


Or is there another script or suggestion for this situation?


Again, I wonder if I should/can move the iTunes purchased songs to this new Drive as well? Is that possible or do they need to stay within the C: drive My Music folder? There's only about 15 artists there now.


Also you said moving the various music upgraded file quality out and back in will update the album art too so that's also an advantage. I believe you said that Apple would see them when they go out and back in.


You told me how I can have two versions of iTunes running (I've not tried that yet). I don't know if it's worth the effort, but I have one challenge as it relates to all these new versions of upgraded audio. I looked to see how many GB's the various wav folders have and it's probably 4-500 GB so there's no way I could do even the ALAC and have room for them all on a 160 iPod (though perhaps the enhanced 256 would fit?)


If iPod use weren't a concern, then it would certainly simplify things but I use my iPods a LOT still and don't see that changing any time soon.


If I could have the highest quality iTunes for Plex/Synology and have another version of iTunes for the improved, but not almost total AIFF files for iPod storage constraints, that would be kind of neat. But I see that becoming a headache to try and update both each time I add an album or song, or change some genres or something.


Anyway, that's it for now. I thank you so much for your help. It's just been amazing.

Sep 29, 2020 6:25 AM in response to William Richards3

William Richards3 wrote:

Hi,

I updated those 30 or so missing locations on those songs by entering manually in the description field. Thank you for that tip.


Great. Glad that is sorted out.


A quick couple of questions if I may. There are some songs I won't be converting to upgraded fidelity because I either purchased from the Apple store or gathered in other ways where I don't have in .wav or other way to improve the fidelity as I can with the .wav files. So there will be no converting or upgrading of audio for those songs.

However, I want them to be on this new Drive location and be part of creating the folder scheme (Artist/Title) that the CBMoving script does. Is that possible? And it's not just the Apple purchased music. I have several folders that are only MP3 as well that I would want to move out and then back in. If I moved "same-quality" files out and moved those same files back (as the flow with CBMoving), would that work the same - if you follow?


CustomRenamer works with any content in your library. You don't need to have updated it first with ExportImport. The scripts are totally independent, each performing a different function.


Or is there another script or suggestion for this situation?

Again, I wonder if I should/can move the iTunes purchased songs to this new Drive as well? Is that possible or do they need to stay within the C: drive My Music folder? There's only about 15 artists there now.


You can and should move everything into one logically organized folder structure. iTunes doesn't mind where your content lives as long as it stays put. Use CustomRenamer to move things if you don't want to repair broken links by hand one at a time.


Also you said moving the various music upgraded file quality out and back in will update the album art too so that's also an advantage. I believe you said that Apple would see them when they go out and back in.


I added a feature in ExportImport to ensure that artwork gets embedded. iTunes and Windows Explorer should both show art after using it to upsample a track.


You told me how I can have two versions of iTunes running (I've not tried that yet). I don't know if it's worth the effort, but I have one challenge as it relates to all these new versions of upgraded audio. I looked to see how many GB's the various wav folders have and it's probably 4-500 GB so there's no way I could do even the ALAC and have room for them all on a 160 iPod (though perhaps the enhanced 256 would fit?)


Rather than create multiple libraries there is a feature you can use when syncing to iPod that can convert higher bitrate tracks (e.g. wav or Apple Lossless) to a given quality AAC, e.g. 256k.


If iPod use weren't a concern, then it would certainly simplify things but I use my iPods a LOT still and don't see that changing any time soon.

If I could have the highest quality iTunes for Plex/Synology and have another version of iTunes for the improved, but not almost total AIFF files for iPod storage constraints, that would be kind of neat. But I see that becoming a headache to try and update both each time I add an album or song, or change some genres or something.


Again I'd recommend Apple Lossless as the primary storage format over WAV and AIFF as it is both smaller and has better support for tags. Converting on the fly when syncing to iPod is probably the way to address the storage limitation there.


Anyway, that's it for now. I thank you so much for your help. It's just been amazing.


You're welcome.


Note that I've still got to update ExportImport so that it doesn't try to embed multiple copies of the same image if run it repeatedly with the same text file in import mode, but since that is something you shouldn't need to do you can still use it in the current form for updating to newly converted tracks that don't contain embedded art. I only noticed this by accident while testing and still haven't had the time to address it.


tt2

Sep 29, 2020 9:35 AM in response to turingtest2

Hello. I downloaded the mp3val software (I had a version I used from like 2009 or something) but don't recall ever using it.

Anyway, the songs in question (there's only a small handful) all were OK in the result (STATE). I read a lot about this because it's been an on-going issue for some files. What I've assimilated is that there is something in the iTunes software that affects these few titles. I used Export/Import on them (burning a new version from the original .wav) but it didn't change the outcome. Even though the 160 was moved out and the 320 moved in, and the script ran as instructed, it still ended before it was supposed to. Perhaps the ConsolidateByMoving script (when I'm ready to do that) will work? In reading forums on this issues such as iLounge many years ago now, no one really could solve it but many pointed to a corrupt song(s) files within iTunes. Yet the songs play fine outside of iTunes. I did end up getting it to play in iTunes but I did some flow that I lost track of because I moved and/or copied from a couple of different sources (back-ups of back-ups) and now the one song is playing. But I've not solved anything. For now, I'm not going to worry about it.

Sep 29, 2020 9:50 AM in response to turingtest2

YOU SAID: CustomRenamer works with any content in your library. You don't need to have updated it first with ExportImport. The scripts are totally independent, each performing a different function.


ME: I don't think I've used that script before. Why would I use that and not export/import or the ConsolidateByMoving?


YOU SAID: You can and should move everything into one logically organized folder structure. iTunes doesn't mind where your content lives as long as it stays put. Use CustomRenamer to move things if you don't want to repair broken links by hand one at a time.


ME: The goal on this point is to also have your script create the Artist/Album folders for those songs where an upgraded version won't be created. So I'm slightly confused as to whether you mean to use the CustomRenamer script for that. Or do you mean songs it can't find? What my thought is, is that I would run the CMB script flow and basically move the songs out, then in the flow, I'd move them back (as I would for upgraded audio - e.g. 160 to Lossless) but they would be the same files. I would just have moved them and the script would have created the Artist/Album folders.


YOU SAID: I added a feature in ExportImport to ensure that artwork gets embedded. iTunes and Windows Explorer should both show art after using it to upsample a track.


ME: Would this also work as pointed out above - for songs that maintain original fidelity but are moved to new Drive?


YOU SAID: Again I'd recommend Apple Lossless as the primary storage format over WAV and AIFF as it is both smaller and has better support for tags. Converting on the fly when syncing to iPod is probably the way to address the storage limitation there.


ME: I've seen that but never used that before because I wanted to keep the .wav files I can move to iPod(s) with plenty of memory for the remaining MP3s at this point. So I think it would also convert the .wav. But since the Lossless is the same fidelity as wav I believe you said, maybe that would be okay. The real question is this: It doesn't change the files themselves in iTunes, right? It only does it as I'm syncing to a particular iPod, right?


YOU SAID: Note that I've still got to update ExportImport so that it doesn't try to embed multiple copies of the same image if run it repeatedly with the same text file in import mode.


ME: I did run E/I a couple of times on the same file and did get an error message the second time so that must be what you mean?


Thanks much as always!

Sep 29, 2020 12:21 PM in response to turingtest2

YOU SAID: You can and should move everything into one logically organized folder structure. iTunes doesn't mind where your content lives as long as it stays put. Use CustomRenamer to move things if you don't want to repair broken links by hand one at a time.


ME: I'm sorry - I keep forgetting that the CustomRenamer is the script I used in tandem with Export/Import to get the Artist/Album thing to work. So I am clear on your point. Sorry for my confusion in my reply earlier today. I'll make my notes on my end more clear. Thanks!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

iTunes metadata and artwork

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.