Skip to content

Multiple MPD modules: second one controls wrong server #1172

@ghost

Description

I have a local MPD server and one on the internet and added modules for both of them, like this:

[bar/mybar]
modules-left = mpd-local mpd-online

[module/mpd-local]
type = internal/mpd

; I didn't expect this to change anything but tried with and without this anyway, no change:
host = localhost
port = 6600

format-online = local <toggle> <label-song>
icon-play     = ⏵
icon-pause    = ⏸
label-song    = %title%

[module/mpd-online]
type = internal/mpd

host     = mpd.example.org
port     = 1234
password = example

format-online = online <toggle> <label-song>
icon-play     = ⏵
icon-pause    = ⏸
label-song    = %title%

The first module works fine. The second one however acts up weird:

  1. Initial state:
    both players are paused

  2. Click the play button for the online player:
    the local player started playing, the online one is still paused
    The wrong one starts playing. It's indeed the local server that started producing sound.

  3. Click the same button again:
    both the online and the local player are now playing

  4. And again:
    the local player is now paused, the online one is playing

  5. Once more pauses the online server:
    we're back to the initial state: both players are paused

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions