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

Oct 12, 2020 4:14 PM in response to William Richards3

Hi,


I was doing some manual manipulation of songs files the past couple of days. I think I asked you about this before but don't know for sure.


If i move a file out and then click the song inside iTunes, it asks me to locate it. So I would have it browse to the new drive where I have the new E:/MUSIC. So let's say I moved ten songs out of iTunes from an album and then browsed to the first song. It finds it and then asks if I want to locate other files missing. I say yes but then it says it can't find any.


Why wouldn't it look in the folder I browsed to for the first song that's now on the MUSIC drive? It would really help. I don't do that manually moving much but it does come in handy. I can't figure out why it won't work.


And a reason I was testing this too was because I thought it would be helpful to merge several "album" folders/songs (I made a number of different ones as I was adding things over the years). If I did that, and iTunes couldn't find it, I want to count on it looking for it properly. So there must be something I'm doing wrong?



Oct 14, 2020 3:45 PM in response to William Richards3

Hi again,

Sorry to hit you again but I had another question. I was checking the description column again as I was moving on some things related to all this. I had this issue before. Check our exchange back on


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."


There's more to our exchange but that might help you see what I'd said before.


Anyway, in the past couple of days I've been adding some songs to the library where I do this:


  1. I move a song out
  2. I then click the song and it asks for the location.
  3. I point to the new drive MUSIC where it is. It plays fine then.


So when I went to see the description, there is nothing showing. I checked the file path in INFO and it's obviously there and iTunes sees it and it plays fine. Why would the description not show? This was not involving any script. I just did this manually for some songs. Here's an example of the view with those.



Please let me know. Thanks so much!

Oct 18, 2020 10:40 AM in response to turingtest2

Hi - I've not heard back from you in about 10 days and was hoping you could help me with a few of my posts in the past 10-11 days.

I was trying to do the consolidateByMoving process today and I'm still getting this error when I try to do this:


  1. Create a new playlist
  2. Drag the songs (the original 160) from Windows into the playlist
  3. I highlight the playlist
  4. I reun Export/Import - it creates the .txt file
  5. I move the 160 songs out of windows folder
  6. I move the new Lossless files into where the 160 songs were in Explorer
  7. I highlight the songs in the playlist
  8. I drag the .txt into the E/I script


When I do, I get this error.


So I'm never able to run the ConsolidateByMoving script as this first process is failing. I tried it twice and neither time would it work. I think that's also related to an earlier post. The E/I script is 1.0.0.22. I'll try the 1.0.0.23 (force equals true) in a bit.


I'm pretty sure I'm doing it right but I can't say for sure. Anyway, I'm sure you're very busy but I sure hope you can get back to me soon. Thanks as always!

Oct 18, 2020 2:25 PM in response to William Richards3

One thing I noticed here as I end my day. I had captured my process when I did this earlier successfully. But as I was doing just one song, perhaps that might have not shown the error. Here's what I mean.


It looks like it's writing the first song but errors out after. Notice this first song and you can see it is Lossless, but the other 6 songs are still the 160.


Now, when I was doing just one song, it was also doing something I didn't see this weekend in trying to get the script(s) to work.

  1. Create a playlist
  2. Dragged one song over
  3. Ran E/I script
  4. Moved song out
  5. Highlighted the song in the playlist
  6. replaced the 160 song with the lossless
  7. dragged the .txt file onto E/I script
  8. It successfully completed the script and now the 160 song in the playlist changed to 320 (MP3 in my capture a couple of weeks ago now).


When I drag and drop the .txt it will sound like the script is running but then throws the error. But I am seeing the first song has changed. So it made it that far but then errors out and I don't know why. But I thought I ran this a couple of weeks ago with success so I can't fathom what's wrong.


Anyway, I don't mean to barrage you with posts. I'm just frustrated and stuck now. I did get it to work once today but I sure can't remember how or what was different as I'm following my archived notes exactly the same. The only thing I did was move from the 1.0.0.22 to .23 script and it worked. But only once. And that was it. It then continued throwing the same error as I posted earlier.


Help! :)

Oct 19, 2020 3:17 PM in response to turingtest2

