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 6, 2020 3:42 PM in response to William Richards3

William Richards3 wrote:

That sounds intriguing. I'll give it a shot tonight or tomorrow morning.
The dBPower amp program is something I recently got so it would not have been used for .wav files. It's interesting that you can add tags to .wav with it. I have all these songs in .wav that took ages to burn, (I'm in the radio business I told you so I have a massive library) so I'd like to not have to burn them all again just to get tags on. I wonder if there's a way to use that program to put on existing wav? Do you see a way? If so, I could just add wav files to iTunes - as that would be the best sound quality. And Sonos, Plex, Sonology, iTunes all support it.


dbPoweramp can add tags to .wav files, but that doesn't mean iTunes can read them. I checked. It doesn't. Also dBpoweramp gathered this data when ripping a CD as it was able to search online for the data for that disc. I suspect retroactively adding information to your ripped .wav files would be a painful manual process, and not worth the candle.


Related to the .wav and dBPower - you said; "I then used iTunes to rip the same album as .wav to get a more representative set of files." What is different with those .wav than dBAmp? Is it just the codec or process DB uses versus iTunes?


I needed to test my script with .wav and .m4a (ALAC) files that didn't have any embedded metadata.


I'll try what you did and see if it works like your testing showed. I'll get the new version. BTW, how can I tell which version of EI script it is? I've downloaded several now but, even if I go to properties on the file, I'm not seeing a version number.


You can see the version number if you look at the script in a text editor like Notepad. An obvious change with the new version is that it now says if it is running in export mode or import mode in the title of the dialog boxes.


Great work - I hope it works. Let me know what you find out (if anything) on dbAmp. It would be awesome if I could just add the existing .wav - instead of converting. If not, that's fine.


It will work with .wav files, as far as the relinking goes. Since all of the metadata is still in iTunes, and iTunes cannot write out a tag to the file, that will give you an upsampled version, but doesn't create a file that you know you can use reliably in any other application.


BTW, have you tried this as AIFF files? Just curious.
Thanks so much!!!


Not explicitly tested (I've tested today with relinking to .m4a, .wav and .mp3) but it should work the same way. AIFF tags support fewer fields so ALAC is generally a better prospect as a lossless format.


tt2

Sep 7, 2020 10:43 AM in response to turingtest2

Side note: When I purchased an Apple TV and looked at My Music, it's only finding/seeing purchased songs.  How can I set it so it sees my entire iTunes library?


Totally unrelated, iTunes 10.7 will not play songs out of Apple store to preview. Is there something I need to do? It's not worked for quite a while.  I know I need to update my version but I just so strongly dislike any version past this one that I hate to do it.


Perhaps both of these are related to my being on 10.7. I can't log into my account in 10.7 any longer - it's saying I need to upgrade my software - which seems a bit of a drag. I'm kicking and screaming against updating but I suppose I might as well. Any thoughts?


Sep 7, 2020 3:03 PM in response to William Richards3

One more thing - I renamed some song files (something I had wanted to do) for an artist (3 Dog Night - to - Three Dog Night). As I went through, usually when I play the first one, then do "locate it now" (since the file name changed) - it is not finding the other same-artist named songs. Most were in the same folder. Usually if that's the case, it will find them but that did not happen here so I had to go through one-by-one which was a tedious process.


Just a side comment, if I search "3 Dog Night" it brings up 5 of the 35 Three Dog Night titles. All the artist names on artist, album within itunes and the files themselves are all spelled now as Three Dog Night. I wonder why iTunes still sees 5 of the formerly named songs. And the 5 that come up all say Three Dog Night.


The reason that is SO critically important is that I will be using the "description" field you showed me how to do to convert en mass, and then move out/back in and then play one - and have iTunes find it as well as the other files in the same folder. Perhaps it's because I changed the name of the file for the artist and won't be doing that when I do the converting on all the other song files.


I'm hoping to hear from you soon, but am always appreciative of your time. As mentioned earlier today, your script did not process/work for me. It could be operator error but I did it like I've done many times now in testing your scripts so I don't think so.



Sep 7, 2020 4:50 PM in response to William Richards3

William Richards3 wrote:

One more thing - I renamed some song files (something I had wanted to do) for an artist (3 Dog Night - to - Three Dog Night). As I went through, usually when I play the first one, then do "locate it now" (since the file name changed) - it is not finding the other same-artist named songs. Most were in the same folder. Usually if that's the case, it will find them but that did not happen here so I had to go through one-by-one which was a tedious process.


Stop working directly with files. Edit the metadata that you want to correct in iTunes. Then, if you want, either use the features in iTunes that make files reflect their metadata, or use a custom script to relocate files to a location based on your rules, and keep iTunes connected to the file. CustomRenamer is my script for this task.


tt2

Sep 7, 2020 5:19 PM in response to turingtest2

Okay. Are there any special instructions in using that script? Do you have a short list of the task order for running that script? I did save the script.


Now that you've nailed this solution for me, do you have any idea on what I should focus on next?


One thought is to address all these album art images in many of the folders such as below...


Earlier in our discussion exchanges you said; "I can offer another tool for cleaning up unwanted folder images." And you've mentioned artwork with folders several times. I'd just like to clean up everything I can so I can be as pristine as possible.


Aside from this, I've asked several questions along the way but do want to stay focused as you suggested. Would it help if I quickly organized a few of the things outside our main focus for you to consider to decide which make sense (if you're willing to help some more). :)


