DanielW’s Blog

July 10, 2008

Real persistent playlists in Amarok with Nepomuk

Filed under: GSoC 2008 — Tags: , , , , — DanielW @ 10:34 pm

Again too long since my last blog post. For those who are new to my blog: I (DanielW in IRC) am the GSoC student working on bringing Nepomuk into Amarok.

So what has happend the last weeks? Amarok now writes statistics back to Nepomuk (playcount, last played date and so on). With the nepomuk search client and kio slave in playground you can search files for that (list for example all files played more than 10 times).

But what I really want to talk about are “real persistent playlists”:

Thanks to the new Filewatch service (already in svn (trunk and 4.1 branch))  Nepomuk can now track movements of files and update the metadata connected to them. (it uses KDirNotify and can only track file movements done from KDE applications).

I am using this in Amarok to have playlists which still work after renaming/moving files. This means you can:

  • create and store a playlist
  • close Amarok
  • move the files around/rename them
  • start Amarok and your playlist still works

Amarok also monitors changes to the data at runtime. I first planed to make a screenshot (without it, it is not real ;-) but you can not see it on a screenshot. So I made a screencast. Here it is (download in high quality (6 MB))

(sorry for poor Youtube quality, get the real one)

Now the technical part:

It works by creating and storing a uuid for every track used in Amarok. It then uses this uuid in the URL of the playlists. That works but is no perfect solution. In the long term (after SoC) I will have to create track (and album) resources (which link to the actual files) in Nepomuk. This will solve this without the uuid and bring other possibilities but also a lot of new problems.

You can try it out now (it is in svn of Amarok) but expect bugs and missing features.

And..

see you there

June 20, 2008

Dolphin and Amarok share ratings

Filed under: GSoC 2008 — Tags: , , , , — DanielW @ 1:06 am

First: Sorry, I planed to blog more often about my GSoC project. I don’t feel very good when blogging in english. But as Thiago “forced” us to blog here an update:

Let’s start with something to look at:

Screenshot Amarok und Dolphin

Isn’t it nice? Ratings from Dolphin in Amarok :-)

Yeah, you will be able to rate your songs in Dolphin and see the ratings in Amarok or vice versa. They share the same data in Nepomuk. (I will publish in Amarok Wiki which ontologies are used, so that you can make use of it in your scripts or applications.)

The collection you see there in the collection view uses the data from Nepomuk. (As my code can not scan collections yet it works directly on the information Strigi indexed.) I am quite happy about the performance. It is slower than the SQL collection but fast enough in most cases. But you shouldn’t try to add your complete collection to the playlist. On my collection (about 15k songs) it takes about 5 minutes. I am not sure if i can change that.

Also not working yet: Collection filtering and any writing of data back Nepomuk.

If you want to play around with it:

It is in normal Amarok 2 SVN and it will show up in Amarok automatically if you have Nepomuk enabled in KDE (System settings->advanced->Nepomuk). As it can not scan yet, you should have some music indexed from Strigi.

I recommend to use the Sesame2 backend for Soprano/Nepomuk (needs Java at build and runtime of Soprano). But it should work with Redland too. To test it is enough to only add your music directory to the Strigi index folder (also in the Nepomuk settings).
I hope that when I blog again, I will tell you that writing back to Nepomuk works. Will work on that in the next days.

Powered by WordPress