Merge branch 'sid-genre-option' of git://github.com/frno7/MPD

This commit is contained in:
Max Kellermann
2019-08-09 14:45:09 +02:00
3 changed files with 11 additions and 0 deletions

View File

@@ -68,6 +68,7 @@ static SidDatabase *songlength_database;
static bool all_files_are_containers;
static unsigned default_songlength;
static std::string default_genre;
static bool filter_setting;
@@ -116,6 +117,8 @@ sidplay_init(const ConfigBlock &block)
default_songlength = block.GetPositiveValue("default_songlength", 0u);
default_genre = block.GetBlockValue("default_genre", "");
all_files_are_containers =
block.GetBlockValue("all_files_are_containers", true);
@@ -471,6 +474,10 @@ ScanSidTuneInfo(const SidTuneInfo &info, unsigned track, unsigned n_tracks,
if (artist != nullptr)
handler.OnTag(TAG_ARTIST, artist);
/* genre */
if (!default_genre.empty())
handler.OnTag(TAG_GENRE, default_genre.c_str());
/* date */
const char *date = GetInfoString(info, 2);
if (date != nullptr)