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 1, 2020 10:46 AM in response to turingtest2

An update on the folder naming structure, this is from the Plex website on proper naming structure. If you have some input on how I can use the CustomRenamer (hopefully) to set it up in this form. It looks like there is a main "Media" folder it is asking for and then Movies, Music and TV show folders under that. Any input on how I can set it up in this manner using the script and the ability to use the naming style such as <Artist>\<Album>\... etc. and get it to what you see here below:


Here is a link to more about the naming structure.

https://support.plex.tv/articles/naming-and-organizing-your-tv-show-files/


There is some mention of including the actual date the show aired but that's overkill as far as I'm concerned.


Would love your input. Thanks!

Oct 1, 2020 12:51 PM in response to William Richards3

I ran the CleanDeadArt (custom update you did on 9/16). That worked fine.


I then tried the EmbediTunesArt script. It "almost" worked. I selected an artist with multiple albums. Most had some artwork, but not all. I used Get Album Artwork for titles missing artwork and did so for each album. I then ran the script. Most show up in Windows Explorer. But even trying multiple ones missing, or doing only one track, it just isn't coming through for all. I'm not understanding why most worked and showed up in Windows Explorer and some didn't. The artwork for all titles is showing in iTunes. Is it because some had artwork and itunes didn't quite know what was what when I ran Get Album Artwork? Here's how it looks now. And the tracks that show no artwork, actually had artwork on them, and still show artwork in iTunes.



Before I proceed to use that script for other folders as I now move to this area, I want to make sure I'm not doing something wrong.


Thanks as always!!!

Oct 1, 2020 2:52 PM in response to William Richards3

Just a note to say that I went through probably 35-45 folders and ran the Clean Dead Art script and deleted a LOT of artwork. I have no idea when or how those got introduced. Interestingly, I have a backup on this test computer and happened to look at those folders today and there isn't any artwork at all, outside the occasional folder.jpg type of image. None of these long list of AlbumArtwork images and so forth. Here's an example of one folder:

That was one of the larger ones, but many folders had hundreds of these.


Is there anything I can do to keep these folders from getting cluttered up again? It took me several hours to go through this. I know the script was written with probably a folder or two in mind so I had to keep running the script. Hey, I'm NOT complaining. It's good to get that cleaned out and I'm so happy you had that script updated for me. So thank you again!


So tomorrow I want to see about why the EmbedArtwork script didn't force Windows to see all the images per my post directly above. I'll continue to try and get as much artwork on these songs as I can. I don't know all the albums as there's songs from those "one-hit-wonders" that are hard to track down for example.


I think there are sources that will go through your itunes and add images that are missing but I'm hesitant to do that in the event it wreaks havoc. Perhaps you know of a good tool for that?


Thank you again. I'll keep you posted!

Oct 1, 2020 3:10 PM in response to William Richards3

Is there a way to clean up the Genre's in my library? I have a genre I recently was trying to apply to a number of songs - CHR. But because I had a genre of Children's story (only one song), it keeps going "ChR". I can save and then go back to edit and it will save it with all caps CHR. I even changed the song and applied "Kids" to the genre, but iTunes still has Children's Story archived.

Is there any way to clean up the genres?

I really appreciate it as always.


CHEERS!

Oct 2, 2020 3:09 AM in response to William Richards3

William Richards3 wrote:

A quick question for you; I assume the movies I have in iTunes will work in the same manner? I can just create a MOVIES folder and use CR for those as well as the script is run? No upsampling to be done obviously and there's no album to speak of. I'm not sure what is the right naming structure for that but perhaps you have some ideas. For example, I could put album titles on all the Seinfeld episodes I burned. Make another folder for all the Perry Mason episodes and so forth and these would reside under the main MOVIES folder on the new Drive? Seems to make sense?


Yes, CustomRenamer can relocate movies too, though you'll need to give a different pattern from the one you're using for music. I would suggest Movies\<Name>\<Name> with your root media folder E:\ as before. This puts each movie in its own folder. Here is an example of how this looks in my library:



