settings: add support for displaying current mpd host in playlist
This commit is contained in:
@@ -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