It’s been more than a month since my last GSoC status update. I wanted to blog more often, but unfortunately I had nothing shiny to show, all the work I’ve done was under the hood, mostly on implementing multilevel sorting and refactoring the playlist code. The refactor is what took most of the time and it’s still not finished. Basically what I’ve been doing is converting one kind of italian pasta into another, spaghetti code into lasagna code. So a couple of new classes have popped up to enforce a consistent interface for all the playlist proxies and to share code, and I’ve been trying to make every proxy talk only to the proxy directly below it.
In pseudo-UML, this is the situation I’m trying to achieve, the arrow means “is-a” and the arrowless line means “has-a” or generally “talks-to”:
I’m almost there, but right now, even if the tracks are displayed sorted, they are played in the original order which makes no sense, so the next step is to make the code that handles progress through the playlist (navigators) talk to the topmost proxy (GroupingProxy). Also, a new proxy might pop up soon to cleanly handle searching, which is a pretty different concept vs. filtering that just happens to share the same GUI.
Anyway, as a refreshing break from the Playlist::*Proxy heavy lifting, I hacked together a new testing interface for multilevel playlist sorting:
Disclaimer: I’m aware that it’s ugly as hell, and that it doesn’t allow to sort by inverse alphabetic order, it’s just a temporary GUI for everyone to play with and test the sorting functionality. I’m still a few weeks away from starting work on the real thing, which I plan to implement as a breadcrumb-like widget.