Ticket #3946 (new enhancement)

Opened 4 months ago

Last modified 11 days ago

[PATCH] MPD support

Reported by: Florob Owned by: asterix
Priority: normal Milestone:
Component: None Version: svn
Severity: normal Keywords:
Cc: OS: All

Description

This patch adds support for getting information from MPD for send User Tune.

Attachments

mpd.diff (3.2 kB) - added by Florob 4 months ago.
mpdv2.diff (3.1 kB) - added by Florob 8 days ago.

Change History

Changed 4 months ago by Florob

  Changed 4 months ago by asterix

hmm isn't there a way to get that info without pooling? doesn't MDP send a dbus message or something else when they change status?

  Changed 4 months ago by Florob

Unfortunately not. MPD currently only speaks it's own protocol and doesn't support dbus. And this protocol (or at least that's what I was told) unfortunately relies on polling.

  Changed 4 months ago by asterix

that's sad ... but at least your patch seems to start pooling only when player is running right?

  Changed 4 months ago by anonymous

Yes, trying to connect to the server (or python-mpd not being present) should raise an exception if there is not MPD running, so the code will jump to the except-block before polling is started.

  Changed 4 months ago by Florob

The above (obviously) was me while login wasn't possible.

I'm attaching a updated version that handles pausing/stopping correctly (I only now noticed it was broken). I don't know if your considering this patch for inclusion (I understand that code using polling isn't really nice to have), but for now I just want to get this public in case someone else wants to use it. There still is a bug causing it to not work any more if you haven't played any music for an extended period of time. This is a bit difficult to debug for obvious reasons. If you see anything suspicious in the code I'd be thankful for any help.

follow-up: ↓ 7   Changed 7 weeks ago by js

Doing an except with no error specified is bad IMO.

in reply to: ↑ 6   Changed 7 weeks ago by anonymous

Replying to js:

Doing an except with no error specified is bad IMO.

Noted. But for now I don't really care. This won't go upstream and I'll probably rewrite it as a plugin once that's possible anyway.

  Changed 11 days ago by anonymous

isn't this a duplicate of #3767 ?

Changed 8 days ago by Florob

Add/Change #3946 ([PATCH] MPD support)

Author



Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change. Next status will be 'new'
The owner will change to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.