mackstann / mpris-remote

command line tool for interacting with music players that support the mpris spec
http://incise.org/mpris-remote.html
25 stars 10 forks source link

update to MPRIS2 #1

Open alsuren opened 13 years ago

alsuren commented 13 years ago

Some players are starting to come out which only support MPRIS2. Currently, mpris-remote prints "No MPRIS-compliant player found running." in this case.

mackstann commented 13 years ago

Thanks; this is a good idea. I haven't been paying much attention to what's going on with MPRIS these days and didn't realize version 2 was finalized and in the wild yet.

I have some interest in implementing the new spec myself, but I have a lot of projects going on and I admit that this one is not a high priority for me right now. So if anyone else has interest in doing it, you have my encouragement.

alsuren commented 13 years ago

Okay, so I got bored on the train up to edinburgh and implemented this. Annoyingly I couldn't clone your upstream repo at the time, so I had to just copy the python file from the debian packages and put that in a new git repo

I have 15 mins free internet so I've cloned now. Will rebase and push to my repo when I get home.

alsuren commented 13 years ago

Pushed. You can pick it up at git@github.com:alsuren/mpris-remote.git and cherry-pick whichever patches you want (I didn't really take the time to understand your code or the spec before I started hacking, and I've only tested against spotify and kaffeine, so if I've missed the point of something then tell me)

Also: I don't think that I have the ability to disclaim copyright in the UK, so if you could change the license to http://en.wikipedia.org/wiki/WTFPL or something, before you merge, then that would be great.

mackstann commented 13 years ago

Hey, thanks for doing this. I'll start digging through your changes.

Regarding licensing: how about CC0? http://creativecommons.org/publicdomain/zero/1.0/

Due to the issue you mention of PD not being legally valid in many places, I've been sort of standardizing my personal projects on CC0 lately. Seems more legally robust than WTFPL. It puts the work into the public domain in countries where that is valid, and in countries where it's not valid, the work is simply released with no restrictions whatsoever.

alsuren commented 13 years ago

CC0 sounds good.

Note that I wasn't going for perfection in my modifications, so I won't be offended if you tell me to rewrite bits of it. :)

mackstann commented 13 years ago

I've re-implemented your refactoring to remove global state. It was a good idea and will allow unit tests to be implemented. It also helped me re-acquaint myself with the code. This of course makes it unlikely that any of the changes after that will merge trivially, but I don't mind going through them manually. I haven't really evaluated the MPRIS2-related changes yet, but I'll get there.