Re: fixing an MP3's ID3 tags






On 29/5/06 11:13, "Charles Kooij" wrote:

Stimpy <stimpy1997uk@xxxxxxxxx> wrote:

On 29/5/06 00:20, "Charles Kooij" wrote:

I've been using MP3s for a very long time, certainly pre-dating iTunes.

Before iTunes I organised my MP3s in the way that many iPod haters seem
to like - with the artist's name, track number and name in the title.
Didn't bother with ID3 tags. Nowadays, of course, the vast majority of
my MP3s do have proper tags but I still have many, many hundreds that
are incorrectly tagged, whcih makes life with the iPod, and to a lesser
extent, iTunes, a bit of a pain.

I don't really have the time to sit there and fix them in iTunes. Is
there an app out there that can fix tags easily?

I use the format

Artist - album - track - title

Yup, that is how I have mine done too.

and have written an Applescript to bulk generate all the relevant MP3 tags
from the filename, including setting a few additional tags to a default
value. Any help?

I'm playing with Perl at the moment to do the same thing (I will need to
do it on the wife's PC at some point as well so wanted it
cross-platform). Tell me - do you act directly on the MP3s in iTunes'
database, or do you duplicate them first and work on the copy?

Applescript works directly on the tags. Here's the latest version of the
script I use:




global search_for, replace_with

tell application "iTunes"
set this_playlist to view of front browser window
set this_playlist_name to name of this_playlist
set AppleScript's text item delimiters to " - "
set these_tracks to {}
set dd_tracks to "all tracks in \"" & this_playlist_name & "\""
with timeout of 30000 seconds
if selection of front browser window is not {} then
set these_tracks to selection of front browser window
set dd_tracks to "the selected tracks in \"" &
this_playlist_name & "\""
end if
end timeout

-- Only work with the MP3 song name tag
set my_choice to "Song Name"

-- set search string to look for the crappy quote character
set search_for to "`"

-- we want to replace it with the proper quote character
set replace_with to "'"

-- select entire playlist
if these_tracks is {} then
if my_choice is "Song Name" then
set these_tracks to (search this_playlist for search_for only
songs)
end if
end if

-- make life easier: faster access via a reference to
set these_tracks_ref to a reference to these_tracks

set fixed indexing to true
set at_least_one_found to false
with timeout of 30000 seconds

repeat with i from 1 to count of these_tracks_ref
set this_track to item i of my these_tracks_ref
set AppleScript's text item delimiters to ":"
get the location of this_track
set foo to result
set file_details to foo as string
log ("File: " & file_details)
copy the last text item of file_details as string to
track_details
log ("Track: " & track_details)

set AppleScript's text item delimiters to " - "
copy the first text item of track_details as string to
artist_name
log ("Artist: " & artist_name)
copy the second text item of track_details as string to
album_title
log ("Album: " & album_title)
copy the third text item of track_details as number to trackno
log ("Track: " & trackno)

set this_track's name to my srch_and_replace(this_track's name)
set this_track's artist to artist_name
set this_track's album to album_title
set this_track's track number to trackno
set this_track's genre to "Rock"

end repeat

end timeout
set fixed indexing to false
beep
end tell

to srch_and_replace(txt)
set txt2 to txt
considering case
set AppleScript's text item delimiters to search_for
set the item_list to every text item of txt2
set AppleScript's text item delimiters to replace_with
set txt2 to the item_list as string
set AppleScript's text item delimiters to ""
return txt2
end considering
end srch_and_replace

(Note: the 'search and replace' process was taken from "Doug's
Applescripts")

.



Relevant Pages

  • Re: fixing an MP3s ID3 tags
    ... Before iTunes I organised my MP3s in the way that many iPod haters seem ... Didn't bother with ID3 tags. ...
    (uk.comp.sys.mac)
  • Re: fixing an MP3s ID3 tags
    ... Before iTunes I organised my MP3s in the way that many iPod haters seem ... Didn't bother with ID3 tags. ...
    (uk.comp.sys.mac)
  • Re: fixing an MP3s ID3 tags
    ... Before iTunes I organised my MP3s in the way that many iPod haters seem ... Didn't bother with ID3 tags. ...
    (uk.comp.sys.mac)
  • Re: fixing an MP3s ID3 tags
    ... Before iTunes I organised my MP3s in the way that many iPod haters seem ... Didn't bother with ID3 tags. ...
    (uk.comp.sys.mac)
  • Re: The death of High Fidelity - SBC
    ... return to high fidelity once the iPod market has been saturated? ... MP3s themselves ... anything you buy from the iTunes ... Commericial mp3 encoders made by ...
    (rec.music.artists.springsteen)