I think it is safe to say that I don't cope too well with feature freezes. In order to stay motivated I have to have a few forward looking projects. These usually take the form of interesting git branches on my laptop that I hack on while way from civilization (Much of my most interesting code has been written in my parents small cabin in the woods where my wife and I often go to get away from it all a bit. While she reads I hack
In any case, back when we were getting ready to release Amarok 2.0.0, I ran a small series of blogs about some of the stuff I was working on for later releases. I decided that now was the time to continue with this.
Quite a few users have expressed that they would like the ability to play audio CD's back in Amarok 2. The reason that it was not initially ported was that none of the core developers use CD's much and also because CD playback in Amarok 1.4.x was sort of a hack, both with regards to the actual code, but also the way it was integrated into the user interface. recently, while discussing a possible Google Summer of Code project, which was unfortunately not accepted, I started thinking about the "right" way to do CD playback. And as I had a little time on my hands, I could not help myself but create a prototype. So here is what is currently possible on my laptop:
First off we start off Amarok. Notice the cool new collection headers that
Seb have created:
Inserting a CD into the drive, Amarok automatically detects it and uses the audiocd:/ KIO slave to get info if possible. These tracks can then be added to the Playlist like any other tracks (as the attentive reader will note there are a few issues with the track information still):
It is possible to mix these tracks and tracks from any other collection freely:
That is pretty cool I think. But wait, there is more. Since the audiocd:/ KIO slave is all about "ripping" CD's, why not add this feature to Amarok as well. But instead of using the "ripping" metaphor, lets just integrate it with the existing "copy to collection" framework. This not only avoids having a seperate gui and menu entries for this task, but also allows you to "rip" directly to media devices or other writable collections and not just the local collection:
After selecting a collection that the track should be copied to, its time to select a format ( advanced options for this can be set in the KIO slaves kcm module which is brought up by clicking on the "advanced" button:
And finally we use the target collections organize dialog to figure out where the tracks should actually go:
While this is all still at the prototype state ( It will
not be in Amarok 2.1.0 ) it already works quite well. There are a few issues left with the implementation itself and some deeper issues with the audiocd:/ slave that affects this, such as audiocd:/ not always detecting when the cd has changed and keeping the CDDB data from the last CD around. Aslo, making this work required some pretty invasive changes to some core parts of Amarok, so its is something that will need a lot of testing as it can potentially break Amarok in interesting ways that are not directly related to CD playback itself. So far it does not seem that I have messed anything up too badly though
For anyone really eager to break their Amarok, and not afraid to compile it from source, you can grab a patch that should apply against current trunk
here. While feedback is greatly appreciated, I will
not offer support for any issues you will have with this patch, so use at your own risk!