You are not logged in.

#1 2020-11-28 15:54:49

doaster
Member
Registered: 2020-04-21
Posts: 5

MPD: smbclient plugin: hide credentials and correctly resume state

I've got the following issue and would appreciate your help on it *:

My mpd.conf looks like this:

db_file     "~/.config/mpd/database"
log_file    "~/.config/mpd/log"
state_file  "~/.config/mpd/state"

music_directory     "smb://user:password@freenassmbshare"
playlist_directory  "~/.config/mpd/playlists"
sticker_file        "~/.config/mpd/sticker.sql"

save_absolute_paths_in_playlists "yes"
restore_paused "yes"

audio_output {
  type  "pulse"
  name  "Pulse Audio Output"
}

audio_output {
  type "fifo"
  name "Visualizer Feed"
  path "/tmp/mpd.fifo"
}

I'm not happy with the credentials of my freenas share being openly visible in this
file, i would prefer them in a location that is only readable by root user. (Or not input
them at all since I already mount the share in /etc/fstab; with the credentials option
and a file that is only readable by root user).
I tried setting the music_directory option to the location where I mount the share, but
when I do that weird things happen, for example the state completely resets.

Second issue is that each time I start mpd the state is not correctly set, it should remember
the seconds of the paused song and resume at that time. Instead it resumes always at the
start of the song. (Could this have something to do with my outdated mpd version?)

Glad for any help.


* be aware that i'm not using the latest mpd version. I'm using version 0.22.1-1 since
the smbclient plugin got disabled in the following version. See
mpd changelog

Offline

Board footer

Powered by FluxBB