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

Nov 16, 2020 3:15 PM in response to turingtest2

If you're able, given how many times I've used the script, it would really be helpful if you could make the <Location> in the box, pre-filled out or just let it execute so there's no need to add it. This is the script "KeywordsToDescription".


It's not a big deal but it would speed things up when I use that. Thanks. Hoping to hear from you soon!

Nov 17, 2020 3:20 PM in response to turingtest2

BTW, (sorry to post another message) but a quick update to reiterate the most important element for me right now just to stay focused on that.


The 1.0.0.17 Export/Import script works perfectly - at least as much as the fact that it doesn't error out. So I'm not sure what is different in that script than versions .18 forward to .24 that throw errors. Something has changed but I can't quite figure it out. I had Notes ++ open and did a code Plug-Ins/compare versions and there are certainly differences but none that I can make out as to why they're not working past .17 version. I even tried copying over from (e.g.) .23 into .17 with the differences and saved as a new file and ran it, but it still threw the error so something between .17 and all the later versions to that will not work. The .17 version has never failed.


Anyway, I just thought I'd let you know. The key is that this script is the KEY to finishing my project.


Oh, and I also made these suggested changes you had for the CustomRenamer script and it worked perfectly. Thanks for the tip on that.


Root="" ' Preset target folder, set here to avoid second dialog


Change this to:


Root="E:\" ' Preset target folder, set here to avoid second dialog  


so the script doesn't suggest the wrong media folder path. Likewise line 167 reads:


Pattern="Music\<AlbumArtist>\<Album>\<TrackNumber><Name>"


Which you can change to:


Pattern="Music\<AlbumArtist>\<Album>\<AlbumArtist> <Name>"


I sure hope to hear from you soon. I'm standing by. And as I said, I'm happy to compensate you or donate in some fashion if that's allowed because you've been so incredibly helpful. Let me know.


Thanks!

Nov 20, 2020 3:16 PM in response to turingtest2

Hi again,

I haven't heard back so things must have gotten hectic. I hope to hear from you.

I've been doing some work to move things along so as to have this project nearer to it's conclusion. I have two issues that I'd like to ask. One is something new.


  1. I have been going through all the folders in my Windows folders. As you know, I have a lot of different folders. I'm going through this one folder, and then sub-folder and I'm looking to make sure the album artwork is on all the songs. As I've been doing so, if I see a folder/album without the images, I'll highlight the songs in iTunes and then run the Embed Album Art. What happens is that it won't do them all. Here's what is happening:


What I have to do is basically is to copy the album cover, then I'll keep the songs highlighted, and then copy the album cover using Get Info, and then paste the album art in the little box. That will then bring all the album artwork. But it's a really arduous process given the number of folders I have.


Do you have any idea why this is happening? I've tried doing "Clear Downloaded Artwork." I've gone through and actually deleted all the artwork one-by-one on an artist/album, and then paste it back. I tried a number of things. I even tried Create Folder Art (tested it). It didn't work either.


Any help you have here would greatly expedite my work. It would be so nice if it just worked and I could move on to the next album on my computer. I haven't timed it, but it's probably taking 2-to-3 times as long as it would if it would just work as expected/hoped for.


The second thing I wanted to ask you was if you could explain briefly about a process you suggested I use - and in what situation.

Specifically, where you told me to create a playlist in iTunes. Then drag the songs over. Then run export/import and so forth. What is different in doing that than just highlighting the list of songs in iTunes and running Export/Import? I lost track of what the difference is, or why I'd use the creating of playlists and dragging songs into it.


I have other posts since your last reply a week ago Thursday so I hope to hear from you. It sure would help greatly as I truly am at the juncture where I really need the input. BTW, I have been using the Export/Import 1.0.0.17 and it seems to be working - though I know you updated and created .18 - all the way through .23 (and perhaps .24) so there must be a reason though I've forgotten. So if you could figure out why .17 works and the subsequent ones all throw an error, that would help greatly just so I don't waste all the work I've been doing in the past many days using the .17 script - as that's the last working one I have.


And if you've not got time to help, perhaps you could suggest someone else or another way to get some input? Just please let me know. I got spoiled by your prompt replies and tremendously helpful input along the many weeks in the past.


Thanks!

Nov 20, 2020 3:19 PM in response to William Richards3

BTW, as it relates to the last post I just did with the missing artwork after using Embed Album Art script - there has been only one instance where nothing I'm doing is allowing Windows to see the album art even though it's in iTunes. I've tried everything I can think of but it just won't pick it up. Not the end of the world, but am not understanding as it's just an .mp3 file like all of them are. Any thoughts?

Thanks.

Nov 23, 2020 9:56 AM in response to turingtest2

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? They're the same exact 187, just in different format (lossless).