Again, congratulations on solving this. It's just terrific work!


I'd really appreciate your thoughts. Thank you SO SO much!

Sep 7, 2020 5:22 PM in response to turingtest2

Sorry, one more thing as I re-read you last post; I'm not quite sure I understand this.


YOU SAID: if you want, either use the features in iTunes that make files reflect their metadata, or use a custom script to relocate files to a location based on your rules, and keep iTunes connected to the file.


ME: What features in iTunes makes files reflect their metadata? Do you just mean if I change artwork, or change the name of the genre or even artist or something within the Get Info window? And the custom script to relocate files based on my rules is the CustomRenamer script?


Thanks!

Sep 7, 2020 5:29 PM in response to turingtest2

Is the script for the album artwork the "CleanDeadArt" one? As before, any instructions on the order of how to work this script is very much appreciated. And did you say that I should not run this if I have folders with many different files, not in the typical Artist/Album setup? For example, as mentioned before, folder 1700s could have a couple of Springsteen tracks from Born to Run, then 500 series could have a couple, and 900 might have the rest. It's a hodgepodge I realize. I'll get to that structure. Anything that can help expedite it will be great!


Sorry for the multiple notes. I'm just going back over things. Thank you so much.

Sep 7, 2020 5:44 PM in response to turingtest2

One more question: it is much easier to navigate in 10.7. Is there any advantage/disadvantage to staying in this version while I do the converting and upgrading these files - and then getting into the artist/album structure?


also - is the 10.7 version somehow related to it not finding other songs in a folder that changed that I mentioned? My intent is to do bulk number of songs in a folder. Moving them out. Adding the new ones. Then have iTunes find the new location. But today I had to do one at a time. It used to work, even with 10.7. This is critically important. Perhaps I'm not doing something right but it seems pretty simple.


Thanks as always. Again, sorry for the number of messages.

Sep 8, 2020 3:50 PM in response to turingtest2

That is TOTALLY fine. I appreciate you letting me know.

I'm working on fine-tuning some other things as this progress continues (making Artist/Album folders in an all-new setup for example). (If there's a quicker way to create Windows Explorer Artist/Album folders from iTunes, that would be great haha).


Rest up. You've done just great work here and I deeply appreciate it.


Look forward to your replies when time permits.


Thanks!

Sep 16, 2020 9:18 AM in response to William Richards3

This delete file box:



Has details that you wouldn't normally see when deleting a music file in Windows. Clearly dBpoweramp has inserted a system extension that provides all of that additional information. It isn't clear if it is using a Folder.jpg image, something embedded in the file, or a custom database, however if iTunes shows the correct art then my guess would be one of the other two options.


I'm trying to understand why the wrong image is shown.


tt2

Sep 16, 2020 10:26 AM in response to turingtest2

