settings: add support for displaying current mpd host in playlist
This commit is contained in:
1
NEWS
1
NEWS
@@ -12,6 +12,7 @@ ncmpcpp-0.7 (????-??-??)
|
||||
* Support for 256 colors and customization of background colors has been added.
|
||||
* Multiple configuration files via command line arguments are now accepted. In addition, by default ncmpcpp attempts to read both $HOME/.ncmpcpp/config and $XDG_CONFIG_HOME/ncmpcpp/config (in this order).
|
||||
* Support for PDCurses has been removed due to the library being unmaintained and buggy.
|
||||
* Current MPD host may now be shown in playlist (playlist_show_mpd_host configuration variable, disabled by default).
|
||||
* Random album artists can now be added to the playlist.
|
||||
|
||||
ncmpcpp-0.6.3 (2015-03-02)
|
||||
|
||||
@@ -286,6 +286,8 @@
|
||||
##
|
||||
#execute_on_song_change = ""
|
||||
#
|
||||
#playlist_show_mpd_host = no
|
||||
#
|
||||
#playlist_show_remaining_time = no
|
||||
#
|
||||
#playlist_shorten_total_times = no
|
||||
|
||||
@@ -143,8 +143,11 @@ Format for songs' list displayed in columns.
|
||||
.B execute_on_song_change = COMMAND
|
||||
Shell command to execute on song change.
|
||||
.TP
|
||||
.B playlist_show_mpd_host = yes/no
|
||||
If enabled, current MPD host will be shown in playlist.
|
||||
.TP
|
||||
.B playlist_show_remaining_time = yes/no
|
||||
If enabled, time remaining to end of playlist will be shown after playlist's statistics.
|
||||
If enabled, time remaining to end of playlist will be shown after playlist statistics.
|
||||
.TP
|
||||
.B playlist_shorten_total_times = yes/no
|
||||
If enabled, total/remaining playlist time displayed in statusbar will be shown using shortened units' names (d:h:m:s instead of days:hours:minutes:seconds).
|
||||
|
||||
@@ -105,6 +105,12 @@ void Playlist::resize()
|
||||
std::wstring Playlist::title()
|
||||
{
|
||||
std::wstring result = L"Playlist ";
|
||||
if (Config.playlist_show_mpd_host)
|
||||
{
|
||||
result += L"on ";
|
||||
result += ToWString(Mpd.GetHostname());
|
||||
result += L" ";
|
||||
}
|
||||
if (m_reload_total_length || m_reload_remaining)
|
||||
m_stats = getTotalLength();
|
||||
result += Scroller(ToWString(m_stats), m_scroll_begin, COLS-result.length()-(Config.design == Design::Alternative ? 2 : Global::VolumeState.length()));
|
||||
|
||||
@@ -362,6 +362,9 @@ bool Configuration::read(const std::vector<std::string> &config_paths)
|
||||
p.add("execute_on_song_change", assign_default(
|
||||
execute_on_song_change, ""
|
||||
));
|
||||
p.add("playlist_show_mpd_host", yes_no(
|
||||
playlist_show_mpd_host, false
|
||||
));
|
||||
p.add("playlist_show_remaining_time", yes_no(
|
||||
playlist_show_remaining_time, false
|
||||
));
|
||||
|
||||
@@ -124,6 +124,7 @@ struct Configuration
|
||||
mpd_tag_type media_lib_primary_tag;
|
||||
|
||||
bool colors_enabled;
|
||||
bool playlist_show_mpd_host;
|
||||
bool playlist_show_remaining_time;
|
||||
bool playlist_shorten_total_times;
|
||||
bool playlist_separate_albums;
|
||||
|
||||
Reference in New Issue
Block a user