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

Dec 18, 2020 4:15 PM in response to turingtest2

YOU SAID: (in reply to me)


Hello again. I used the "creating a playlist, and dragging files to it from Windows" process. Then highlighted. Ran the E/I script. Then moved the songs out of the Folders they were in in Windows. Then added the new Lossless tracks. Dragged the .txt file onto the .17 script. It finished but out of 187 tracks, about 10 or so had to be located individually. If I'm doing hundreds of songs at a time as I go along, that's going to be tedious. Why were the files not found?


YOU: Offhand I don't know. At this point we're far enough removed from when we started that I can't recall the exact operation. I'd need a specific example of the before and after path for a track that needed to be located individually to work out why, and hopefully improve that mechanism. It could potentially be something not immediately visually obvious

like the occasional double space.


ME: I'll try to provide exact examples.  I don't do more than say 20 titles at a time at the moment because of all the hindrances I'm experiencing (mostly with the E/I issue) - and the lost connection to the files. Meaning, iTunes isn't seeing the same artist/title.mp3 as the new artist/title.m4a that is in the exact same folder as the original so I'm not sure what's up.  I have to do almost every song one-by-one, and even if I let iTunes try to find other files, it doesn't.  Huge pain but it is what it is. Perhaps if you stumble onto why .17 works (but has some issues) and the others don't (you wouldn't have done .18-.23 or .24), hopefully will solve the other things described herein.


NEXT SUBJECT:


ME: I've not yet heard back from you since your Nov 12th reply asking how things were moving along. I am trying to use this EmbedArtwork script and it seems to still throw an error - depending on the folder I'm running it against. In some cases, there are many files within the folder than I have deleted from iTunes so there would be no reference point in itunes for those songs. Not sure if that's causing the issue. I get either an error on line 155 - or a "catastrophic" error. In either case, I go to my smart playlist called Artwork Missing (you showed me how to set that up in smart playlist), so I can find those it deleted the

artwork from and go back and add them back again. But I'm about to embark on doing hundreds of titles so it would be helpful to see what your input might be.

 

YOU SAID: Line 155-7 is this little section, which is supposed to clean out store art before embedding custom art.


If

.Artwork.Item(1).IsDownloadedArtwork Then


.Artwork.Item(1).Delete

' Then remove the store art


End If


 

If nothing else I can simply ignore any errors that occur although I'd prefer to understand what mistake I'm making here. Either way I'll see what I can do to make this code more robust.


ME: I hope you are able to. I think you understand the biggest issue is with E/I working properly - which means keeping the link to the original file so I don't have to manually go through and hook them back up again. Sorry for the many replies, but you were great to reply to those I posted. Sorry about not knowing you replied on Dec. 9th. My bad. Shoot. That would have helped. And I hope I get an alert in my email if you do.

Cheers!

Dec 24, 2020 2:20 PM in response to William Richards3

HAPPY HOLIDAYS!


I hope you have a good Holiday.


In the hopes that I can get a reply, and being redundant I know, but this Export/Import is a real mess. There has not been one time it's been free from some issue - even when highlighting only one track (though using one track only does get to a better outcome).


In fact, things seem to be getting worse and I just don't know what to do. Every Single Time I do this, I'm having to go back and link up songs again. I'm also noticing that it sometimes is losing album artwork (which may explain why versions went beyond the 1.0.0.17 that I use - simply because it's the last version that doesn't crap out before it finishes). Even at that, let's say I do 16 songs for example. It will NEVER keep the link for all 16 in-tact. I have to go back and link them one-at-a-time. Sometimes it'll be just 4-5 of them, but more often than not, it's the whole 16 (as an example). So I have to go back and connect them one-by-one. And if I let iTunes try to find the other missing titles, it won't find them. And as mentioned above, even if I browse to the folder where the first song is, for example, then move on to the next song, it will still open a folder from some other browse (not sure when/how/why) so I have to go to the right drive, the right first folder, then the next folder, and then finally to the folder with the song. Imagine doing that one-by-one? It's a nightmare.


This is down to the point where - if this Export/Import worked, and songs didn't lose their link (even though it's the same artist/title.m4a to replace artist/title.mp3 in the same exact folder and location), I could be done with this many months long project in a couple of days. As it sits, it will take weeks and a lot of stress/angst.


I'm so close to the end and do hope you can reply and help me figure this out. I believe I'm doing everything right. I've tried creating playlists and dragging songs in and doing the flow as described many times above (from your input and my notes), and I've done it just highlighting within iTunes itself. NOTHING is working as it should.


The CustomRenamer script works great. As does the KeywordsToDescription script (especially since you indicated where to place the <Location> in the code so I don't have to type that in.


Can you please, please try and solve this for me. I got very spoiled with your quick replies along the many weeks and am frustrated that I've not heard back.


I don't want to pester you, but I really, REALLY need your help because I've done all the clean-up and am ready to get all the songs moved out and new upgraded fidelity moved in.


Let me ask you this; I'm using Media Monkey's free sofware version to convert songs from .wav or .flac to ALAC (M4A) 16/44100. I also have a trial version of the DBPower Amp that I put on my computer again. But as I've already burned a ton of .wav or .flac to ALAC already with Media Monkey, I'd rather not do that all over again - but that's doable of course if you think it could be the converter maybe causing the problem. I wouldn't know how to check. The file sizes between the two programs for converted songs are nearly identical. One might be 35888 and the other file size for the same song is 35884. Anyway, I'm just trying to think of everything I can to get this working.


One thing is certain, the 1.0.0.18 thru ....24 do NOT work through completion. The first part works, but it also throws an error (and they vary as to what the error reports) after I drag the .txt file on top of the script.


I am pretty much desperate here and sincerely have appreciated your help. It's been incredible. This however, is the top thing through this entire process that needs to get solved. Why don't all the songs successfully link up?


In fact, I think that's the main problem (though some artwork goes missing I discovered).


You'll remember back in our exchange perhaps, but I was saying that I ran about 80 songs using the E/I script (don't recall the version) and a handful of them didn't connect/link. So I think this has been an issue always.


Thank you so much. Enjoy your holidays!

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.