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 24, 2020 9:20 AM in response to turingtest2

I went back to an earlier version of a saved ITL file that showed the locations. I created a playlist of those songs and ran the ExportImport scritp.

I then closed iTunes and put the latest ITL file (where the description was missing) in My Music\iTunes, replacing the one from earlier. I then dragged the text file onto the EI script and got this error message.


I tried it twice. What did I do wrong?

Sep 24, 2020 11:14 AM in response to turingtest2

Tried again to no avail. 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 have no file location showing in description column.
  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. It created the .txt file.
  5. I closed iTunes.
  6. I copied the ITL and XML from yesterday back over the early Sept files that I used to get the proper information.
  7. I opened iTunes again.
  8. I dragged the .txt file onto the latest EI script and 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.

Sep 24, 2020 5:05 PM in response to William Richards3

William Richards3 wrote:

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: If I click twice in the description field, it just plays the song. It sees the song as I can play it, but it is not showing in the description.


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


tt2

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

You may recall many years ago that I was having some problems with some songs where the would stop before the song finished. There's only a handful of them. I recall that not having gapless playback or something like that helped, but I still have files where it will play, (e.g.) 2 minutes and 20 secs of a 3 minute song. It won't advance to the next track until the last 40 seconds in the example here will play. There's no audio of any sort when this happens.


