Become a member of the iLounge Forums. Register Now!
To start viewing messages, select the forum that you want to visit from the selection below.
If this is your first visit, be sure to check out the Forum FAQ and Forum Policy.

Topic: Help Restoring Library with "Copy Track Info to CD Tracks"

Reply Thread Tools Topic Search
 
Old 09-26-2004, 08:24 PM
#1
 
Freshman Lounger
 
Join Date: Jun 2004
Location: Philadelphia, PA
Posts: 6
Help Restoring Library with "Copy Track Info to CD Tracks"

I have just had the unfortunate experience of having my hard drive fail on me and losing about 12,000 songs. The only good news is that I was able to use iPodRIP to restore the 5,500 of those that I had on my iPod including play counts, ratings, and comments.

Anyway, I now have an iTunes music library with 12,000 songs in it, half of which are missing the associated files. Since I actually own the CDs for the majority of these tracks, the easiest way for me to restore my song collection is to simply re-rip all of my CDs using "Replace Existing". And the easiest way for "Replace Existing" to work is to use "Copy Track Info to CD Tracks".

UNFORTUNATELY, "Copy Track Info to CD Tracks" doesn't work on the songs that are missing their files. Is anyone here familiar enough with the script to help me modify it so that it can work for songs that are missing files? PLEASE!!!?

I want essentially the same functionality (copying the tags from the selected songs to the songs in the CD playlist) but without the need to set a reference to the actual song since I need to import songs that are missing tracks.

Thank you.
grrr223 is offline  
Share on TwitterShare on FacebookDigg this Post!Google Bookmark this Post!
Reply With Quote

Join the iLounge Community and the ad above will disappear.

Old 09-27-2004, 10:06 AM
#2
 
Freshman Lounger
 
Join Date: Jun 2004
Location: Philadelphia, PA
Posts: 6

I think what i'm looking for is:

Is it possible to duplicate the functionality of the script without having it create a new playlist first? I will always be selecting full albums in the proper order so maybe that makes things less complicated.

I don't have much experience with applescript, but this sounds like a good reason to learn. It really does mean the difference between restoring my music collection being a manageable process to one that will take FOR...EV...ER (think The Sandlot).
grrr223 is offline  
Share on TwitterShare on FacebookDigg this Post!Google Bookmark this Post!
Reply With Quote
Old 09-28-2004, 10:15 AM
#3
 
Freshman Lounger
 
Join Date: Jun 2004
Location: Philadelphia, PA
Posts: 6

Well, I think I got it.

PHP Code:
tell application "iTunes"
   
--Assign the audio CD Playlist to a variable
   repeat with i from 1 to the count of sources
      
if the kind of source i is audio CD then
         set theCD to the audio CD playlist 1 of source i
      end
if
   
end repeat

   
--Set a reference to the selected songs
   set trackList to get a reference to
(selection of front window)
   
   --For
each song in the selection
   repeat with aTrack in trackList
      
--loop through the audio CD tracks
      repeat with i from 1 to the count of audio CD tracks in theCD
         
--until you find the one with the same track number
         
if i is equal to the track number of aTrack as integer then
            
--then set the tags of the CD track to that of the selected track
            set artist of
(audio CD track i of theCD) to (artist of aTrack) as string
            set album of
(audio CD track i of theCD) to (album of aTrack) as string
            set bpm of
(audio CD track i of theCD) to (bpm of aTrack) as integer
            set comment of
(audio CD track i of theCD) to (comment of aTrack) as text
            set compilation of
(audio CD track i of theCD) to (compilation of aTrack) as boolean
            set composer of
(audio CD track i of theCD) to (composer of aTrack) as string
            set disc number of
(audio CD track i of theCD) to (disc number of aTrack) as integer
            set disc count of
(audio CD track i of theCD) to (disc count of aTrack) as integer
          
--set enabled of (audio CD track i of theCD) to (enabled of aTrack) as boolean
            set EQ of
(audio CD track i of theCD) to (EQ of aTrack) as text
            set finish of
(audio CD track i of theCD) to (finish of aTrack) as integer
            set genre of
(audio CD track i of theCD) to (genre of aTrack) as text
            set name of
(audio CD track i of theCD) to (name of aTrack) as string
            set rating of
(audio CD track i of theCD) to (rating of aTrack) as integer
            set start of
(audio CD track i of theCD) to (start of aTrack) as integer
          
--set track count of (audio CD track i of theCD) to (track count of atrack) as integer
          
--set track number of (audio CD track i of theCD) to (track number of atrack) as integer
             set year of
(audio CD track i of theCD) to (year of aTrack) as integer
          end
if
        
end repeat
   end repeat
end tell
This is my first [working] Applescript! I borrowed from Copy Track Info to CD Tracks as found at the link in my original post and used some other information on Doug's site to learn how to set a reference to the selection and loop through its tracks.

While the script is missing any error handling, it provides the same functionality as the original Copy Track Info to CD Tracks, but it does it without creating a new temporary playlist so that it doesn't give any errors when running it on dead or missing tracks!!! Also, you don't have to have either your selection or the CD tracks in any particular order, it automatically matches them up by track number.

If anyone has any suggestions, please provide feedback. Is there any specific benefit of creating a temporary playlist over just looping through the selection like I just did? I know it's looping a lot, but it runs acceptably well on my 1.25 Ghz PB.

Anyway, just thought I'd share my success.
grrr223 is offline  
Share on TwitterShare on FacebookDigg this Post!Google Bookmark this Post!
Reply With Quote
Old 01-08-2005, 08:24 PM
#4
 
Freshman Lounger
 
Join Date: Oct 2003
Location: Hollywierd!
Posts: 1
Talking Brilliant!

You rock and roll, my friend. I just lost ca. 18,000 mp3s thanks to upgrading to 10.3.7 and having *three* firewire drives fail simultaneously. I was able to salvage about 9K of them, but as I began to consider the possibility of re-ripping 10K cd tracks, I realized that I needed to avoid retyping all the info I had so painstakingly entered and massaged until it had meaning...(especially dates for all those big multi-cd compilations; I'm a music historian, so I like to have the song dates correct). Your fix for the Track Info to CD Track just saved my life. Thanks for posting it!

rwf

rfink1913 is offline  
Share on TwitterShare on FacebookDigg this Post!Google Bookmark this Post!
Reply With Quote

Topic: Help Restoring Library with "Copy Track Info to CD Tracks"

Reply Thread Tools Topic Search

Become a member of the iLounge Forums. Register Now!
To start viewing messages, select the forum that you want to visit from the selection below.
If this is your first visit, be sure to check out the Forum FAQ and Forum Policy.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





View iLounge History. Read our old Forums Archive (2001-2003)
All times are GMT -4. The time now is 05:11 PM.


Shop for Accessories: Cases, speakers, chargers, etc.