This commit is contained in:
parent
43075d27fe
commit
7cd44bbe53
5 changed files with 115 additions and 6 deletions
40
roles/music/templates/mpd.conf
Normal file
40
roles/music/templates/mpd.conf
Normal file
|
@ -0,0 +1,40 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
user "mpd"
|
||||
group "{{ music_audio_group }}"
|
||||
|
||||
bind_to_address "any"
|
||||
port "6600"
|
||||
max_connections "20"
|
||||
|
||||
zeroconf_enabled "yes"
|
||||
zeroconf_name "MPD @ %h"
|
||||
|
||||
music_directory "/srv/media/music"
|
||||
auto_update "yes"
|
||||
filesystem_charset "UTF-8"
|
||||
|
||||
playlist_directory "/var/lib/mpd/playlists"
|
||||
db_file "/var/lib/mpd/tag_cache"
|
||||
state_file "/var/lib/mpd/state"
|
||||
sticker_file "/var/lib/mpd/sticker.sql"
|
||||
|
||||
input {
|
||||
plugin "curl" # Required for web streams.
|
||||
}
|
||||
|
||||
decoder {
|
||||
plugin "hybrid_dsd"
|
||||
enabled "no"
|
||||
}
|
||||
|
||||
decoder {
|
||||
plugin "wildmidi"
|
||||
enabled "no"
|
||||
}
|
||||
|
||||
audio_output {
|
||||
type "pulse"
|
||||
name "Pulse"
|
||||
server "/tmp/pipewire-pulse-socket"
|
||||
}
|
21
roles/music/templates/mpd.service
Normal file
21
roles/music/templates/mpd.service
Normal file
|
@ -0,0 +1,21 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
[Unit]
|
||||
Description=Music Player Daemon
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStartPre=/bin/mkdir -p /run/mpd
|
||||
ExecStartPre=/bin/chown -R mpd:nogroup /run/mpd
|
||||
ExecStartPre=/bin/touch /var/log/mpd.log
|
||||
ExecStartPre=/bin/chown mpd:nogroup /var/log/mpd.log
|
||||
ExecStartPre=/usr/bin/cp /var/lib/mpd/state.default /var/lib/mpd/state
|
||||
ExecStart=/usr/bin/mpd --no-daemon /etc/mpd.conf
|
||||
# MDP will fork itself to the user defined in its config
|
||||
User=root
|
||||
LimitMEMLOCK=infinity
|
||||
LimitRTPRIO=99
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
17
roles/music/templates/mpd_state
Normal file
17
roles/music/templates/mpd_state
Normal file
|
@ -0,0 +1,17 @@
|
|||
sw_volume: 20
|
||||
audio_device_state:1:Pulse
|
||||
state: play
|
||||
current: 0
|
||||
time: 0
|
||||
random: 0
|
||||
repeat: 0
|
||||
single: 0
|
||||
consume: 0
|
||||
crossfade: 0
|
||||
mixrampdb: 0.000000
|
||||
mixrampdelay: -1.000000
|
||||
playlist_begin
|
||||
song_begin: http://ice4.somafm.com/groovesalad-256-mp3
|
||||
Name: SomaFM Groove Salad
|
||||
song_end
|
||||
playlist_end
|
Loading…
Add table
Add a link
Reference in a new issue