mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-10 05:59:45 -05:00
[scan] Changes to commit 9a3cb3b7
* 'split_genre' -> 'only_first_genre' + changed description * fix memleak on multiple genre tags
This commit is contained in:
@@ -118,7 +118,7 @@ static cfg_opt_t sec_library[] =
|
||||
CFG_BOOL("allow_modifying_stored_playlists", cfg_false, CFGF_NONE),
|
||||
CFG_STR("default_playlist_directory", NULL, CFGF_NONE),
|
||||
CFG_BOOL("clear_queue_on_stop_disable", cfg_false, CFGF_NONE),
|
||||
CFG_BOOL("split_genre", cfg_false, CFGF_NONE),
|
||||
CFG_BOOL("only_first_genre", cfg_false, CFGF_NONE),
|
||||
CFG_END()
|
||||
};
|
||||
|
||||
|
||||
@@ -62,9 +62,12 @@ parse_genre(struct media_file_info *mfi, char *genre_string)
|
||||
char **genre = (char**)((char *) mfi + mfi_offsetof(genre));
|
||||
char *ptr;
|
||||
|
||||
if (*genre) // Previous genre tag exists
|
||||
return 0;
|
||||
|
||||
*genre = strdup(genre_string);
|
||||
|
||||
if (cfg_getbool(cfg_getsec(cfg, "library"), "split_genre"))
|
||||
if (cfg_getbool(cfg_getsec(cfg, "library"), "only_first_genre"))
|
||||
{
|
||||
ptr = strchr(*genre, ';');
|
||||
if (ptr)
|
||||
|
||||
Reference in New Issue
Block a user