You have been such a great help so I thank you for every single element. I'm at the point where I want to use the CustomRenamer script (with Export/Import), but as above shows, it keeps throwing the error when I drop the .txt file onto the ExportImport script. I tried a few different things but the only consistency is that the first track of the ones in the playlist that I dragged over from Windows, changes to the Lossless. So I believe it works on the first song in the list.


Perhaps there's an error in one of the last two scripts from you? CustomRenamer 1.0.0.22 and 1.0.0.23 are the only ones I'm using. Perhaps I could go back to an earlier version but I think you did these last two updates as the previous ones must have needed updating. Tomorrow, if I don't hear back, I guess I'll try .21 script and see if that works? I know this worked a couple 2-3 weeks ago when I was testing it so I just don't know what I'm doing wrong.


Related to this process of the flow, can you please confirm this flow?


  1. Playlist is created and songs are dragged from windows into it.
  2. I run the Export/Import script. (Do I highlight the songs in the playlist at this juncture before running E/I the first time?)
  3. I move songs out of the MP3 folder that are the 160 rate.
  4. I move new lossless titles in to replace.
  5. I highlight the playlist once more and drop the .txt file onto the E/I script.


Currently, it throws an error so I can't move to do the CR script. Please advise.


Anyway, I truly don't mean to pester you but I have fine-tuned the library and am literally at the point when I want to do this portion of the work. I still have some artwork to find but that won't take long as I have a lot of them on existing songs.


Also you were going to see about updating the CleaningDeadArt script (see on page 19).


So, I hope all is well and you're healthy and doing okay. I really hope to hear back from you. Thanks!

Oct 20, 2020 10:44 AM in response to turingtest2

Hello again. I tried running a different set of songs using the flow that I've asked you to confirm is correct but it still isn't working. In fact, I saw this error message which is possibly concerning. It said there was a catastrophic error.


I truly am stuck and am hoping to hear from you. I hope you're okay with this covid stuff. Just a word back on when you might be able to help would be appreciated. I am pretty close to moving all the higher baud rates in but in a holding pattern because of these errors. I've tried 1.0.0.20. .21. .22. and .23. There was a typo on .21 I think you said. But none of them will execute - sans that somehow I got it to work once Sunday.


I went over your instructions of flow and think I'm doing it right. In re-reading some things, I noticed something about the ITL file (so maybe there's something there that I need to do as part of this - but it's not on any flow you mentioned, including the link to the proper flow that you sent.


You've been so great at helping me out. I do hope you're okay first and foremost. I'd sure appreciate a reply. Thanks.

Oct 20, 2020 11:48 AM in response to turingtest2

An update; I noticed in my video captures of my doing this process successfully a couple of weeks ago and my flow is exactly the same. The one difference I noticed is that I was using MP3 on both files. So it looks like it worked because it's one MP3 file type for another (higher baud). This should work regardless of file type though, right?


I ran this on version 1.0.0.22 fixed update. So it worked perfectly. So why isn't it working when taking out the 160 MP3 version and replacing with Lossless ALAC file?


Sorry - just trying to give you more information to go on.

Oct 22, 2020 10:11 AM in response to turingtest2

Anxiously awaiting your input. I hope you're okay.


There's a few things I've been hoping to get feedback/fix for. Here's a brief recap:


YOU SAID: I'll try to rework the code tomorrow to put in some additional checks and perhaps allow it to skip over what would otherwise cause an error.


ME: This was related to the CleanDeadArt script which you said could be run on more than one folder at a time. That's not a huge priority, but if you could, that would be great.


