Mopidy Discourse

Mopidy-MPD is using an older version of mpd than my command line mpd

Hello there! I’m on macOS Catalina using Mopidy-MPD and when attempting to connect to my mpd server using python-mp2, it’s showing that it’s running version 0.19.0. If I run mpd -V it returns version 0.22.3. Is there a way to make Mopidy-MPD use this newer version?

Mopidy-MPD allows you to use MPD clients with Mopidy, not mpd. The version of the MPD protocol Mopidy-MPD supports is 0.19.0 (ish). Mopidy and mpd are entirely different programs that provide similar functionality, you wouldn’t normally want them both installed.

1 Like

Ah i see, i probably had mpd installed previously. Mopidy is working fine I just wanted to get the duration functionality introduced in mpd 0.20.0. Are there any workarounds for that? Not sure if this is the place to ask since I’m using python-mpd2. Should I use the mopidy.mpd module instead?

What’s the duration functionality? We don’t have an MPD client library, python-mpd2 is the way to go.

python-mpd2 has documentation for duration and elapsed when calling client.status(). It says that duration was added in 0.20.0 but I assumed since the version of mopidy’s protocol is 0.19 it didn’t include it. This is an example of the current response from status()

{
    'volume': '100',
    'repeat': '0',
    'random': '1',
    'single': '0',
    'consume': '0',
    'playlist': '14',
    'playlistlength': '95',
    'xfade': '0',
    'state': 'play',
    'song': '53',
    'songid': '54',
    'nextsong': '38',
    'nextsongid': '39',
    'time': '13:194',
    'elapsed': '13.699',
    'bitrate': '320'
}

I see. It should be easy for someone to add the field. However, clients might ignore it, or even fail to handle it properly, while we continue to report our protocol version as 0.19. Not sure if it’s sensible to bump the version when we still have so many holes in our implementation of 0.19. But on the other hand, if they are managing OK with the current state then maybe it’s proof enough that clients are not relying on the protocol version.

Awesome! ncmpcpp w/ mopidy running as my mpd server seems to get the duration correctly even though the files are all from mopidy-spotify. Could there be a way without a fix necessary I wonder