Note that I've used an option that changes The Movie into Movie, The for folder names so that folders are stored in a conventional alphabetical order that ignores any leading "The". Note too how I arrange for a series of movies to be be stored as <Series> # - <Movie> which I either did by hand or using the pattern Movies\<Grouping> <DiskNumber> - <Name>\<Name> after setting suitable values for grouping and disk number. All of my movies are stored in this same layout, whether iTunes compatible files or not, and every folder contains a Folder.jpg image so browsing the Movies folder shows me what I've got.


Plex seems to work reasonably well with this layout. I put a .plexignore file in the folders that contain iTunes DRM protected content that won't work with Plex. This file contains the following text:


# Ignore iTunes Extras & DRM content

*.ite/

*.*


which makes Plex ignore that video and any iTunes Extras folder that might be in the same folder.





For TV Shows I use the pattern TV Shows\<Show>\<EpisodeID> <Name> where my episode IDs are all of the form s##e##. Again I use same structure for non-iTunes content as iTunes compatible content, include the same .plexignore file where appropriate, and have Folder.jpg art images in each show folder so I can more easily see what I'm looking at when browsing with Explorer.


See also this older post on using season numbers to control the appearance of a show within iTunes. Personally I use season numbers as intended within iTunes, but don't split shows into Season # folders which is what iTunes would do if it were managing the files. Note these conventions that I follow:


Show = Album = <Show Name>

e.g. "Heroes"

Artist = Album Artist = <Show Name> or <Show Name> Cast (or something like that)

e.g. "Heroes Cast"

Season No. = <Season No.> or <Blank> (Separate seasons or all listed together)

e.g. 1-2

Episode ID = s##e## (This field, sorted alphabetically, controls order)

e.g. s01e01 - s02e34 (use s##e### when >99 episodes)

Episode No. = Track No. = <Absolute Episode No.>

(Can also be per season, but abs. is better) e.g. 1 - 34

Disc No. = <Season No.>

e.g. 1-2



tt2

Oct 2, 2020 3:40 AM in response to William Richards3

William Richards3 wrote:

Just a note to say that I went through probably 35-45 folders and ran the Clean Dead Art script and deleted a LOT of artwork. I have no idea when or how those got introduced. Interestingly, I have a backup on this test computer and happened to look at those folders today and there isn't any artwork at all, outside the occasional folder.jpg type of image. None of these long list of AlbumArtwork images and so forth.


Don't forget these are normally hidden files so may not necessarily be included when copying content from one location to another.


Here's an example of one folder:
https://discussions.apple.com/content/attachment/c880fc1f-e72f-44f4-bff8-5d16ff199f8a
That was one of the larger ones, but many folders had hundreds of these.

Is there anything I can do to keep these folders from getting cluttered up again? It took me several hours to go through this. I know the script was written with probably a folder or two in mind so I had to keep running the script. Hey, I'm NOT complaining. It's good to get that cleaned out and I'm so happy you had that script updated for me. So thank you again!


You should really be able to process the entire drive in one hit once you're happy with the script's behaviour. No need to work one folder at a time.


So tomorrow I want to see about why the EmbedArtwork script didn't force Windows to see all the images per my post directly above. I'll continue to try and get as much artwork on these songs as I can. I don't know all the albums as there's songs from those "one-hit-wonders" that are hard to track down for example.

I think there are sources that will go through your itunes and add images that are missing but I'm hesitant to do that in the event it wreaks havoc. Perhaps you know of a good tool for that?


I may have mentioned it before, but I won't use such tools on a global basis either. I have used MusicBrainz Picard tagger on occasion with small groups of untagged files when trying to repair/clean up media libraries for other people, but generally I'll fix missing or incorrect data by hand.


tt2

Oct 2, 2020 3:43 AM in response to William Richards3

William Richards3 wrote:

Just to add, I don't even have Windows Media Player installed on my computer. I always hated it, though I did have it at some point I guess but it was long ago.
Thanks!


Yep, this cruft from Windows Media Player can hang around forever. Simply visiting a website that included Windows Media Audio content was enough to fire up the application in the background allowing it to automatically scan and process the media folder, even if you never actively used it.


tt2

Oct 2, 2020 4:17 AM in response to William Richards3

William Richards3 wrote:

Is there a way to clean up the Genre's in my library? I have a genre I recently was trying to apply to a number of songs - CHR. But because I had a genre of Children's story (only one song), it keeps going "ChR". I can save and then go back to edit and it will save it with all caps CHR. I even changed the song and applied "Kids" to the genre, but iTunes still has Children's Story archived.
Is there any way to clean up the genres?
I really appreciate it as always.

CHEERS!



Use the Column Browser, View > Column Browser > Show Column Browser, and enable the Genres column if not already shown with View > Column Browser > Genres.



Step through your genres one at a time by clicking in the Genres section. The arrow keys will let you move from one to another. If you find a genre you want to eliminate you can then select all the tracks in the window below to set them all to some new value, or work one artist or album at a time if that is more appropriate. Once there are no tracks from a given genre left that genre should be removed.


When typing in the genre field there are a set of default genres that may come up as you're typing. There is a fixed list, plus any custom genres in your library. If you remove one of your custom genres you need to close iTunes and reopen before it goes away from the autocomplete lists. For a capitalization issue you cannot resolve add a trailing X for all items that contain the problem value (e.g. set GeNre to GeNre X), close iTunes, reopen, then remove the X, setting the desired capitalization (e.g. set to Genre), then close and reopen iTunes once more. iTunes generally attempts to be case insensitive, but you shouldn't try to use two different versions within the same field. The genre field autocomplete list can draw from media in all parts of the library, so a value in audiobooks can affect what you see when working with music.


tt2

Oct 2, 2020 9:25 AM in response to turingtest2

YOU SAID: You should really be able to process the entire drive in one hit once you're happy with the script's behaviour. No need to work one folder at a time.


ME: I'm not clear on this. Are you saying that if all the folders are located within, say the "I" drive, that I can just click the I drive as the location when the script first ones and it will go through all the folders one after another? Sorry, I'm not totally clear.


As for the MusicBrainz tagger, I've not used obviously. I may try it and see how it works (I'll test on the other test computer). I'm with you, I usually try to do it on my own.


