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 17, 2020 3:42 PM in response to turingtest2

I'm not sure I understand how your scripts identified above would work. Here is one of many folders I have on an internal HD.


And here are song files in one of the folders as an example. Remember, many of these artists will have songs in other folders as well such as shown above. They're scattered all over.


So how would the script take these files and organize them into folders such as "Artist/Albums"? Do I point to where this would go? Does your script do what that macro I had that created the artist names did, but add this extra level that I'm seeking (Artist/Album)?


On one other item, you mentioned I already have the ability to export all my playlists en masse. How is that done where I can then view them one-by-one if desired to import back instead of doing en masse back into the library? Is that the M3U export off the main music library in iTunes? I exported that but don't see how to view or open individually. I can export a playlist one-at-a-time but I'm wondering about exporting all of them.


Thanks so much!!

Sep 17, 2020 6:45 PM in response to turingtest2

YOU SAID: I presume that each of these folders represents a playlist in your library, and that up until now you've used <Artist> - <Name>.<Ext> as your file naming strategy and that up until now you've used <Artist> - <Name>.<Ext> as your file naming strategy.


ME: No. No folder represents any playlist of any kind. The playlists reside inside iTunes only. The files are simply various music files within various folders. As explained, Bruce Springsteen's Born in the USA album could have tracks in different folders. Within iTunes they show as one because they've been tagged or manually adjusted to be from that album. When you click Get Info and then the Summary tab inside iTunes, you can see the file location. But no, there has been no structure related to artist and album - except in iTunes. This is what I'm working towards doing. I have created all the artist names into folders (using the macro I found on line). From there I am attempting to make albums for each artist (whether they're a one-hit wonder, or have a bunch of albums). So that's where I'm aiming to get to. So then, and only then, will I finally have the proper structure on the music.


Given that you assume my folders are playlists, I won't take any action on your notes until you know what is accurate so you can help me do the right thing. So again, as simply as I can make this;


  1. When I first started burning music off all my CDs, I did a great number (thousands and thousands) of songs using these radio broadcast quality disc libraries. So I burned library 100 with discs 101, 102, 103, etc., through however many discs were in that library. Then I went to library 200 and burned disc 201, 202, etc. Those main libraries (100, 200, 300, etc.) represented formats in radio. So disc library 100 was Adult Contemporary. Library 500 was Classic Rock. Library of discs in 300 were more Top 40 pop hits. So once I burned all those, I tagged them and then added to iTunes. Of course there are some folders that do have artist and album - but there aren't many of those, especially compared to these large 100/200/300,etc. radio library sets of discs. In iTunes, it all comes together so that all the songs from Bruce Springsteen Born to Run that were on the various discs populate in iTunes.
  2. What I'm trying to do now is redo the entire library so that I keep all the metadata (chart data, rating, artwork, etc.) when I upgrade from 160 to lossless.
  3. The new folder structure will be MUSIC/ARTIST/ALBUM. (Music being the main folder heading).
  4. When I've added the new lossless files to itunes, I will then MOVE the songs to the appropriate Artist/Album folder. iTunes will not find it so I'll have to point to the new location and all should be correct.


Sorry if I've confused you. So that's where I'm at. I am looking at creating something that will create all these Folders for both Artist and Album. As mentioned, I created the Artist folders already. I then created the Album folders using the same macro but I would have to manually put them together, if you follow, so that Artist (e.g. Beatles) has the sub-folders for their albums (e.g. Abbey Road, Let it Be, etc.). That's what I was hoping you might be able to help me with.


So again, given that I've not been clear, I'm not sure your instructions will be the right approach.


