Help would be great. I already have a script that has converted a flac file to a wave and extracted the metadata. What I am trying to do is to add the meta data to the track that was just imported to iTunes as a ALAC file. Everything seems to work upto and including the delete orig_Track. I can’t get iTunes to modify the track. What is going on?
Thanks,
Andy
tell application "iTunes"
try
set orig_Track to (add import_file)
set file_after_added_to_iTunes to (location of orig_Track)
set new_Track_file to item 1 of (convert file_after_added_to_iTunes)
set file_after_converted to location of new_Track_file
delete orig_Track -- deletes from iTunes library only, not from disk
set new_Track to track of new_Track_file
set mdata to process_metadata(mfile)
display dialog (artist of mdata) as string buttons {"Cancel", "Ok"} default button "OK"
--set new_Track_ref to reference of new_Track
set new_Track's name to (title of mdata)
set new_Track's artist to (artist of mdata)
set new_Track's album to (album of mdata)
set new_Track's track number to (tracknumber of mdata)
set new_Track's genre to (genre of mdata)
set new_Track's comment to (comment of mdata)
set new_Track's year to (date of mdata)
end try
end tell