And BTW, back to those few Cheech & Chong files that the artwork didn't show in Windows; once I do any adjustment on the permissions, should I run the script again? Makes sense. I was just seeing what to do there.

Oct 2, 2020 9:55 AM in response to turingtest2

I'll have some questions I think on this area I think. Would you mind sending an example of some movies and how you have the setup when you look at INFO tab? Then an example of the TV shows? Maybe a series. I'd just like to see how that looks. I did look at your older post suggesting how to set this up but seeing a few real-world examples will help I think. It should be fairly simple. Hopefully I'm showing myself to not be a total idiot with things and that I pick things up well. (Good teacher!)


I'll thank you again as always!

Oct 2, 2020 10:14 AM in response to William Richards3


William Richards3 wrote:

Thank you for that input. I was able to see the proper album covers expected:


Great. So that part is functioning correctly.


And I checked naming of the files and all look consistent to me. See if you notice something that maybe I missed. I didn't change anything today yet.


Looks OK from here. I suppose the odd random trailing space in an artist or album name might not be evident. My guess is that shouldn't really make a difference to the way the script works, but I'd have to test it to be certain.


As for repairing security permissions, I had a question. I have gone to this spot and wondered if I should set full control to both of the first two on the list. Also the checkbox you point out in the article is available for me to check. Once you confirm what to do here, I will do accordingly. You'll notice administrators shows full control as well.


I don't think that is needed. The account you actually use and SYSTEM need full control, whether other user accounts have access shouldn't affect what happens in iTunes when it tries to make changes.


Where are these particular Cheech & Chong files stored right now? I'd be inclined to inspect the files themselves in that folder first, looking for the specific permissions on them and checking the read only status before a blanket update of permissions. If they seem to be OK I'll build in some tests in the script to try and work out what is going wrong.


tt2

Oct 2, 2020 10:26 AM in response to turingtest2

On the instructions related to eliminating a genre I don't want any longer, I was able to remove the genre's from the list on the column view/genre. I then changed the three songs that had "Children's Fiction" on them and replaced with something else. I closed iTunes. I opened it and then went to a song to fill in with "CHR" - which is what I want to come up when I type the three letters - but it still showed "Children's Fiction" in the box as I typed CHR (changes to ChR). I'm not clear on the last set of instructions. Could you clarify that for me?


