Add configuration option to disable individual artwork

This commit is contained in:
Stuart C. Naifeh 2014-12-30 10:38:03 -05:00
parent 431ecdb197
commit f3e21956c4
3 changed files with 14 additions and 5 deletions

View File

@ -91,6 +91,11 @@ library {
# forked-daapd will look for jpg and png files with these base names
# artwork_basenames = { "artwork", "cover", "Folder" }
# Disable searching for artwork corresponding to individual media file,
# and instead only look for album artwork. By default, individual artwork
# is enabled.
# ownartwork_disable = false
# File types the scanner should ignore
# Non-audio files will never be added to the database, but here you
# can prevent the scanner from even probing them. This might improve

View File

@ -1246,13 +1246,16 @@ artwork_get_item(int id, int max_w, int max_h, struct evbuffer *evbuf)
if (!mfi)
return -1;
if (cfg_getbool(cfg_getsec(cfg, "library"), "ownartwork_disable"))
ret = -1;
else
/*
* Try the individual artwork first
*/
ret = artwork_get_item_mfi(mfi, max_w, max_h, evbuf);
/*
* No individual artwork, try group artwork
* No individual artwork or individual artwork disabled, try group artwork
*/
if (ret < 0)
{

View File

@ -76,6 +76,7 @@ static cfg_opt_t sec_library[] =
CFG_STR("name_podcasts", "Podcasts", CFGF_NONE),
CFG_STR("name_audiobooks", "Audiobooks", CFGF_NONE),
CFG_STR_LIST("artwork_basenames", "{artwork,cover,Folder}", CFGF_NONE),
CFG_BOOL("ownartwork_disable", cfg_false, CFGF_NONE),
CFG_STR_LIST("filetypes_ignore", "{.db,.ini,.db-journal,.pdf}", CFGF_NONE),
CFG_BOOL("filescan_disable", cfg_false, CFGF_NONE),
CFG_BOOL("itunes_overrides", cfg_false, CFGF_NONE),