new feature: shorten units' names displayed in statusbar while being in playlist
This commit is contained in:
@@ -226,6 +226,8 @@
|
||||
#
|
||||
#playlist_show_remaining_time = "no"
|
||||
#
|
||||
#playlist_shorten_total_times = "no"
|
||||
#
|
||||
#playlist_separate_albums = "no"
|
||||
#
|
||||
#playlist_display_mode = "classic" (classic/columns)
|
||||
|
||||
@@ -171,6 +171,9 @@ Number of default mode used in search engine.
|
||||
.B playlist_show_remaining_time = yes/no
|
||||
If enabled, time remaining to end of playlist will be shown after playlist's 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).
|
||||
.TP
|
||||
.B playlist_separate_albums = yes/no
|
||||
If enabled, separators will be placed between albums in playlist.
|
||||
.TP
|
||||
|
||||
@@ -387,12 +387,12 @@ std::string Playlist::TotalLength()
|
||||
if (itsTotalLength)
|
||||
{
|
||||
result << ", length: ";
|
||||
ShowTime(result, itsTotalLength, 0);
|
||||
ShowTime(result, itsTotalLength, Config.playlist_shorten_total_times);
|
||||
}
|
||||
if (Config.playlist_show_remaining_time && itsRemainingTime && !Items->isFiltered() && Items->Size() > 1)
|
||||
{
|
||||
result << " :: remaining: ";
|
||||
ShowTime(result, itsRemainingTime, 0);
|
||||
ShowTime(result, itsRemainingTime, Config.playlist_shorten_total_times);
|
||||
}
|
||||
result << ')';
|
||||
return result.str();
|
||||
|
||||
@@ -356,6 +356,7 @@ void NcmpcppConfig::SetDefaults()
|
||||
colors_enabled = true;
|
||||
fancy_scrolling = true;
|
||||
playlist_show_remaining_time = false;
|
||||
playlist_shorten_total_times = false;
|
||||
playlist_separate_albums = false;
|
||||
columns_in_playlist = false;
|
||||
columns_in_browser = false;
|
||||
@@ -833,6 +834,10 @@ void NcmpcppConfig::Read()
|
||||
{
|
||||
playlist_show_remaining_time = v == "yes";
|
||||
}
|
||||
else if (cl.find("playlist_shorten_total_times") != std::string::npos)
|
||||
{
|
||||
playlist_shorten_total_times = v == "yes";
|
||||
}
|
||||
else if (cl.find("playlist_separate_albums") != std::string::npos)
|
||||
{
|
||||
playlist_separate_albums = v == "yes";
|
||||
|
||||
@@ -196,6 +196,7 @@ struct NcmpcppConfig
|
||||
bool colors_enabled;
|
||||
bool fancy_scrolling;
|
||||
bool playlist_show_remaining_time;
|
||||
bool playlist_shorten_total_times;
|
||||
bool playlist_separate_albums;
|
||||
bool columns_in_playlist;
|
||||
bool columns_in_browser;
|
||||
|
||||
Reference in New Issue
Block a user