Wrappers for MP3 CDs in iTunes? 36
Nikopol asks: "iTunes is very good at dealing with MP3 CDs made by itself, but MP3 CDs made with other software (in this particular case, HP MyCD on a Win 98 computer) aren't recognized at all. The ability to make an MP3 CD available as a source in iTunes is due to an XML file iTunes puts on each MP3 CD it burns. Other MP3 CDs, lacking such file (in fact, I think this file is on a separate HFS+ partition), are bound to appear in ISO9660 form on the desktop...and those MP3 are then bound to be permanently stacked in the main iTunes library, thus voiding much of iTunes Dynamic Playlists usefulness. Is it possible, via a plugin or some trickery, to generate such XML file that would allow iTunes to see any MP3 CD as a source? In fact, such trickery would ideally be applicable not only to MP3 CDs, but to networked drives or folders too! (I know, I know...Rendezvous...but it isn't implemented widely yet!)"
Auto-Run (Score:5, Informative)
What do you mean they aren't recognized? I do this all the time and I've never had trouble. iTunes doesn't recognize it automatically when you put the disk in. So you do have to drag and drop the directories. Make sure under preferences you've not selected to copy the files to your iTunes directory automatically. They should play fine.
OSX doesn't "autoplay" CDs. This has been discussed many times. I personally see this as a good thing, given all the problems its caused me under Windows. I suspect if you wish you could create an Applescript to play the files in iTunes when a disk is mounted. I'm not sure how one would do this though. The CD preference pane allows you to run an Applescript when a Music CD is mounted, but I don't think that MP3 CDs count since they are basically just data disks. Probably what you'd want to do is attach an Applescript to the /Vol directory. You'll need to be administrator to do this.
Burn a CDRW (Score:4, Informative)
If you want to take it a step further, you can do what I did. I burned a MP3 CDRW with the songs I wanted and then looked at the resulting ContentsDB.xml file on the new CD. Then I took that file and edited it to match the file layout I wanted on my target CD, since I didn't want the default layout that iTunes creates. If you needed to do this a lot, I'm sure a perl script to automate it would be pretty easy to whip up.
Like I said, certainly not an ideal solution. Unfortunately I don't know of any way to do this without creating a second CD, but maybe someone else can come up with something better. Or maybe this will help someone think of a better idea.
Re:HP MyCD (Score:4, Informative)
Re:Auto-Run (Score:3, Informative)
> I suspect if you wish you could create an Applescript to play the files in iTunes when a disk is mounted.
That's not true, at least on 10.2.
1. Look into System Preferences, click on CD/DVD icon.
2. Set a preference for "When you insert a music CD" to "Open iTunes".
3. Open iTunes, then open Preferences.
4. Set a preference for "On CD Insert" to "Begin Playing".
One flaw: when you insert a CD while iTunes is NOT launched yet, then it doesn't autoplay - iTunes is launched AFTER the CD is considered to be "inserted", so when iTunes launches the CD is already present and mounted.
But any consecutive CD inserted autoplays well.
Re:Auto-Run (Score:4, Informative)
That's why I said you may wish to tie an Applescript to Vol. I don't know if OSX allows you to attach a script to the Volume directory. But you can attach them to other directories such that they run when the contents change.
In this case you'd have an Applescript that might "buffer" the MP3's or just tell iTunes to play them.
That's all that iTunes is doing with the XML file they write to the data disk. It expects the XML file in a certain place and it contains the paths of the MP3s to play. In this case you are just emulating that functionality with a folder script.
Oh, when I was discussing "auto-play" I was talking about how under Windows even data CDs can exectue a script. This is why when you put in a CD it will often open up a window. Besides being a security nightmare this can be annoying. Apple allows you to autorun specific programs or scripts for PhotoCDs, Music CDs, and video DVDs. It *won't* do it for anything else.
invisible file (Score:4, Informative)
Re:Auto-Run (Score:3, Informative)
As for what I was speaking of, music CDs are the ones you buy from the store. They are in a custom format and aren't data files of the sort you are used to. OSX "fakes" a directory structure and information and makes it appear it is a regular volume. Further the CD pref pane allows you to take actions when you put the disk in your computer.
A MP3 music CD though is stored in a format different from the music CDs you buy at your local music store. They are stored in the same format that you might store a bunch of word processing documents on a CD with. The only difference is that the disk is filled with MP3 files. Now if iTunes writes a MP3 disk, it writes the MP3s and a bit of information that it can use to "fake it" so that the disk seems like a regular music CD - only one that holds many more songs. In reality though it is just a regular data CD.
The problem, as I understand it, is that music MP3 CDs of this sort made under Linux or XP aren't autoplayed by iTunes they way it autoplays a regular music CD. That's because that extra information it uses to "fake" a CD isn't present. So the person asking the question was asking how to emulate that feature.
As I mentioned above, the CD preference pane won't help because to the Finder it is a data-CD and not a music CD. There are two ways to do this. Either figure out the XML file iTunes writes and get your PC software to write it. (Unlikely). The other is to have an Applescript do all the work.
To do this you use Folder Actions. [apple.com] The folder in question is /Volumes, a normally invisible directory. This is the directory that OSX mounts all external file systems, such as external hard drives, network shares, and CDs. It then uses it to create those icons of disks on your desktop.
When you associate a folder action with that directory you can have an Applescript that does something whenever disks are mounted. In our case that might be to recursively scan the directory and send all MP3s to iTunes. What is nice (or not nice, depending upon how you look at it) is that you can do this for network sounds as well.
Folder Actions are one of the nicer features of OSX - although strangely one of the lesser known. You can do things like have it email files you drop in a particular directory. Its very nice. Combining it with Unix directories is very powerful.
Hope that helps. . .
AppleScript (Score:3, Informative)
Re:Auto-Run (Score:4, Informative)
If you hold down the option key while dragging the music to iTunes, it will do the opposite of what this preference is set to do. In other words, if by default, dragged music is copied to the iTunes folder, it will not get copied if the option key is held during the drag.
Networked playlists were possible for a short time (Score:3, Informative)
Re:Auto-Run (Score:1, Informative)
hdiutil internet-enable -yes [path to DMG]
the 'self-destruct' only works once though. so if after copying the files and disposing of itself in the trash you drag the disk image back out and open it again, it will not copy the files and dispose of itself again unless you set it from the command line. similarly, to disable it you run:
hdiutil internet-enable -no [path to DMG]
from the command line.
Re:slight tangent but still.... (Score:3, Informative)
The bad news is it is a German applescript. The name of it is "Audio brennen mit Text." I believe I found it on Versiontracker. It is a read only script so I'm not sure exactly what it is doing behind the scenes (I have used it enough to know it doesn't appear to be doing anything malicious), but it always get the same error when i run it...that is to say, it does what it should (sets up toast with the itunes playlist in order) and then throws up an error alert that i just dismiss.
I haven't searched for it lately, maybe there is finally an English version out with all bugs squashed.
Hope this helps.
here's how to do it from the shell (Score:3, Informative)
I'm not sure what the XML file contains, since I don't have a CD burner on my iBook, but assuming you can generate the file, here's what you can do to make it sit side by side with the contents of the CD, without copying the CD to your hard drive.
When you want to eject the CD, you'll have to unmount it and eject from the command line; it's not under control of Disk Arbitration anymore, so your regular eject button won't (in my experience) work.