ME: The major element I discovered is that the Export/Import isn't working if I want to replace 160 mp3 files with ALAC files. I discovered through many days of trying a large variety of test scenarios, that replacing "same" file works fine. In other words, I can get it to do the steps that prepare for then running CustomRenamer if I replace the 160 MP3 file with another 320 MP3 file for example. That works without fail.


  1. Make a playlist
  2. Drag files for the 160 I want to use to be replaced.
  3. Run Export/Import and it creates the .txt
  4. I then move out the 160 files and replace them with the new ALAC files (same artist/title - just didn't quality).
  5. I drag the .txt file over on top of the E/I script. It will run but then error out. This isn't the case with mp3-to-mp3 files so something in the script is not liking a different version.
  6. On my post on Oct 18 at 2:25pm, I pointed out that it will show the first song in the playlist (that I created per #1 on this list) as an ALAC file but that's where it then is throwing an error. It's unable to complete the process.


ME: Unrelated to that, I also had asked about why, when I replace several songs and I have to have iTunes locate it, and I locate the first song, it asks "do you want itunes to try and find other songs" (or something to that effect), and it never does. That is a concern with the work I'm doing. Do you know what that's the case?


I feel bad to be bothering you again, but you've been so tremendous with all your help. But I'm right at the point where all the work is now going to happen in updating the quality but I'm stuck. The beauty of your scripts is that it has helped so much. Perhaps I got spoiled at your many quick replies but it's been a couple of weeks since you've replied so I'm unsure as to what I should do.


My fear is that this major script, which you updated several times, won't work now and I have no clue how to fix the issue.


Please reply if you're able. Again, I truly hope you're okay with everything going on with this virus. Hopefully you can help me out.


Thanks.

Oct 23, 2020 2:33 PM in response to William Richards3

I did some further examination and I noticed the version history. On version 1.0.0.17 Change Log it said:

Version 1.0.0.17 - Automatically relink if file has been replaced by and alternate format, e.g. <Filename>.mp3 replaced by <Filename>.m4a

' - See https://discussions.apple.com/thread/251735468 for genesis of this update


So I decided to give it a try. It worked.... mostly. One of the three test tracks using mp3 160 upgrading to Lossless didn't have artwork properly which I think was maybe fixed in subsequent versions as I know we covered that problem (1.0.0.19 or 1.0.0.20?). I also went to see if by chance, there was a newer version than what I had last downloaded based on our exchange and there was. It's 1.0.0.24. I tried that but it also failed.


Version 18 failed. So something is missing from .17 forward to the remaining updates that is causing a crash of the script. A reminder that if I do .mp3 to .mp3, it works fine.


I don't know code enough/at all really, or I'd try and figure it out for myself.


I'm not sure if you're reading or responding any longer based on not hearing anything back for a couple of weeks now. I sure hope I haven't been a pest. I've always been respectful, appreciative and thankful. I do pray all is okay on your end.


I did think it might help to give you what I discovered with version .17. I pray that I'll hear back from you.


Thanks!

Oct 28, 2020 3:26 PM in response to William Richards3

Hoping to hear back from you on a few items above.


I have been working on using iTunes to "Get Album Artwork". I actually highlighted hundreds of songs and let it go through them. It found a lot, but also didn't find a lot, if that makes sense.


Anyway, I try to take copious notes but with all the scripts and variations we've covered, could you tell me again which script I should us for this situation laid out below.


Assume that the artwork is showing in iTunes. I then went to some folders that had respective song(s) and noticed that several were now showing up in Windows. I went through all our exchanges and it's sort of confusing.


I used the description column and sorted it so I could look at it by folder (e.g. "100s") and highlighted some songs from A-to-D. I then ran the Embed Tunes Art script but it actually deleted or removed some art. I did a backup of the ITL and XML scripts so I was able to put it back to where the artwork wasn't deleted.


Would you be able to tell me what steps I should take and which scripts to use?


  1. Highlight a range of songs in iTunes?
  2. Which script should I run?


Export/Import? CreateFolderArt? EmbedTunesArt? Something else?


I was able to run a script that would force the artwork to show up in Windows but now I don't remember since it's been a month or more since I last was working in this area.


I appreciate all your input. I do hope things are okay with you as I've not heard back now for 3 weeks tomorrow believe it or not. I'm not sure why I'm getting no reply as you've been so helpful. I sincerely hope to hear back from you.


Thanks as always.

Oct 28, 2020 4:26 PM in response to William Richards3

I used EmbedTunesArt and that worked on one track. It worked on that particular song. Then I went back to our conversations and saw this:


YOU SAID: Select one or more tracks in iTunes where you have art in iTunes, but Windows Explorer has the wrong art or none. Run the EmbediTunesArt script against the selection. You should find Windows Explorer now shows the correct artwork.


ME: I then selected all the songs in a folder (smaller folder) which a good number have artwork and it processed some, but not all on those that were missing. Does this only work in relation to Artwork you got through iTunes itself? I can't know/remember if a song has an iTunes artwork image or one I copied off somewhere and pasted into the Info/Artwork. Many of the songs didn't have updated artwork. So I then just highlighted one song that did have artwork in iTunes and ran the script again but it wouldn't work. So there are still dozens of songs in Windows Explorer without artwork showing but that have artwork in iTunes. I checked to see if there was a newer script file for this but there wasn't.


I noticed that when I copy and paste a file on a song in iTunes, it shows up right away in Windows. I even took a song that has artwork but wasn't showing in iTunes and deleted the image, but the image remained showing in the box, lower left (iTunes 10.7). I then pasted a new image into the Artwork tab and then it showed up in Windows.


Even if I run the script for EmbedTunesArt, it isn't finding or working consistently, maybe not at all.


If that script doesn't work on all of them, I'm kind of not sure what to do. Any thoughts?


Thanks. Hope you're back soon.

Oct 28, 2020 4:36 PM in response to William Richards3

BTW, I also got this error message initially when I used EmbediTunesArt:



So it deleted some artwork - and I luckily had saved the ITL and XML files before embarking on the testing of this again. When I put it back, the artwork that was deleted was back. I have no clue how or why it deleted artwork. I had selected about 30 songs in iTunes (that were all in the same folder, but different artists/songs/albums) and then ran the script. Not only did it delete some, but it didn't find or force/embed the images that are in iTunes but missing in Windows.


So anyway, I thought I should send this. My be a fools errand since I'm not getting any replies for several weeks. I always have appreciated your help, and am still holding out hope you will reply to my several posts since last exchanging with you.


Thanks as always!

Oct 29, 2020 3:14 PM in response to William Richards3

Just another note to say this EmbediTunesArt is having issues. If I select a small number (say 5), it will work. However, I tried doing it on a folder with 500 songs or so and it threw the error code pasted above (Line 155). And what concerns me is it says "The artwork has been deleted." What artwork was deleted?


I am nearing the time when all this merges and I put the pieces together to hopefully finish this project (I can start to see the finish line off in the distance), but I'm struggling with why this won't work on hundreds of titles at once. I am using the Description column and sorting it so I only do one folder. I've done this a couple of times at least and when using a larger number of song files, it's throwing the same error as posted above.


Am I doing something wrong? Could you PLEASE reply to me? I'm kind of left hanging here and I'll admit, I'm getting frustrated.


I'd very much appreciate your feedback as before. I sincerely hope all is well. If so, then I'm not understanding the lack of response. I'm sure there's a good reason but I've always been appreciative, kind and respectful in all my posts.


Please let me know. Thank you.

Oct 30, 2020 9:28 AM in response to turingtest2

Hello,

YOU SAID: The new EmbediTunesArt script is now ready. Select some tracks where you've used the iTunes Get Album Artwork feature and run the script to embed those images in their tags. Check they now show correctly in Windows Explorer.


ME: When I look, the script is still showing 1.0.0.1 and says it's the original version. So I'm not sure if the version posted (which I've downloaded again just to make sure) is an updated, correct version.

As per above, when I select files in itunes and run the script, it throws an error at line 155. I did have success using only a few files, but not if I select all the songs in a folder as I did yesterday. Can't figure out why.


I have done several posts. Last you replied on October 8th, you were going to rework the code on CleanDeadArt.


If you're unable to reply for some reason, I'd appreciate you letting me know so I can just leave this alone. I continue to be hopeful of a reply - and that you're okay. If someone else reads these posts and has any ideas/input, I would appreciate it.


Thanks.


Nov 12, 2020 2:05 PM in response to turingtest2

And just a note to say that I never got an email from you or whatever is generated when you leave me a post. I checked spam and it wasn't there either.

I did have to unlock my account for some reason. It was just total coincidence that I went to this exchange today. I was looking for something in our posts and then saw you had reached out today. Could the reason I didn't get the generated email from Apple Support Communities because I was locked out?

I am obviously back in after redoing my account security stuff. Perhaps you could get a note back to me just to make sure I'm getting? I'll check later to see if you've replied in our postings here if I don't see an email from Apple.


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.