Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ Trygve Aaberge <[email protected]>
Wieland Hoffmann <[email protected]>
Wojciech Siewierski <[email protected]>
Yannick LM <[email protected]>
V <[email protected]>
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# ncmpcpp-0.10 (????-??-??)
* Add the configuration option `mpd_password`.

# ncmpcpp-0.9.2 (2021-01-24)
* Revert suppression of output of all external commands as that makes e.g album
Expand Down
2 changes: 2 additions & 0 deletions doc/config
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#
#mpd_port = 6600
#
#mpd_password = ""
#
#mpd_connection_timeout = 5
#
## Needed for tag editor and file operations to work.
Expand Down
3 changes: 3 additions & 0 deletions doc/ncmpcpp.1
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ Connect to MPD running on specified host/unix socket. When HOST starts with a '/
.B mpd_port = PORT
Connect to MPD on the specified port. Note: MPD_PORT environment variable overrides this setting.
.TP
.B mpd_password = PASSWORD
Use PASSWORD to authenticate to MPD.
.TP
.B mpd_music_dir = PATH
Search for files in specified directory. This is needed for tag editor to work.
.TP
Expand Down
4 changes: 4 additions & 0 deletions src/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ bool Configuration::read(const std::vector<std::string> &config_paths, bool igno
p.add<void>("mpd_port", nullptr, "6600", [](std::string port) {
Mpd.SetPort(verbose_lexical_cast<unsigned>(port));
});
p.add<void>("mpd_password", nullptr, "", [](std::string password) {
Comment thread
deviant marked this conversation as resolved.
if (!password.empty())
Mpd.SetPassword(password);
});
p.add("mpd_music_dir", &mpd_music_dir, "~/music", adjust_directory);
p.add("mpd_connection_timeout", &mpd_connection_timeout, "5");
p.add("mpd_crossfade_time", &crossfade_time, "5");
Expand Down