Hi.
I’m trying to get the Track number of a MP3/AAC from Finder. As suggest in this discussion http://bbs.applescript.net/viewtopic.php?id=20177
right command is “mdls” (in addiction of command “grep”).
But the result of spotlight index of a MP3 is this one
And I can’t see any report of track number (Steve, it’s time to Work!!!)
So, I’ve tried to use iTunes
repeat with this_item in these_items
tell application "iTunes" to set item_Track to track number of this_item
end repeat
But AS says me “Are you crazy?”
Important!
I don’t want to add track to iTunes library for get track number.
No kel, all tags are OK (track number of “Play 05.mp3” is 5).
I need to get track number of this audio file without iTunes, or without add MP3 on iTunes library.
With “mdls” command (spotlight) I can get title, author, time and some others tags, but not track number, that is very important for very audio lovers.
I’ve tried to open an MP3 file with BBEdit (BBEdit open everything as a text file) and in the middle i’ve find “TRCK 5/15”). So, I suppose that those information are inside the file and not on the resource fork of file.
I see. So what you are saying is that the track number info is in the id3 tag, but it doesn’t show with mdls. I think I have an mp3 an will try to look at the id3 tag.
Edited: darn, I just remembered that I don’t have mdls, because I don’t have Spotlight.
Track # along with a few other setttings are not considered the files true metadata and as such mdls will not display this. If you don’t want to use iTunes you are going to need to install and use a 3rd party tool like mplayer & lame or the darwin port of id3. These are all free btw.
If thats not an option you could I guess crack open each file and look for that setting as you suggested, but I imagine that would take an obnoxiously long time.