Giter VIP home page Giter VIP logo

Comments (9)

jodal avatar jodal commented on May 25, 2024

Our current design doesn't make it straight forward to implement 'idle' support. Though, we do have plans for some changes -- needed by e.g. the upcoming MPRIS and HTTP frontends -- that will make implementation of 'idle' easier.

Short answer: yes, but not right away.

As you can see at http://www.mopidy.com/docs/master/clients/mpd/, the only client we've tested that depends on 'idle' working is ncmpc. If you know of any other popular clients that doesn't work without 'idle', please tell us, and we'll update the client compatability list.

from mopidy.

lzoubek avatar lzoubek commented on May 25, 2024

Thanks,
I understand, I saw your documentation, I hoped if I push it a little it might go :-) currently I am developing IDLE-based client.

Looking forward using your API with my client :-)

from mopidy.

jodal avatar jodal commented on May 25, 2024

MPD client for XBMC? Shiny! We sure want Mopidy to work with that one ;-)

I'll leave this issue open as a friendly reminder to myself.

from mopidy.

jodal avatar jodal commented on May 25, 2024

For future reference:

The XBMC forum thread on this: http://forum.xbmc.org/showthread.php?t=79526

from mopidy.

rkh avatar rkh commented on May 25, 2024

any news on this?

from mopidy.

jodal avatar jodal commented on May 25, 2024

I'm working on some internal reorganization in Mopidy, which in turn will allow for giving the MPD protocol implementation access to the MPD client session. When this is in place, idle will be possible to implement.

from mopidy.

adamcik avatar adamcik commented on May 25, 2024

With the glib-loop branch in place (but not merged yet) I started doing some research against MPD to try and figure out the idle behavior. The following output is the subsystems that are triggered for each comment, with notes clarifying which playbacks state each applies to. I have a rather ugly script that I have hacked together to quickly get this data.

{'add': set(['playlist']),
 'addid': set(['playlist']),
 'clear': set(['player', 'playlist']), # player only when in playing state
 'consume': set(['options']),
 'crossfade': set(['options']),
 'delete': set(['player', 'playlist']), # player only when in playing state
 'deleteid': set(['player', 'playlist']), # player only when in playing state
 'disableoutput': set(['output']),
 'enableoutput': set(['output']),
 'load': set(['playlist']),
 'move': set(['playlist']),
 'moveid': set(['playlist']),
 'play': set(['player')]), # only when stopped
 'next': set(['player']), # only when in playing or paused state
 'pause': set(['player']), # only when in playing or paused state
 'playid': set(['player']),
 'playlistadd': set(['stored_playlist']),
 'playlistclear': set(['stored_playlist']),
 'playlistdelete': set(['stored_playlist']),
 'playlistmove': set(['stored_playlist']),
 'previous': set(['player']), # only when in playing or paused state
 'random': set(['options']),
 'rename': set(['stored_playlist']),
 'rm': set(['stored_playlist']),
 'save': set(['stored_playlist']),
 'seek': set(['player']),
 'seekid': set(['player']),
 'shuffle': set(['playlist']),
 'single': set(['options']),
 'stop': set(['player']), # only when in playing or paused state
 'swap': set(['playlist']),
 'swapid': set(['playlist'])}

Other things to note about behavior is that as soon as a client connects MPD starts tracking all subsystems for this client. By this I mean that if client 1 connects first, then client 2, client 2 starts playback and then client 1 does an idle call the result will be that client on gets a player subsystem changed response right away. This despite the player change happening before the idle call was invoked. This exact detail could probably be overlooked if we choose to.

As for the actual implementation of this, I would prefer that as little as possible of the code to support this leak out of mopidy.frontends.mpd. To achieve this I propose that the dispatcher broadcast subsystems to all active MpdSession actors in the same way that info is send to frontends. Then the MpdSession and/or MpdDispatcher belonging to that session should know if changed responses should be written to the client.

from mopidy.

jodal avatar jodal commented on May 25, 2024

Sounds like a good plan.

I have some upcoming ideas/commits on the MPRIS branch which takes the started_playing/stopped_playing events currently sent by the backend to the frontends (thus far only consumed by the Last.fm scrobbler) a bit further and adds more events, as needed by the MPRIS frontend. I believe this should be solved in approximately the same way. Hope to push the code during this weekend.

from mopidy.

jodal avatar jodal commented on May 25, 2024

Support for idle in Mopidy's MPD frontend have been merged with pull request #125. It will be in the 0.6 release.

from mopidy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.