Tuesday, June 17. 2008GSoC Report Week 3: TanstaaflProject: MP3tunes + Amarok IntegrationTotal Commits: 51 Weekly Commits: 12 Past 7 DaysIt was another productive week in #amarok with over 150 commits! In the 12 of those that were mine I managed to do several things.
Of course, implementing those items wasn’t as simple as it sounds, but the features are essential and basic. The search box (filtering) could use some improvement as currently it only filters via the artist field, but that is a limitation of the MP3tunes API. When I say it Interjection: Major props to my GSoC mentor, Nikolaj, for attempting to explain various parts of Amarok’s innards to me, not only once, but the several times it took to get the concepts through my thick skull. Also, he’s helped me track down several childish mistakes I’ve made when I was at my wits end trying to locate them. I can’t thank him enough. Hands down he’s the best GSoC mentor. With the addition of “Copy to Collection” Amarok has taken a large step towards being fully integrated with MP3tunes. Up till this week all you could do was browse and stream your MP3tunes Locker. That is fine and dandy, but you could do that from the MP3tunes web player, their mobile player, your PS3, or any other number of their supported devices. However, none of those options allow you to seamlessly download and organize your stored music into your local music collection at the click of a button. There is one shortcoming that needs to be addressed at some point before I’m satisfied: there is no progress indicator of any kind when you download tracks. The only way to see if tracks are being downloaded after you press Go is to watch the destination directory for changes. Thankfully this affects all collections you can “copy to/from”, not just MP3tunes, so perhaps someone else will feel inclined to whip up a progress indicator. There’s no such thing as a free lunch. Upcoming 7 Days:I have one big goal this week:
By Monday next week, you will be able to do Copy tracks from your local collection, Ampache collection, and the Magnatune database, to your MP3tunes locker.
There is quite a bit of work to be done before this can happen, but I will spare you the gritty implementation details until next week after I’ve committed the code where my mouth is (?). Of course my weekly predictions wouldn’t be complete without a task to fall back on if I happen to complete the aforementioned task in a Ballmer-Fueled rage. After upload is in place there is only one major item left: Syncing. I need to break “Syncing” into manageable actionables (quite a term, eh?) and then lay out some mid-level designs for the process. Later on during the week I will dedicate an entire post to this topic. Tuesday, June 10. 2008
GSoC Report Week 2: libmp3tunes goodness Posted by Casey Link
in ramblurr at
16:31
Comments (0) Trackbacks (0) GSoC Report Week 2: libmp3tunes goodnessProject: MP3tunes + Amarok IntegrationTotal Commits: 35 Weekly Commits: 15 Past 7 DaysThis was a busy week. I migrated the existing MP3tunes service in Amarok 2 from making REST calls and parsing XML manually to use libmp3tunes. I created an object oriented encapsulation framework in C++ for libmp3tunes, which is written entirely in c. This means instead of mucking about crafting http queries and worrying about parsing data from XML one can manipulate the Locker in an OO fasion. Here’s a little snippet of how libmp3tunes saves work. Without libmp3tunes if you wanted to fetch a list of artists this is what it would look like:
With libmp3tunes it looks like this:
Both of those code samples produce this:
Notice that instead of looping through XML and ripping out data, I was able to call getter methods to retrieve the same data. Of course the XML parsing has only been moved to libmp3tunes, but by hiding the MP3tunes API implementation from Amarok it creates more maintainable code. If none of that made much sense, no worries, the important bit to grasp is that libmp3tunes does these important things:
Upcoming 7 Days:There are a few libmp3tunes shortcomings. One is the lack of a means to detect when a session has expired. Each MP3tunes API request requires a valid session (except of course the initial session-establishing request), and each session times out eventually. When using MP3tunes in Amarok it will be important to elegantly handle session timeouts, for the user does not care about sessions or timeouts. When the user clicks play on an artist they expect it to play, while currently, if the session has timed out Amarok doesn’t do anything. This week I will patch libmp3tunes to support detection of timed out sessions. Another goal for this week is to fix the search box, so it actually searches.
Also, if you right click on an artist in the MP3tunes collection browser you get a “Copy to Collection” option. At the moment it doesn’t do anything. After this week is over, hopefully, selecting the “Copy to Collection” option will let you do just that.
Foreseeable Roadblocks:Last week’s roadblock still stands. In the next few weeks I’ll be getting closer to the time when I will need to implement that syncing part of libmp3tunes into Amarok. The licensing issue won’t stop me from developing it on my own workstation of course, but it will have to be resolved before I can commit that part of library or code that implements it. Monday, June 2. 2008GSoC Report - Week 1Project: MP3tunes + Amarok IntegrationPrescriptum: These weekly reports will likely contain a bit of technical information that only other Amarok developers will understand. I do not like that idea, as I want these reports to be grokable by all, but since I haven’t yet decided on a format to present the info in a manner I like this will have to do for this first week. Past 7 Days:I started coding for GSoC last Tuesday (May 27th) beginning with a simplification of the ServiceCollection hierarchy by combining ServiceDynamicCollection and ServiceCollection into one class. I also started creating the ServiceCollectionLocation’s. It is not implemented anywhere yet, and won’t need to be for awhile, but I started it as at the time I was waiting on mp3tunes to deliver their c sdk. Leeo kindly created mp3tunes icons, which I committed on Saturday. During the week I kept nudging the mp3tunes developers to send me the c sdk, and Saturday the nudging paid off as I received a pre-release version of libmp3tunes. Even though it is a pre-release it is complete enough to match the current mp3tunes feature set in Amarok2. On Sunday I added libmp3tunes to the src tree, including the dependency detection. libmp3tunes is dependent on curl and libxml2, and if someone does not have them mp3tunes will be excluded from the build thanks to cmake. Finally, today, I committed a ~750 line c++ wrapper for libmp3tunes to compartmentalize the unsightly c code. You can see all my commits here: Upcoming 7 Days:There are still a few functions left TODO in the c++ wrapper for libmp3tunes, so I’ll complete those this week. Then I plan to start migrating the existing service to use the library functions. I expect this will take all week, so my goal for the next report is to have the migration complete and a working Mp3tunes service utilizing the library. If my time estimation ends up being too long, and I finish the migration early, I’ll work on the Mp3tunesCollectionLocation functionality so you can copy tracks from Mp3tunes to the local collection in a manner similar to the Magantune service.
Reflections:I am amazed at how much I learned this week. To keep this brief here is a list of some things I’ve learned:
Sunday, April 6. 2008
Google Summer of Code: One Intro ... Posted by Casey Link
in ramblurr at
02:00
Comments (0) Trackbacks (0) Google Summer of Code: One Intro With a Side Order of AwesomeHuzzah! Google announced the list of 1125 fortunate students that will be developing for Google’s Summer of Code program. I?m a member of this group, which means I will be writing code for an open source project and getting paid for it! I was asked by my community mentor to write an introduction that was posted at various places, and I will re post it below.
In case anyone is interested I’ve posted my original project proposal that was a part of my GSoC application. |
Amarok LinksCalendar
QuicksearchArchivesCategoriesSyndicate This BlogBlog Administration |
|||||||||||||||||||||||||||||||||||||||||||||||||||||