YOU SAID: When typing in the genre field there are a set of default genres that may come up as you're typing. There is a fixed list, plus any custom genres in your library. If you remove one of your custom genres you need to close iTunes and reopen before it goes away from the autocomplete lists. For a capitalization issue you cannot resolve add a trailing X for all items that contain the problem value (e.g. set GeNre to GeNre X), close iTunes, reopen, then remove the X, setting the desired capitalization (e.g. set to Genre), then close and reopen iTunes once more. iTunes generally attempts to be case insensitive, but you shouldn't try to use two different versions within the same field. The genre field autocomplete list can draw from media in all parts of the library, so a value in audiobooks can affect what you see when working with music.


ME: That's the part I'm unclear about.

Oct 2, 2020 10:34 AM in response to William Richards3

William Richards3 wrote:

On the instructions related to eliminating a genre I don't want any longer, I was able to remove the genre's from the list on the column view/genre. I then changed the three songs that had "Children's Fiction" on them and replaced with something else. I closed iTunes. I opened it and then went to a song to fill in with "CHR" - which is what I want to come up when I type the three letters - but it still showed "Children's Fiction" in the box as I typed CHR (changes to ChR). I'm not clear on the last set of instructions. Could you clarify that for me?

YOU SAID: When typing in the genre field there are a set of default genres that may come up as you're typing. There is a fixed list, plus any custom genres in your library. If you remove one of your custom genres you need to close iTunes and reopen before it goes away from the autocomplete lists. For a capitalization issue you cannot resolve add a trailing X for all items that contain the problem value (e.g. set GeNre to GeNre X), close iTunes, reopen, then remove the X, setting the desired capitalization (e.g. set to Genre), then close and reopen iTunes once more. iTunes generally attempts to be case insensitive, but you shouldn't try to use two different versions within the same field. The genre field autocomplete list can draw from media in all parts of the library, so a value in audiobooks can affect what you see when working with music.

ME: That's the part I'm unclear about.


Thinking again about this you're looking at autocomplete correcting the case as you type to make a partial match to an existing value. Workarounds are to paste in the full value you want having previously copied it from somewhere else, or type in your full string, then use the cursor to go back and update any characters that are showing in the wrong case.


tt2

Oct 2, 2020 10:55 AM in response to turingtest2

YOU SAID: I don't think that is needed. The account you actually use and SYSTEM need full control, whether other user accounts have access shouldn't affect what happens in iTunes when it tries to make changes.


ME: So I should change these two to Full Control?


As for the file location for Cheech & Chong files, they are here:


What I noticed on the Cheech files in iTunes was the it had either no composer, or it had either "Cheech/Tommy Chong" or "Cheech Marin/Tommy Chong" or "Cheech Martin/Tommy Chong" (spelling of "Marin vs Martin"). Either way, I cleared all those out. I re-ran the Embed iTunes script and now the album covers are showing in Windows. :)


I'm not sure if there was something else I did, but if this permeates into other files as I do the EmbedArtwork script, it would be good to know. I'll keep an eye on that for sure.


Let me know your thoughts. THANKS!

Oct 2, 2020 11:11 AM in response to turingtest2

Yes, that's what I do generally (just type in CHR - it changes to Chr - then I hit the space back. I'm trying to eliminate the old genre (that I have since deleted - it was only on three songs - so that "Children's" doesn't fill in every time I type in "CH.....". It defaults to Children's when I do that.


I had a similar thing where I changed XMAS music to Holiday, because in redoing all this iTunes library, I created a genre called XM. Once I changed all the XMAS to Holiday, I can now just type in XM and nothing else comes up. Seems that "CHR" should work the same way since I eliminated Children's as a genre.


Perhaps I didn't follow the instructions right. Here are the genres now and you'll see Children's is no longer there:


But here's what happens when I type in CH .. I'm typing a capitalized "H" after the C, so CH. And then before I can type R, it does this. If I type past this it then becomes ChR as I said.


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.