title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Edit Tags in iTunes folders

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RMJFlack

    • Feb 2013
    • 39

    Edit Tags in iTunes folders

    Is it safe to use [Right-click/ Edit ID-Tags] on files in iTunes music folders?
  • Spoon
    Administrator
    • Apr 2002
    • 44505

    #2
    Re: Edit Tags in iTunes folders

    You can make the changes, but iTunes is unlikely to notice them, you would have to remove and readd the files to iTunes.
    Spoon
    www.dbpoweramp.com

    Comment

    • swerner

      • Mar 2011
      • 9

      #3
      Re: Edit Tags in iTunes folders

      Maybe this script (I named it itunes_updatefromfile.js) is helpful:

      After editing the tags, start iTunes and run the script.

      Code:
      var ITTrackKindFile = 1;
      var iTunesApp = WScript.CreateObject("iTunes.Application");
      var mainLibrary = iTunesApp.LibraryPlaylist;
      var tracks = mainLibrary.Tracks;
      var numTracks = tracks.Count;
      var i;
      
      WScript.Echo("Start UpdateInfoFromFile");
      
      for (i = 1; i <= numTracks; i++)
      {
          var currTrack = tracks.Item(i);
      	
          // is this a file track?
          if (currTrack.Kind == ITTrackKindFile)
          {
              currTrack.UpdateInfoFromFile();
          }
      }
      
      WScript.Echo("UpdateInfoFromFile Done");


      It's a JScript for the Windows Script Host.

      Comment

      • RMJFlack

        • Feb 2013
        • 39

        #4
        Re: Edit Tags in iTunes folders

        Many thanks, Swerne!
        Now I just have to go find out how to run scripts
        This basically forces iTunes to reload its database form the music files?

        Comment

        • swerner

          • Mar 2011
          • 9

          #5
          Re: Edit Tags in iTunes folders

          Just doubleclick this .js file.
          I think since Win Xp WHS is installed by default.

          The script reads the tags from the file and updates the iTunes-database. It works only with tags apple supports. I used it for updating "album sort".

          Updating of e.g. rating will probably fail, because the rating is not stored in the file, but only in the database.

          Comment

          • RMJFlack

            • Feb 2013
            • 39

            #6
            Re: Edit Tags in iTunes folders

            Thanks Swerner, I'll try that (after Ive backed up the Library).
            This looks very useful for any metadata editing nto just if/when I co-opt a field for "original source"
            ... I guess this is one of those topics where a question gets an answer that begetsanother question ....
            You refer to tags "that Apple supports"... Im wondering how to ascertain that in this context (other than trial and error).
            iTunes itself seems a little inconsistent as to what fields show up in which contexts: Get Info, Song Listing column selection dropdown, Playlist Export (m3u vs xls) etc etc.
            The field Im thinking of co-opting is "Category" which appears to be blank tho i Havent tested every track yet.
            Idea is to code a "original source" value in particular so I can tell which iTunes tracks are also in the FLAC library.
            ....
            Im still tyring to figure out if turning off "use iTunes" will help, I suspect it could, at the expense of duplicating (most of) the current iTunes library that will not be in FLAC
            so the directories would be
            A. FLAC
            B. high quality mp3 converted from FLAC for iTunes
            C. high quality "original" AAC/MP3 [1]
            D. other, inlcuding all of current iTunes not in A-C (old iTunes purchases, other downloads etc)

            iTunes lib - re-built from B,C,D
            SBS scans A, C,D

            [1] If I decide to re-rip every CD which I have, Im not sure if Id use FLAC for everything ("Best of Brit Blitz Rock Invasion" worth 300+ MB??). Also at least as an interim measure I may not re-rip stuff that is currently in AAC 256k bit, time is limited.

            While Im sceptical of iTunes Match it may be worth springing for the subscription to get my old iTunes purchases upgraded to 256k from 128k.

            Am I heading in the right direction?

            Comment

            • garym
              dBpoweramp Guru

              • Nov 2007
              • 5888

              #7
              Re: Edit Tags in iTunes folders

              Originally posted by RMJFlack
              Am I heading in the right direction?
              I think you are not. Using Squeezeboxes and LMS you are better off in my opinion in NOT using the "use itunes" integration. It causes more problems than it solves. I use itunes and ipods but also Squeezeboxes. In my LMS (squeezebox) setup I have FLAC files and files that I have in mp3/m4a only. For itunes I have another directory that has mp3 copies of the FLAC files. So it looks like this:

              e:\music\FLAC\artists\albums\tracks
              e:\music\mp3only\artists\albums\tracks
              e:\mp3copy\artists\albums\tracks

              In LMS, I tell it my music library is e:\music (and I do NOT click "use itunes" option). So LMS picks up my FLAC files and mp3/aac file where I have no FLAC version.

              In itunes, I tell itunes my music library is e:\music\mp3only\.... Then after this library is read in, I go to FILE/ADD FOLDER TO LIBRARY and select e:\mp3copy\ directory. So when done, I have the mp3/aac only files and the mp3 copies of FLAC files in my itunes library.

              Also, I don't uses RATINGS in itunes, so it doesn't bother me to lose ratings info or last played info, etc.. Given this, if I want iTunes to reread all my file tags after changes, etc. I simply "remove" all files from my itunes library (but when it asks whether to also delete from disk, I say NO). Then I add all the files back in. This causes itunes to do a complete recreation of its own database from the new tags. I realize this is the hammer approach, but it works fine. I have about 70,000 files, so this can take a few hours in itunes but only needs a few mouse clicks from me to run.

              Comment

              • RMJFlack

                • Feb 2013
                • 39

                #8
                Re: Edit Tags in iTunes folders

                Thanks, garym. Unless I'm misreading you, I think actually what I'm thinking of moving to is similar to your approach. I think the only difference is that I have 2 directories for your "mp3only", my C & D. If all my re-rips are to FLAC, C would go and actually it would be the same. (and maybe I won't bother to re-rip those 'secondary' CDs I alluded to). And yes I thought I had said I was thinking of turning off use iTunes.
                Thanks for the detailed help, I think I have a plan now. The hard work is going to be to identify the part of the current iTunes library that is for my file D (your mp3only).

                Comment

                • garym
                  dBpoweramp Guru

                  • Nov 2007
                  • 5888

                  #9
                  Re: Edit Tags in iTunes folders

                  Originally posted by RMJFlack
                  Thanks, garym. Unless I'm misreading you, I think actually what I'm thinking of moving to is similar to your approach. I think the only difference is that I have 2 directories for your "mp3only", my C & D. If all my re-rips are to FLAC, C would go and actually it would be the same. (and maybe I won't bother to re-rip those 'secondary' CDs I alluded to). And yes I thought I had said I was thinking of turning off use iTunes.
                  Thanks for the detailed help, I think I have a plan now. The hard work is going to be to identify the part of the current iTunes library that is for my file D (your mp3only).

                  aha. Yes, I see you were turning "use itunes" OFF. I read it too quickly.

                  Comment

                  • RMJFlack

                    • Feb 2013
                    • 39

                    #10
                    Re: Edit Tags in iTunes folders

                    Easily done!

                    ...

                    Any tips or tricks for extracting the portion of iTunes that has not been re-ripped ("mp3only")? If the track filenames were totally consistent i could write a program to simply compare the contents of the respective directories (not trivial as the sub directories will differ) but Im pretty sure that some or many will have some differences in file names. I cant see a way around a manual read thru the iTunes album list or is there something Im missing? The other approach is to find a TARDIS and go back in time to before itunes, and start over!!

                    Comment

                    • garym
                      dBpoweramp Guru

                      • Nov 2007
                      • 5888

                      #11
                      Re: Edit Tags in iTunes folders

                      Perhaps use the Perfect Tunes DeDup? In my own case, every time I ripped a few CDs to FLAC, I immediately went over to my mp3 subdirectory and deleted those files. Since you didn't do that, you could simply go through your FLAC directory, artist by artist and then delete the matching albums in your mp3 directory. This is a manual process, but even with thousands of albums, you should be able to do this in a matter of a few hours.

                      Comment

                      Working...

                      ]]>