diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2010-09-09 16:43:10 +0200 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2010-09-09 16:43:10 +0200 |
commit | 968d2366aa9963b05e00fd1f96dcd8c82c96184b (patch) | |
tree | b4341c57a7d7833d3fc1ad69e0b8562a72884f3a /src | |
parent | 7ad624ebc6984dffa0c7cf767016c1e3fc2fe739 (diff) |
settings: make displaying 'empty tag' entry optional
Diffstat (limited to 'src')
-rw-r--r-- | src/media_library.cpp | 2 | ||||
-rw-r--r-- | src/settings.cpp | 5 | ||||
-rw-r--r-- | src/settings.h | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/src/media_library.cpp b/src/media_library.cpp index 949d8456..579b2ae8 100644 --- a/src/media_library.cpp +++ b/src/media_library.cpp @@ -196,6 +196,8 @@ void MediaLibrary::Update() sort(list.begin(), list.end(), CaseInsensitiveSorting()); 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); Artists->AddOption(*it); } diff --git a/src/settings.cpp b/src/settings.cpp index 789bbee9..b9e6149c 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -410,6 +410,7 @@ void NcmpcppConfig::SetDefaults() browser_sort_by_mtime = false; tag_editor_extended_numeration = false; media_library_display_date = true; + media_library_display_empty_tag = true; media_library_disable_two_column_mode = false; discard_colors_if_item_is_selected = true; store_lyrics_in_song_dir = false; @@ -1047,6 +1048,10 @@ void NcmpcppConfig::Read() { 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) { media_library_disable_two_column_mode = v == "yes"; diff --git a/src/settings.h b/src/settings.h index 18b9c339..c5fe8f24 100644 --- a/src/settings.h +++ b/src/settings.h @@ -247,6 +247,7 @@ struct NcmpcppConfig bool browser_sort_by_mtime; bool tag_editor_extended_numeration; bool media_library_display_date; + bool media_library_display_empty_tag; bool media_library_disable_two_column_mode; bool discard_colors_if_item_is_selected; bool store_lyrics_in_song_dir; |