Oh, gotcha. I don't think it has anything to do with the dBpoweramp because that has only recently been introduced into my system but I do see that name at the bottom of the capture I sent. In fact, if I highlight the cursor on files from a few years ago, it also shows dB underneath the information about the song and I only recently installed it (at the suggestion of HD Tracks - a reputable service that sells hi-res files from record labels). I checked to see if this program was running in my windows start-up (msconfig) but I don't see it there. I actually set a restore point a couple of weeks ago when I installed that and I'm thinking of going back so it's not installed and see what happens.


As for recent conversion (other than testing the AIFF, Lossless, FLAC and so forth - which I did use dB for), this is the program I use to convert wav to MP3:



In fact, it's the one I used for many of the MP3s that were converted from wav.


And your comment about the deleted file having information more than you'd usually see, I'm wondering about that myself.


Do you have a conversion program that you could recommend? I'm using full capability on a 21 day free trial on dB and it has about 7 days left. Despite that issue, I still do need to get all these art images out of the folders using your script.


YOU SAID: Or you can use my script to gather the same content into a new folder, e.g. X:\Artwork where X: is the drive your library is on, so that you can review what has been pulled out before you delete it. In its current form it leaves Folder.jpg files behind. I could add an option to remove those too if you want.


ME: Do you have an idea of when you might be able to do that?


Thank you so much!!


Sep 16, 2020 3:43 PM in response to turingtest2

YOU SAID: Even if Windows is currently showing the wrong artwork for an album that you're going to upgrade after using the ExportImport process the new copy should have the right image embedded in it.


As noted previously I can cook up a script to automatically embed the current iTunes artwork of selected tracks so you can fix the artwork issues in advance of the upsampling project if you wish.


ME: I'm confused for sure. I definitely know how to run your script to replace the 160 files. I wanted to get through pruning songs out and adding as much missing Artwork as I could before doing this en masse. That said, are you saying that when I do convert to the higher quality and then replace the 160 that the upgraded versions, Windows will should have the right image embedded in it (without me having to go song-by-song to do as you suggested above)?


If you can get a script to automatically embed the current iTunes artwork, that's great. But what's confusing is it seems you're saying if I replace the 160 with the lossless file(s), the artwork will fix itself in windows? But then you're saying you could make a script to automatically fix artwork in advance of the upsampling project?


Can you clarify? Whichever gets me to my goal is what I'm hoping for.


BTW, do you have ANY idea of why so many songs have this one image on it? And how I can get them right?



BTW - The capture above is in a temporary folder where I convert wav to MP3 over the months and years. I then use ID3 tagging and then after that, I copy into the Windows folder where they'll reside. I then import them in iTunes. I don't think that matters but thought I'd ask.


Thanks!

Thank you so much!

Sep 17, 2020 2:53 PM in response to William Richards3

Hi,


I already have three scripts for moving iTunes content into artist and album folders: ConsolidateByMoving, ConsolidateByMovingLong, and CustomRenamer. iTunes can also do this within the designated media folder (keep organized) but you don't have any fine grained control, it either leaves things where they are, or organizes them according to its rules. When iTunes is working with content outside the media folder (consolidate, which can be done selectively) it makes copies, so you have a manual clean up task which my scripts avoid, as well as providing control over what is moved, and the exact layout it is moved into.


My scripts work with selected items. For each track it determines the correct folder, usually of the form <Media Folder>\Music\<Artist>\<Album>, creates that folder if it doesn't already exist, moves the file from the source folder to the destination folder, renaming in the form [D-]## <Name>.<Ext> if necessary, then relinks the library to the new path. If it removes the last media file out of the source folder it moves any folder art too, then deletes the emptied folder, and recursively removes any emptied folders above that.


VBS (Visual Basic Script) is related to VBA (Visual Basic for Applications) which is the macro coding language in Excel and other Office products. Both use the syntax of the Basic programming language, extended for object methods. See Wikipedia's articles on VBScript and Visual Basic for Applications for better summaries than I could give. The distinction between a script and compiled software is that you can read, and if you wish modify, the code of a script, whereas with compiled software you get something that runs faster, but you can't easily poke around to see how it works or make changes. I could build better interfaces for my iTunes tools if I used a compiler but it would require more steps for me to make changes, and become less easy for others to repurpose.


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.