The songs play fine outside of iTunes. But if it happens, it will do it in both iTunes and the iPod (no matter which one I'm using).


If you have any updated ideas, please let me know. If not, that is totally cool - as the other elements we've been working on are WAY more important.


Cheers!

Sep 29, 2020 3:12 AM in response to William Richards3

William Richards3 wrote:

You may recall many years ago that I was having some problems with some songs where the would stop before the song finished. There's only a handful of them. I recall that not having gapless playback or something like that helped, but I still have files where it will play, (e.g.) 2 minutes and 20 secs of a 3 minute song. It won't advance to the next track until the last 40 seconds in the example here will play. There's no audio of any sort when this happens.

The songs play fine outside of iTunes. But if it happens, it will do it in both iTunes and the iPod (no matter which one I'm using).

If you have any updated ideas, please let me know. If not, that is totally cool - as the other elements we've been working on are WAY more important.

Cheers!


For MP3 files try http://mp3val.sourceforge.net/. Check too in iTunes that you don't have a stop time set in Song Info > Options that is shorter than the duration of the song. If some other software is able to play the track all the way through that suggests that all the audio data is there, so try using your conversion software to make a new copy, and see if that copy will work correctly with iTunes.


tt2

Sep 29, 2020 6:52 PM in response to William Richards3

William Richards3 wrote:

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?


No, during testing I discovered that I'd managed to embed the same image into the same track multiple times due to an oversight in my code. In this case the same image has been inserted five times because I made manual edits to the exported file and then imported it again as part of a testing regime, without starting over with a freshly converted (and thus artwork free) audio file each time. The script can't rely on iTunes to report accurately if art is already present, but it should be able to check if the artwork count ends up greater than one and then delete the excess image if needed. That's my plan anyway.



Adding multiple images doesn't give rise to an error of any kind. If you get an error that you don't understand then please copy/screenshot the error message so I can try to explain and/or update the particular script so that it works better in future.


tt2

Sep 30, 2020 10:33 AM in response to turingtest2

I have a short list of these songs that end early. I can't explain it but none of them end early when trying in iTunes this morning. I had the first file I tried to fix yesterday as I told you yesterday. I did end up fixing it but lost track of what I did to make that happen while still keeping all the metadata. So today I've been going through the short list of songs and so far, they're all playing fine. It's like something happened to fix them (which makes no sense). When I find another one, I'll try deleting the end time and saving it and then see if that resets things.

Sep 30, 2020 1:58 PM in response to turingtest2

I was making notes on the flow for upgrading tracks as I only did this once and it was last week. My notes were solid, but I wanted to make sure so I video-captured the screen as I went so I could grab images and so forth so as to archive the flow. I used only 1 track in this case. Everything went great. The only thing I noticed was that the album name is missing for the newly upgraded track on the new MUSIC Drive.


But last week when I did this, it has the album name.


I'm pretty sure I followed the same naming structure. Music\<Artist>\<Album>\<Artist> - <Name>

And I checked to make sure the one file I used had the album name on it inside iTunes and it did.


What did I do wrong?


Thanks!

Sep 30, 2020 4:05 PM in response to turingtest2

I was referring I think, to the drag and dropping into this playlist from Windows Explorer folder. Again, my bad here, I'm just not connecting the dots for some reason. So I wouldn't follow these steps:


1.     Create a new playlist in iTunes.

2.     Go to the folder with the music you want to upgrade quality - meaning, the lower quality song.

3.     Drag over the songs from Windows Explorer into the playlist you created.

4.     Run ExportImport  (this will create a .txt file)

5.     Move (or delete) those songs out of iTunes folder this original version is in.

6 Highlight the song(s) on the playlist

7.     Replace the old version in the folder in windows with the new, updated quality version

8.     Take the .txt file that was created and drop it on top of the ExportImport script

9.     Next run Custom Renamer script

10.  It will direct you to put the location on the box which would be the NEW folder location for this upgraded audio. 


First of all, is any of this flow above wrong?


The good news is that at least I have the non-upsampling in respective folders and not scattered too much so I can use the description column and select a batch at a time. So I would just run the CustomRenamer and it would create the folders and such to the MUSIC Drive I am aiming to have everything in the Artist/Album structure?


If I'm understanding, I don't have to create a playlist. I don't have to drag and drop those into said playlist. All I need to do is highlight the songs I can't upsample and run CustomRenamer? No need to move the files out of their current Windows folder as there's no better version to replace with?


Please let me know. Thanks again SO much.

Sep 30, 2020 4:08 PM in response to turingtest2

YOU SAID: I've uploaded a new version of ExportImport that no longer adds multiple images in certain circumstances. I've also saved this version with Force=True so there is no need for you to edit it before use,


ME: So it will still work no matter the file type, right? What does Force=True do instead of Force=False? You explained it but I don't think I'm totally grasping that.


Cheers!!

Sep 30, 2020 4:36 PM in response to turingtest2

So when I highlight the song(s) that I can't upgrade their quality (whether in iTunes Media folder purchased or other type of file I can't upgrade quality with), will CustomRenamer "move" those songs to the new MUSIC Drive when I roll this with the non-upscalable titles? If it moves them, they would no longer remain in the folders they're in now? Or are they just copied to the new MUSIC Drive?


I'd like to keep them in their present folder (the "I" drive) even though I'll ultimately have everything in the new setup on the new MUSIC drive (the "E" drive for example).


I'll try whatever tomorrow.


Back to Artwork..


YOU SAID: This is where EmbediTunesArt should be the right tool. Given that iTunes will downloaded the artwork, but

doesn't embed it in the tag, it is to be expected that the view in Windows Explorer won't change. Removing the track from iTunes also removes the artwork it downloaded so when you add it back you're back at square one. Once you've used the iTunes Get Album Artwork tool you can use the EmbediTunesArt script to embed the download artwork.


ME: I forget, is their a script that will work inside iTunes for Get Album Artwork so you don't have to do one-by-one? Or use a 3rd party tool I've seen where they claim to find bad artwork and replace with better quality, or add to those files that don't have artwork (if possible)?


Thanks!

Sep 30, 2020 4:44 PM in response to William Richards3

I asked you this a while ago now, but wondered if you had a thought. I stumbled onto this folder for some reason. There are over 16,000 files here ranging from the highest as shown in the capture, to some with just 1kb or even 0. Can I delete these? They're from 2014 and I don't really see a need for them.

If this isn't in your domain, no worries. I just thought I'd ask.


Thank you again.


And BTW, when I do move those titles from my C drive Music/iTunes Media folder, should the artwork and other folders/files still remain in C I would assume? We're just moving the files, right?



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.