settings: make displaying 'empty tag' entry optional
This commit is contained in:
@@ -378,6 +378,8 @@
|
|||||||
#
|
#
|
||||||
#media_library_display_date = "yes"
|
#media_library_display_date = "yes"
|
||||||
#
|
#
|
||||||
|
#media_library_display_empty_tag = "yes"
|
||||||
|
#
|
||||||
#media_library_disable_two_column_mode = "no"
|
#media_library_disable_two_column_mode = "no"
|
||||||
#
|
#
|
||||||
#enable_window_title = "yes"
|
#enable_window_title = "yes"
|
||||||
|
|||||||
@@ -288,6 +288,9 @@ If enabled, tag editor will number tracks using format xx/yy (where xx is the cu
|
|||||||
.B media_library_display_date = yes/no
|
.B media_library_display_date = yes/no
|
||||||
If enabled, dates of albums in media library will be displayed and respected in searching, otherwise not.
|
If enabled, dates of albums in media library will be displayed and respected in searching, otherwise not.
|
||||||
.TP
|
.TP
|
||||||
|
.B media_library_display_empty_tag = yes/no
|
||||||
|
If enabled, left column will contain entry for 'empty' tag, otherwise not.
|
||||||
|
.TP
|
||||||
.B media_library_disable_two_column_mode = yes/no
|
.B media_library_disable_two_column_mode = yes/no
|
||||||
If enabled, pressing the key for the media library twice won't switch it to two column mode.
|
If enabled, pressing the key for the media library twice won't switch it to two column mode.
|
||||||
.TP
|
.TP
|
||||||
|
|||||||
@@ -196,6 +196,8 @@ void MediaLibrary::Update()
|
|||||||
sort(list.begin(), list.end(), CaseInsensitiveSorting());
|
sort(list.begin(), list.end(), CaseInsensitiveSorting());
|
||||||
for (MPD::TagList::iterator it = list.begin(); it != list.end(); ++it)
|
for (MPD::TagList::iterator it = list.begin(); it != list.end(); ++it)
|
||||||
{
|
{
|
||||||
|
if (it->empty() && !Config.media_library_display_empty_tag)
|
||||||
|
continue;
|
||||||
utf_to_locale(*it);
|
utf_to_locale(*it);
|
||||||
Artists->AddOption(*it);
|
Artists->AddOption(*it);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -410,6 +410,7 @@ void NcmpcppConfig::SetDefaults()
|
|||||||
browser_sort_by_mtime = false;
|
browser_sort_by_mtime = false;
|
||||||
tag_editor_extended_numeration = false;
|
tag_editor_extended_numeration = false;
|
||||||
media_library_display_date = true;
|
media_library_display_date = true;
|
||||||
|
media_library_display_empty_tag = true;
|
||||||
media_library_disable_two_column_mode = false;
|
media_library_disable_two_column_mode = false;
|
||||||
discard_colors_if_item_is_selected = true;
|
discard_colors_if_item_is_selected = true;
|
||||||
store_lyrics_in_song_dir = false;
|
store_lyrics_in_song_dir = false;
|
||||||
@@ -1047,6 +1048,10 @@ void NcmpcppConfig::Read()
|
|||||||
{
|
{
|
||||||
media_library_display_date = v == "yes";
|
media_library_display_date = v == "yes";
|
||||||
}
|
}
|
||||||
|
else if (cl.find("media_library_display_empty_tag") != std::string::npos)
|
||||||
|
{
|
||||||
|
media_library_display_empty_tag = v == "yes";
|
||||||
|
}
|
||||||
else if (cl.find("media_library_disable_two_column_mode") != std::string::npos)
|
else if (cl.find("media_library_disable_two_column_mode") != std::string::npos)
|
||||||
{
|
{
|
||||||
media_library_disable_two_column_mode = v == "yes";
|
media_library_disable_two_column_mode = v == "yes";
|
||||||
|
|||||||
@@ -247,6 +247,7 @@ struct NcmpcppConfig
|
|||||||
bool browser_sort_by_mtime;
|
bool browser_sort_by_mtime;
|
||||||
bool tag_editor_extended_numeration;
|
bool tag_editor_extended_numeration;
|
||||||
bool media_library_display_date;
|
bool media_library_display_date;
|
||||||
|
bool media_library_display_empty_tag;
|
||||||
bool media_library_disable_two_column_mode;
|
bool media_library_disable_two_column_mode;
|
||||||
bool discard_colors_if_item_is_selected;
|
bool discard_colors_if_item_is_selected;
|
||||||
bool store_lyrics_in_song_dir;
|
bool store_lyrics_in_song_dir;
|
||||||
|
|||||||
Reference in New Issue
Block a user