[filescanner] Option to import iTunes smart playlists

This commit is contained in:
ejurgensen 2016-06-04 23:30:01 +02:00
parent 777c0c8d27
commit 3527113a9b
3 changed files with 7 additions and 3 deletions

View File

@ -134,6 +134,9 @@ library {
# Should iTunes metadata override ours?
# itunes_overrides = false
# Should we import the content of iTunes smart playlists?
# itunes_smartpl = false
# Decoding options for DAAP clients
# Since iTunes has native support for mpeg, mp4a, mp4v, alac and wav,
# such files will be sent as they are. Any other formats will be decoded

View File

@ -85,6 +85,7 @@ static cfg_opt_t sec_library[] =
CFG_STR_LIST("filepath_ignore", NULL, CFGF_NONE),
CFG_BOOL("filescan_disable", cfg_false, CFGF_NONE),
CFG_BOOL("itunes_overrides", cfg_false, CFGF_NONE),
CFG_BOOL("itunes_smartpl", cfg_false, CFGF_NONE),
CFG_STR_LIST("no_decode", NULL, CFGF_NONE),
CFG_STR_LIST("force_decode", NULL, CFGF_NONE),
CFG_END()

View File

@ -668,9 +668,9 @@ ignore_pl(plist_t pl, char *name)
/* Special (builtin) playlists */
get_dictval_int_from_key(pl, "Distinguished Kind", &kind);
/* If only we could recover the smart playlists ... */
if (plist_dict_get_item(pl, "Smart Info")
|| plist_dict_get_item(pl, "Smart Criteria"))
/* Import smart playlists (optional) */
if (!cfg_getbool(cfg_getsec(cfg, "library"), "itunes_smartpl")
&& (plist_dict_get_item(pl, "Smart Info") || plist_dict_get_item(pl, "Smart Criteria")))
smart = 1;
/* Not interested in the Master playlist */