How do you use partitions in Music Player Daemon (MPD) - Stack Overflow

admin2025-04-30  1

I am trying to use partitions in MPD (version (0.23.15-1~bpo12+1)) but get "unrecognized parameter" errors. Using client.newpartition in python also does not work although it shows there is a default partion. Is this functionality implemented in MPD or is this a future feature as I can not find any documentation or examples etc? Why do I get these errors?

From the MPD manual: Example for specifying an additional partition in the configuration file:

partition {
    name "foo"
}

exception: Error in /etc/mpd_lounge.conf line 4; unrecognized parameter: partition mpd_lounge.service: Main process exited, code=exited, status=1/FAILURE mpd_lounge.service: Failed with result 'exit-code'.

Another example:

# Partitions Configuration
partition {
    name "partition1"
    description "Main playback zone"
    enabled "yes"
    audio_output {
        type            "fifo"
        name            "FIFO Pipe Lounge"
        path            "/tmp/snap_lounge"
        format          "44100:16:2"
        mixer_type      "software"
    }
}

exception: Error in /etc/mpd_lounge.conf line 269; unrecognized parameter: Partition mpd_lounge.service: Main process exited, code=exited, status=1/FAILURE mpd_lounge.service: Failed with result 'exit-code'.

Usage in python script:

# List existing partitions
partitions = client.listpartitions()
print("Existing Partitions:", partitions)

client.newpartition(lounge)

# List partitions again to confirm
partitions = client.listpartitions()
print("Partitions After Switch:", partitions)

Result:

Existing Partitions: [{'partition': 'default'}] Error: name 'lounge' is not defined

I am trying to use partitions in MPD (version (0.23.15-1~bpo12+1)) but get "unrecognized parameter" errors. Using client.newpartition in python also does not work although it shows there is a default partion. Is this functionality implemented in MPD or is this a future feature as I can not find any documentation or examples etc? Why do I get these errors?

From the MPD manual: Example for specifying an additional partition in the configuration file:

partition {
    name "foo"
}

exception: Error in /etc/mpd_lounge.conf line 4; unrecognized parameter: partition mpd_lounge.service: Main process exited, code=exited, status=1/FAILURE mpd_lounge.service: Failed with result 'exit-code'.

Another example:

# Partitions Configuration
partition {
    name "partition1"
    description "Main playback zone"
    enabled "yes"
    audio_output {
        type            "fifo"
        name            "FIFO Pipe Lounge"
        path            "/tmp/snap_lounge"
        format          "44100:16:2"
        mixer_type      "software"
    }
}

exception: Error in /etc/mpd_lounge.conf line 269; unrecognized parameter: Partition mpd_lounge.service: Main process exited, code=exited, status=1/FAILURE mpd_lounge.service: Failed with result 'exit-code'.

Usage in python script:

# List existing partitions
partitions = client.listpartitions()
print("Existing Partitions:", partitions)

client.newpartition(lounge)

# List partitions again to confirm
partitions = client.listpartitions()
print("Partitions After Switch:", partitions)

Result:

Existing Partitions: [{'partition': 'default'}] Error: name 'lounge' is not defined

Share Improve this question asked Jan 4 at 22:10 stackuser99stackuser99 395 bronze badges 2
  • Does nobody know how partitions work in MPD? Does the functionality actually exist? – stackuser99 Commented Jan 19 at 21:56
  • I'm just getting started with mpd (and mpc)... I checked the online docs, and they don't seem to offer much beyond what you've quoted. My only suggestion is to file an "Issue" on the mpd GitHub site. In general, what I've observed so far wrt overall use of mpd & mpc is not inspiring enthusiasm or confidence. – Seamus Commented Apr 10 at 2:45
Add a comment  | 

1 Answer 1

Reset to default 0

Partition functionality does not exist.

转载请注明原文地址:http://anycun.com/QandA/1746025631a91516.html