I ran the CustomRenamer and saw a critical error for the first time (that I've seen that). I canceled it and ran again and it went fine.


Anyway, slowly trying to piecemeal this together as I await some important feedback from you hopefully. Little frustrated, though appreciative to get this far. But the scripts seem to be failing in some way as per my recent posts as part of my questions.


If you can reply, that would be great. If you're too busy, just a quick note accordingly would be appreciated as well.


Thanks!

Dec 1, 2020 9:58 AM in response to turingtest2

I hope you had a nice Thanksgiving and that all is well.


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.


On another subject, I tested just moving some songs that I am not replacing the fidelity on - meaning these songs were either purchased, or I got through other means (I don't have a CD, or the .wav to upgrade). That works fine with CustomRenamer script. However, there's a minor question that I'm not sure you know the answer to. When it puts it in the new HD location and it moves them to the new drive, the Artist/Album won't show in the left tree in Windows explorer. I have to click the actual artist folder on the right side to have it show up on the left as part of the rest of the folders in alphabetical order. Do you know why that would be the case? It is going to cause me to have to click thousands of artist/album folders once I start CustomRenamer on this library en masse. Any thoughts?


I do hope to hear from you on these, and other posts since your last input. I'm not sure how this works but should I post a new forum (I did once a couple months back but didn't get any reply) if you're unable to provide further assistance? You've been amazing so I'm really hoping to hear back from you on this. If not, I'll thank you again for so much tremendous help prior.


Thanks so much. Anxiously and hopefully awaiting feedback.

Dec 5, 2020 2:59 PM in response to William Richards3

Hello,

I'm hoping against hope that you'll reply to my posts over the past weeks.


This is a quick one hopefully; I have a folder with songs in it but there is no album name on the files, though they're definitely on them in iTunes. Which script would get them showing up in Windows? The album art is there. And it is just this one folder. Not sure why. They're MP3 songs.


Thanks!

Dec 9, 2020 2:41 PM in response to William Richards3

Hi. I'm going to try to tackle the backlog of questions.


William Richards3 wrote:

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.


It is a new script, I start counting both major and minor version numbers at 1. There are four numbers because I copied the layout of the iTunes version number at the outset. I clearly don't need that many.


https://discussions.apple.com/content/attachment/90825bfe-a558-49b2-87a3-6b6336c79239
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.


To make any sense of an error message I need to see it in detail. The line number and error message. It may help too if you can spot any difference between tracks that cause an error and those that don't. Given the way that you've updated your library working directly in the file system outside of iTunes one possible issue is that iTunes updates its own knowledge about the content of a tag between one line of code and another, thus triggering an error due to new circumstances. I'm not seeing the issue here.


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


I'm afraid I cannot work out which specific post you're referring to here, or what I might have been planning to do. If possible click the small chevron below a post and copy the link address or copy & paste enough context so that I can see where I'm supposed to look.


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.


I do try to get back to every post, but there is a lot going on in this thread and work simply took over for a while. A simple "bump" should be enough to remind me if the forums are behaving. I routinely review all threads in which I am active that have had new activity so I'm somewhat surprised to see so many responses from you in here with no reply from me. Most odd.


tt2

Dec 9, 2020 5:32 PM in response to William Richards3

William Richards3 wrote:

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.


This Apple Support Communities preferences page should let you control whether or not you get sent an email when anyone replies to a thread you've posted or responded to. You can also bookmark the thread in your browser and check on it manually.


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?


No idea, but I think perhaps there may have been something more random going on with notifications. I normally use a view that shows me all threads I've engaged with that have had new activity since I last viewed them. This thread hasn't been showing up in that view over the last few weeks or I would have said something to you, even if it was only "I'm busy right now, nudge me at the weekend" which is what I will sometimes do when I know that I don't have the time to give an in depth response, and can't guarantee I'll remember to come back to the thread of my own accord. I get involved in hundreds.


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.


Slowly catching up.


tt2

Dec 9, 2020 7:35 PM in response to William Richards3

William Richards3 wrote:

If you're able, given how many times I've used the script, it would really be helpful if you could make the <Location> in the box, pre-filled out or just let it execute so there's no need to add it. This is the script "KeywordsToDescription".

It's not a big deal but it would speed things up when I use that. Thanks. Hoping to hear from you soon!


Edit the KeywordsToDescription script and change line 171 from:


R=InputBox(T,Title)


to:


R="<Location>"


Save the edited version as LocationToDescription.vbs.


tt2

Dec 9, 2020 8:14 PM in response to William Richards3

William Richards3 wrote:

I just happened to notice that the "description" for some songs I've been working on updating and then moving to new location show both locations (though the song Info tab only shows it's new, current location). See how it shows the "O:\MEDIA\MUSIC" drive but then after the song artist-title, it shows the location of where the song was before. Is this normal? That happens on every song I've done in glancing over things.


https://discussions.apple.com/content/attachment/73163a4b-3a50-49d6-b1b1-afebf3e1d291

Anyway, it's probably nothing but I just happened to notice. Thanks.