So when I sent you these folders - they are NOT playlists. They are simply the collection of songs in a respective Folder that I burned from the discs. So Monty Python is not a playlist. It is where - when I burned the songs from CD - I put those songs (skits in their case). MP3 - E Tower is a group of songs grabbed from other discs, so no, these are not playlists. (Unless I'm misunderstanding).



Please let me know. And thank you again.

Sep 18, 2020 12:22 PM in response to turingtest2

Oh, one more question; Now that I have Aerosmith as an Artist using this script (shown in the captures I just sent, now on the E:\MUSIC\Music drive, what happens when Aerosmith (or other artists already in the list) comes up again? Will the script know to just use the one already there and then add songs to any respective albums already there - if you follow? So let's say that "Pump" album has one song from this initial script run test I just did. If the next folder I do this with has two more songs from Pump, will it just add those to the Artist/Album already showing in the list?


Will it ask me if I want to copy and replace or anything like that? If it wouldn't work like my question above poses, I'm not sure what I'd do.


Please advise. Thanks!

Sep 18, 2020 1:38 PM in response to William Richards3

William Richards3 wrote:

Oh, one more question; Now that I have Aerosmith as an Artist using this script (shown in the captures I just sent, now on the E:\MUSIC\Music drive, what happens when Aerosmith (or other artists already in the list) comes up again? Will the script know to just use the one already there and then add songs to any respective albums already there - if you follow? So let's say that "Pump" album has one song from this initial script run test I just did. If the next folder I do this with has two more songs from Pump, will it just add those to the Artist/Album already showing in the list?

Will it ask me if I want to copy and replace or anything like that? If it wouldn't work like my question above poses, I'm not sure what I'd do.

Please advise. Thanks!


I've sort of assumed (or perhaps we discussed it earlier somewhere) that your library is free of duplicates. See Duplicate songs in iTunes - Apple Community for advice on seeing and cleaning these if needed. If there are no duplicates then it is straightforward. You define where the artist folders go, and each time you move a track from a particular artist it is going to go in their folder. For each album by an artist the folders for each album are uniquely defined too, so if different tracks come up in different upsampling sessions they're all going to end up in the same place. If you have duplicates where the same artist, album, track number, and song name is specified then you're going to have potential overwrite issues. This is another argument for using track numbers in the filename instead of <Artist> - <Name>. I can't recall a specific example offhand but I have a number of albums where the same track title is used more than once, but with different track numbers. That will be an issue in your layout. I cannot recall the exact behaviour of my script in these circumstances as it is years since the core code was written. I can look into it, but ideally you want to eliminate Same Album duplicates from your library before proceeding too far.


Another thing is consistency. If you have some tracks by The Beatles where they are called The Beatles, and other where they are called Beatles, then the tracks are going to end up in different artist folders. Assuming you spot any such error you can decide which version you're going to use, edit the metadata, and run the reorganizing script once more.


tt2

Sep 18, 2020 1:59 PM in response to turingtest2

YOU SAID: I've sort of assumed (or perhaps we discussed it earlier somewhere) that your library is free of duplicates.


ME: No, there are no duplicates in the library. (If there are, it would be a tiny few). As for naming, no, The Beatles and Beatles (for example) are consistent as "Beatles". (I always use a.g. "Rolling Stones", not "The Rolling Stones." Drives me crazy to have artists A-to-Z but have so many like "The Cars" or "The Who" and have them all start with "The". Not me. It's "Cars, Who, Beatles, Rolling Stones....etc.".


I think you've explained what my question was, but just to clarify for sure;


  1. I ran your script. It created those artist and albums so far. So, for example, Air Supply has four albums that were created. Let's say there are 2 songs in each of the four albums.
  2. I then create a new playlist and follow the ConsolidateByMoving instructions a second time. Let's say that the next folder I'm doing that with has the same four albums as already created, but has 2 more songs for each of the albums, thereby making it 4 titles in each one.


Will the script see the Artist and Album that's already there and just add the two new songs for the four albums already there? I think that's what you're saying. It won't make another copy, or ask me if I want to copy/replace or whatever like when you copy files in Windows, right? Again, my naming structure is consistent - that's one good thing. I'm very precise with that (99.9% of the time).


One more thing. YOU SAID: You can also edit CustomRenamer so that it knows your default media folder and pattern so that you don't have to edit those each time you use it.


ME: What do you mean here? What don't I have to edit each time I use it? What am I editing with ConsolidateByMoving? Or other thought you mean here? Sorry.


Hate to ask again, but do you have a thought on file type with size dynamics with iPod and equipment that could be impacted? Like I said, I want to replace my amp and I'm having to pay special attention to things like what the DAC supports. Some don't play AIFF. ALAC might not be listed in another. So I'm trying to balance all this.


I suppose the AAC (MP3 like) files would be sensible. Or maybe I should just go with MP3 at 320? I don't know. This has been a lot of things I've been working through.


You've been so amazing. I can't thank you enough.


Sep 18, 2020 3:27 PM in response to turingtest2

YOU SAID: Can you see if the new EmbediTunesArt script helps at will the multiple Tom Petty covers you illustrated in this post? I'd like to know the effort I put into it has paid off. Failing that there is perhaps a deeper mystery that needs investigating.


ME: The Tom Petty in question do not reside in iTunes. They are in a temporary .mp3 folder right now. That's not to say that there aren't files with incorrect artwork in many folders. When I ran this script, it asked if I wanted to do something on the one song. I canceled it.


I did notice one thing again that we've discussed in the past. I was in a folder and there was some artwork missing on a couple of Electric Light Orchestra tracks. I went to Get Album Artwork - which it did but it didn't update it in Windows. So I removed them and then dragged and dropped from a browser with the album. I refreshed the windows folder and they showed up. I forget why this happens. (I'm so sorry, we've been working on so many things).


So this is an example of a folder with a number of songs with the same artwork:


Since these aren't in iTunes, should I bother with it?


I've been looking through many folders and I'm seeing that most of the songs with artwork, are right. I don't know what happened but it seems like it's cleaned up somewhat. I'd have to go over again. Nearly every folder I checked still has those jpg files.


Let me know how I can test that script for you. And I'm sorry if I didn't communicate properly somewhere related to that script. It would be good to test in a folder for all songs but I'd want to make sure based on your reply that I'm doing it right. Thanks!

Sep 18, 2020 4:02 PM in response to William Richards3

William Richards3 wrote:

Per my very last post, (and I apologize for asking again), but what is the script or process you want me to do so that the iTunes Artwork shows up in Windows Media? You've posted this but I've lost track of that (I should have archived it). Would you mind linking to that for me again? To refresh, the artwork I do in iTunes using Get Album Artwork doesn't show up in Windows so I want/need to make sure I get those so Plex and other things can see the artwork properly.

I can go back over and find it if need be but if you can find that instruction(s), I'd appreciate it! :)

Thanks as always!


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.


tt2

Sep 20, 2020 12:06 PM in response to turingtest2


The reason I have MP3's on here was just a test. The process works. I'm still struggling with the file size of ALAC vs. AAC or MP3 320 baud.


Anyway - this is just thrilling! So amazed. Next steps are to clean the folder album art. Then get started on converting the music. (Note: I didn't test the CustomerRenamer for lyrics but I'm assuming that works since it uses ExportImport as part of the process).


BTW - Do you know of any places I could get "lyrics" to be added to iTunes without doing manually? I tried GetLyrical or something like that but I couldn't get it to work. I'd also like to see about a script or something that adds missing artwork. I wouldn't want it to have it replace any existing art. There's some I've seen that say it replaces artwork with better quality if it finds it or whatever. I'm nervous about that because so many times they use the wrong album cover. For example, they'll grab a "Best Of" for some artist instead of the proper album name. iTunes does that occasionally as well.


Anyway, I just wanted to let you know on this. Let me know your thoughts. GREAT WORK!!

Sep 20, 2020 3:41 PM in response to turingtest2

I've never heard of that (artwork is false). Brilliant suggestion.


So the ExportImport does the metadata and then the CustomRenamer does the rest as I showed you this afternoon. Great work on that!!


I'm going to try cleaning up that artwork in the various folders.


I just can't thank you enough. I'll keep you posted.


Have a nice evening. Thanks!!!


Sep 21, 2020 1:15 PM in response to turingtest2

Yesterday I practiced using the CustomerRenamer (and the EI as part of it). Anyway, I don't want to confuse you but the gist is that I had to move back in the original 160 baud so that I could do this en masse as the new MUSIC drive location hasn't permanently been established.


I added them back but noticed that iTunes wasn't finding them - even though I definitely added them back. Regardless, I went through the 20 songs and let iTunes find it. Two issues:

  1. I had to do song-by-song. iTunes used to ask "do you want to find other missing files" or something to that effect. It isn't doing that now which is creating unnecessary work. I'm on 10.7 so perhaps that's an issue, but I've been on that version now for years and it used to work.
  2. The "description" column is now missing for both the new version I had added yesterday, and the old versions I re-added. I thought I removed the upgraded versions but I probably mixed up the iTunes saving of the XML and ITL files which I do daily (or multiple times a day) when I'm doing work such as this.



Notice how there's no description for the original, or updated version. Given that I'll be doing this for thousands of songs, it's important I think to have this description column.

What am I doing wrong, or do you think is happening (or not happening)?


Thank you so much!

Sep 21, 2020 2:10 PM in response to turingtest2

Hello,


I was going to work on artwork this afternoon and I had downloaded this script from you earlier.


EmbediTunesArtCreates a cache of iTunes downloaded or embedded artwork, then embeds art into any track that doesn't have embedded art. Unlike CreateFolderArt or EmbedFolderArt this script can be used when you might have tracks from different albums stored in the same folder. 


Would you tell me again how this works, or the flow I should follow? I did create the missing artwork smart playlist as you suggested. So do I highlight those songs and run this EmbedTunesArt script? The description of this script (which I pasted above) talks about different albums stored in the same folder. While that's viable in my situation, there are more instances where the album titles are scattered among different folders.


You also mentioned that when I run the EI script, then move songs out and create playlist and run the CustomerRenamer, that the artwork would automatically be embedded at that point I believe.


Sorry, this gets a little jumbled as I'm doing so many things. I just want to make sure I'm doing the right things.


Thank you so much!!!

Sep 21, 2020 4:39 PM in response to turingtest2

Thank you sir.


Yes, a track (or multiple ones if it were an entire album) would disappear after I did Get Artwork in itunes.


Do you have any input on the missing "description" folder association that is missing for new song files (and those I moved out I and back in). I explained it better above I think.


I'm wondering why and how that will affect things moving forward as all the songs will eventually get upgraded if it won't show the file location in that column.


I had another question which is totally off our exchange - when I burned CDs in wav originally, I did them as Constant Bit Rate (CBR) instead of Variable Bit Rate (VBR). Do you have any input on that? Back then I think I chose CBR for certain reasons but it's been years since I burned the lions share or songs so I don't remember why I settled on that. No big deal if you aren't aware. I just thought I'd ask.


Thank you again so much!!

Sep 22, 2020 11:20 AM in response to turingtest2

I hope you can give me a quick reply on this. I noticed my C drive is almost full and I finally did a windows search by Size:Huge and found about 350 incidences of old backup from my iPhone (I guess last connected via iTunes in 2014). They're taking up a lot of space I think. I searched and it says to go to iTunes/Preferences/Devices - and I see the one backup there from 2014 as well. Can I delete that in iTunes, or delete the 350 or so in Windows, and then delete in iTunes?


Also, I noticed a growing number of TMP files in the iTunes/Music folder. There are 384 of those files. Can I delete those as well?


I want to clone my C drive but want to get rid of things like this that I likely don't need.


I'd sure appreciate a reply if it's possible.


If you can let me know on my post last night when you can, I'd appreciate that as well obviously. The questions in this post are time-sensitive as I'm hoping to do this today if possible.


THANKS!

Sep 22, 2020 3:11 PM in response to William Richards3

You can safely delete all of the .tmp files in the iTunes folder as long as iTunes isn't running. When iTunes updates the database it does so by writing out a new temporary file, deleting the original, and then renaming the temporary file. If you see these file in your iTunes folder that usually indicates that iTunes has crashed while writing out the file.


iOS device backups are quite large and spread out over many files. and folders. Typically iTunes maintains one rolling backup of each device. See Archive iPhone backup in Windows - Apple Community for some background. You might want to backup to iCloud if you can and archive the existing folder, then delete the backup folder on the C: drive to reclaim its space.


Do you have any iTunes media content such as old apps or movies that could be relocated to your E: drive.


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.