Planet Amarok
Amarok @ LinuxTag 2009, Berlin, Germany
GSoC status update – of proxies and maps
Hello again. In my introductory post I declared that I would post regular status updates about my Summer of Code work on Amarok’s playlist – and of course I’m already slacking off.
I started researching and coding towards the end of april so I have almost a month of work to report now. Unfortunately there are no pretty pictures this time because all the work has been under the hood so far.
As Amarok’s playlist uses a model-view paradigm, I have added a new proxy model between the filter proxy and the grouping proxy, so at the moment Amarok’s playlist view displays data that passes through a stack of four models (1 source model + 3 proxy models). GUI work will begin a bit later, at the moment the interface is just a combo box and a button that says “Sort!” which I use for testing. So what does it actually do right now? The good news is that multilevel sorting of the playlist kind of works: the user just has to hardcode a multilevel sorting scheme or select one of the available schemes from the combo box, click “Sort!” and the magic happens. Basically, the sorting scheme gets translated into a QList that maps all the source indexes to an ordered n-tuple, this QList is then used as a lookup table. The bad news is that sometimes the magic spell goes terribly wrong, as I still have to handle the consistency of the map when the playlist is already sorted and the user adds, moves or removes some tracks. All the time I put into studying algorithms at the university has finally paid off big time, and I’m being very careful about the efficiency of the code – in the present state the sort proxy stuff might crash Amarok from time to time, but at least when it works it’s quite fast
All this and hopefully much more should land in trunk some time after Amarok 2.1.1 gets released.
Hey roommate, heads up!
/me is looking for roommate during Akademy from 3rd to 12th July.
Or if someone is willing to sleep on the street with me, feel free to call me brother!
Hacking Amarok’s playlist into submission
Hello!
My name is Teo Mrnjavac and some of you might know me from my previous work on Amarok as a Summer of KDE student last year. Back then I implemented an interface for defining layouts by drag’n'dropping, which has been used for extracting tags, organizing the collection, defining playlist item layouts and also in Kopete for configuring contact list items as I’ve heard.
This year my Google Summer of Code proposal has been accepted and with the help of my mentor Nikolaj Hald Nielsen I’m embarking on a mission to make Amarok’s playlist the awesomest playlist ever.
The full title of the project as submitted is “Finish the playlist: multilevel playlist sorting with configuration interface”, which means that I’ll mostly be working on implementing multilevel sorting, plus some other related fixes.
The current implementation of the playlist view in Amarok has become much more configurable recently, allowing the user to customize the format of each item by dragging around tokens that represent the fields of the track’s metadata. However, there’s still no way to sort these items according to the content of the fields, forcing the user to move around the items manually to achieve the desired effect. This can be tedious and impractical even on small playlists.
A playlist is a list, and a user expects a list to be sortable. In this case, simple single level sorting just wouldn’t suffice: Amarok’s playlist is much more than a bunch of lines of text.
To reach feature-completeness with the Amarok 1.4 playlist, and to conquer an important milestone on Amarok’s road to eternal awesomeness, a nifty interface is needed to sort the tracks.
So during this GSoC season I plan to deliver multilevel sorting for the playlist, an interface to configure it and configurable grouping.
If all this was TL;DR (it would probably be for me), here’s a nice mockup of a possible multilevel sorting interface that shows off my mad Kolourpaint skills. Notice the thin multilevel sorting bar under the playlist search bar. It’s simple as that, the user would click the “+” to add the next sorting level through a menu.
At the end of my GSoC work the playlist would be considered feature complete.
Last year I was a very lazy blogger and now I would like to change that so I guess you can expect regular progress reports. I have been informed that failure to comply with the blogging requirements about my work this year will result in me feeling the Amarok community manager’s Long Pointy Stick Of Doooooooooooooooooooom (TM).
Cheers!
Hello world!
Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
Not Holding Breath for Chrome
So yesterday I knew two things: Chrome was going to be crossplatform and the 30pg+ comic that went into some detail didn't say how they were planning to do that or anything about their UI toolkit.
So after poking at the code for a bit, it comes to no great surprise that crossplatform wasn't a big concern from the start. Currently the Linux version doesn't actually run, according to its website. And their UI toolkit choices might indeed have been based on some NIHism and are certainly not the most Linux or OS X friendly. Given how easy it is to create a crossplatform app if you make the correct early decisions, this is a bit frustrating.
They use Skia, a graphics library for Android for basic image display. And they have "Chromium Views" which mostly seem to be used to abstract between XP and Vista. It could theoretically be extended and used for crossplatform abstraction (just what the world needs - another xplatform api).
And why not Qt? "Existing UI toolkits for Windows are similarly unsatisfying, with limited widget sets, unnatural aesthetics, or awkward programming models. " Doesn't jive with my experience of Qt. But I guess I'm a bit partisan.
I do think that promising cross-platform support might have been a bit disingenuous of them, time will tell for sure. I suspect that if Linux desktop users do see Chrome, it will most likely be in the form of existing browsers incorporating some of their technology or ideas.
QtScript Bindings and some blog
QtScript Bindings
If you've been following Peter Zhou's blogs, you know that he has been implementing QtScript support for Amarok. Probably the neatest thing we did is give access to almost the entire Qt API via the QtScript Binding Generator from Trolltech Labs. It uses technology from QtJambi; if you have Qt 4.4.1 and were wondering why Amarok gives a bunch of MetaJavaBuilder errors, this is why. (The bindings are disabled for Qt 4.4.0; we'll bump the Amarok dependency once 4.4.1 is more widespread).
I do think that the QtScript API is probably the most difficult Qt API to get the details right on. Your mind swirls with QScriptValue, QObjects and QVariants. But it is also quite powerful.
Since I had been sending the generators creator Kent Hanson emails regularly, I thought a mailing list would be a good idea to make it more public and useful. Join qtscript-bindings for discussion on the QtScript bindings in general. Kent also created a bug tracker and a Git repo. I created a mirror of it on repo.or.cz and posted the changes we've made to our SVN copy.
The beginnings of documentation for Amarok scripting are available and Richard Moore started a general Techbase article.
Console and Unnamed HTTP Server
The first script I created was an "irb" for Amarok's QtScript environment. This is available with Amarok SVN now, the "Amarok Script Console." It's quite handy to test out QtScript or to even test out the Qt API.
I've been working on a web control application for Amarok 2 using the new API. Using QTcpServer and QHttp, I have created a web server that should work well enough for what I'm doing. Now all that's left is the "little detail" of the HTML interface; I've been tinkering with qooxdoo, a very fancy JavaScript API.
One of my first sizable Amarok-related developments was to create the first kde-apps Amarok script in 2004 using Korundrum. So now its full circle.
Some Blog
The google news catcher sent me an indirect link to this Time-Warner blog: 3 Linux Apps That Make Me Hate Windows. He cites Synaptic, Compiz and Amarok. As much as you hear people gripe about package management on Linux, I really do think its one of its best features. Certainly from a security standpoint: going to a random web site and installing software just isn't something You Do on Linux, and I think thats for the best. And of course, it goes without saying that I agree Amarok is the best media player.
Everyone have fun at aKademy!
amarok.kde.org/blog users: update your feed catcher
Add this feed if you want to follow the blogs of Amarok developers:
http://amarok.kde.org/planet.xml
New Belgian Beers
It would also be very ironic and funny, which is mostly why I hope the deal will go through.
The article notes that "The takeover attempt has also run into a political backlash, as Anheuser-Busch, based in St. Louis, is an American icon. Senator Claire McCaskill, Democrat of Missouri, has vowed to stop the deal." Which got me thinking: I would personally find it hilarious if people in Belgium started rallying against this deal due to the damage to their national pride from having their corporations promote products like Bud Light. Any Belgian folks out there feel like writing their MPs?