Without checking more closely I think KeywordsToDescription will append the value of the keyword(s) to an existing value, so if you run it twice using <Location> as the keyword then you'll get two copies of the path, but only if the path has changed between the two runs, e.g. because you've used CustomRenamer as well. You can use -<Description> with KeywordsToDescription to remove existing values and then the LocationToDescription script you made above to copy in the current paths.


tt2

Dec 9, 2020 8:20 PM in response to William Richards3

William Richards3 wrote:

BTW, (sorry to post another message) but a quick update to reiterate the most important element for me right now just to stay focused on that.

The 1.0.0.17 Export/Import script works perfectly - at least as much as the fact that it doesn't error out. So I'm not sure what is different in that script than versions .18 forward to .24 that throw errors. Something has changed but I can't quite figure it out. I had Notes ++ open and did a code Plug-Ins/compare versions and there are certainly differences but none that I can make out as to why they're not working past .17 version. I even tried copying over from (e.g.) .23 into .17 with the differences and saved as a new file and ran it, but it still threw the error so something between .17 and all the later versions to that will not work. The .17 version has never failed.

Anyway, I just thought I'd let you know. The key is that this script is the KEY to finishing my project.


We will get to the bottom of it now that we're back in conversation. I'll likely have to add some code to provide feedback when things go wrong. Please come back to me when you reach the end of all of these post by post replies with the current line numbers that come with errors.


Oh, and I also made these suggested changes you had for the CustomRenamer script and it worked perfectly. Thanks for the tip on that.


Good to know I got something right.


tt2

Dec 9, 2020 8:29 PM in response to William Richards3

William Richards3 wrote:

1. Hi again,
I haven't heard back so things must have gotten hectic. I hope to hear from you.
I've been doing some work to move things along so as to have this project nearer to it's conclusion. I have two issues that I'd like to ask. One is something new.

I have been going through all the folders in my Windows folders. As you know, I have a lot of different folders. I'm going through this one folder, and then sub-folder and I'm looking to make sure the album artwork is on all the songs. As I've been doing so, if I see a folder/album without the images, I'll highlight the songs in iTunes and then run the Embed Album Art. What happens is that it won't do them all. Here's what is happening:
https://discussions.apple.com/content/attachment/e20e43a9-1f20-4ea9-9182-56d370cbd863

What I have to do is basically is to copy the album cover, then I'll keep the songs highlighted, and then copy the album cover using Get Info, and then paste the album art in the little box. That will then bring all the album artwork. But it's a really arduous process given the number of folders I have.

Do you have any idea why this is happening? I've tried doing "Clear Downloaded Artwork." I've gone through and actually deleted all the artwork one-by-one on an artist/album, and then paste it back. I tried a number of things. I even tried Create Folder Art (tested it). It didn't work either.

Any help you have here would greatly expedite my work. It would be so nice if it just worked and I could move on to the next album on my computer. I haven't timed it, but it's probably taking 2-to-3 times as long as it would if it would just work as expected/hoped for.

The second thing I wanted to ask you was if you could explain briefly about a process you suggested I use - and in what situation.
Specifically, where you told me to create a playlist in iTunes. Then drag the songs over. Then run export/import and so forth. What is different in doing that than just highlighting the list of songs in iTunes and running Export/Import? I lost track of what the difference is, or why I'd use the creating of playlists and dragging songs into it.

I have other posts since your last reply a week ago Thursday so I hope to hear from you. It sure would help greatly as I truly am at the juncture where I really need the input. BTW, I have been using the Export/Import 1.0.0.17 and it seems to be working - though I know you updated and created .18 - all the way through .23 (and perhaps .24) so there must be a reason though I've forgotten. So if you could figure out why .17 works and the subsequent ones all throw an error, that would help greatly just so I don't waste all the work I've been doing in the past many days using the .17 script - as that's the last working one I have.

And if you've not got time to help, perhaps you could suggest someone else or another way to get some input? Just please let me know. I got spoiled by your prompt replies and tremendously helpful input along the many weeks in the past.

Thanks!


I don't know why the script isn't embedding the images in all the files if they're all selected when you run EmbediTunesArtwork. I can take a look at the code. I know I tested it earlier on and the first pass updated each track in my selection, and running it again only updated the image in the folder, so I was probably trying to avoid redundantly embedding the same image over and over. It is quite possible I have introduced an error there somewhere while trying to optimise the behaviour.


tt2

Dec 9, 2020 8:32 PM in response to William Richards3

William Richards3 wrote:

BTW, as it relates to the last post I just did with the missing artwork after using Embed Album Art script - there has been only one instance where nothing I'm doing is allowing Windows to see the album art even though it's in iTunes. I've tried everything I can think of but it just won't pick it up. Not the end of the world, but am not understanding as it's just an .mp3 file like all of them are. Any thoughts?
Thanks.


Check the mp3 for internal errors with MP3 val - http://mp3val.sourceforge.net/.

Is the image you're embedding a ,jpg file, or something else? What dimensions?


tt2

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.