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

13 Comments »

  1. Very cool! I’m really forward to amarok 2 and what deeper integration with nepomuk everywhere will bring.

    Comment by IAnjo — July 11, 2008 @ 12:04 am

  2. This is beautiful, and a great example of what’s coming in future KDE with nepomuk…. I hope that one day the nepomuk collection will replace the normal one, as it drops yet another chunk of amarok code that would otherwise have to be independently maintained (the scanner)

    Cheers, and thanks for the good work.

    Comment by Troy Unrau — July 11, 2008 @ 12:18 am

  3. Amazing, this is innovation! :)
    Keep on rocking ;)

    Comment by kleverness — July 11, 2008 @ 6:06 am

  4. This takes care of my #1 complaint with most media players.

    Does it update the media library as well, or just the playlists?

    Comment by tbocek — July 11, 2008 @ 6:59 am

  5. I really hope the digicam devs watch this. Imagine what can be done to your collection of pics if it doesn’t get lost when files are moved.

    This really is incredible and a huge step forward.

    Comment by axel — July 11, 2008 @ 7:48 am

  6. Wow wow wow. I’m stunned to see this. What a magnificent piece of integration :)

    Comment by Diederik van der Boor — July 11, 2008 @ 8:59 am

  7. Good stuff.

    But arrg! knotify! inotify! Don’t we all wish there were filesystem-level persistent shortcuts so we could end this file-watching nonsense. it’s not difficult to imagine a mechanism that would make it possible but I don’t know whether any filesystem includes or is planning to include such a feature. And KDE being not only multi-filesystem but multi platform is not going to be able to rely on such a feature in the foreseeable future.

    Comment by maninalift — July 11, 2008 @ 12:38 pm

  8. Really nice work. :)

    Comment by Sebastian Trüg — July 11, 2008 @ 2:30 pm

  9. tbocek:

    It also works with the media library (you saw it in the video, not only the playlist was still working but its informationen (playcount, rating) was still there).

    And yes that also means: You can move the files and then add them from the collection browser.

    maninalift:

    Yes, would be nice to have something better there. Sebastian Trüg first planed to use INotify for the filewatch service of Nepomuk. That would have the advance that all file movements not only the one done from KDE could be tracked. But when you have a lot of files and directorys it would use all INotify handels of the system and so causig trouble with other applications which need it.

    Comment by DanielW — July 11, 2008 @ 5:16 pm

  10. great job, im not a dev, so only 1 question:

    when you rated a song with dolphin, this is updated in amarok, can make a library or something to share this feature with others apps, like digikam, kaffeine ??

    Comment by rudoolph — July 11, 2008 @ 6:05 pm

  11. @maninalift

    BeOS and his Be File System was able to track file changes using integrated database, since BFS is itself a Database Filesystem.

    Just ignored by the masses, what a shame.

    Comment by Davide Taini — July 13, 2008 @ 9:18 pm

  12. @Davide Taini:

    Ah yes! Right you are. I had been intending to play with Haiku for some time. I think that the way the web behaves these days means that people are beginning to expect their filesystem to behave more like a database.

    I don’t know anything about filesystems but it would be so nice if there could be some sort of an elegant cross-platform solution to this. Share the metadata brothers!

    Comment by maninalift — July 14, 2008 @ 3:32 pm

  13. Hi, I found your blog on this new directory of WordPress Blogs at blackhatbootcamp.com/listofwordpressblogs. I dont know how your blog came up, must have been a typo, i duno. Anyways, I just clicked it and here I am. Your blog looks good. Have a nice day. James.

    Comment by James — September 18, 2008 @ 7:03 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress