mirror of
https://github.com/owntone/owntone-server.git
synced 2025-03-31 17:53:49 -04:00
[http_daapd] Add option to hide albums/artists with just one track
This commit is contained in:
parent
cb9034bee7
commit
6e58af75cf
@ -78,6 +78,12 @@ library {
|
|||||||
# (changing this setting only takes effect after rescan, see the README)
|
# (changing this setting only takes effect after rescan, see the README)
|
||||||
compilation_artist = "Various artists"
|
compilation_artist = "Various artists"
|
||||||
|
|
||||||
|
# If your album and artist lists are cluttered, you can choose to hide
|
||||||
|
# albums and artists with only one track. The tracks will still be
|
||||||
|
# visible in other lists, e.g. songs and playlists. This setting
|
||||||
|
# currently only works in some remotes.
|
||||||
|
# hide_singles = false
|
||||||
|
|
||||||
# Internet streams in your playlists will by default be shown in the
|
# Internet streams in your playlists will by default be shown in the
|
||||||
# "Radio" library, like iTunes does. However, some clients (like
|
# "Radio" library, like iTunes does. However, some clients (like
|
||||||
# TunesRemote+) won't show the "Radio" library. If you would also like
|
# TunesRemote+) won't show the "Radio" library. If you would also like
|
||||||
|
@ -69,6 +69,7 @@ static cfg_opt_t sec_library[] =
|
|||||||
CFG_STR_LIST("audiobooks", NULL, CFGF_NONE),
|
CFG_STR_LIST("audiobooks", NULL, CFGF_NONE),
|
||||||
CFG_STR_LIST("compilations", NULL, CFGF_NONE),
|
CFG_STR_LIST("compilations", NULL, CFGF_NONE),
|
||||||
CFG_STR("compilation_artist", NULL, CFGF_NONE),
|
CFG_STR("compilation_artist", NULL, CFGF_NONE),
|
||||||
|
CFG_BOOL("hide_singles", cfg_false, CFGF_NONE),
|
||||||
CFG_BOOL("radio_playlists", cfg_false, CFGF_NONE),
|
CFG_BOOL("radio_playlists", cfg_false, CFGF_NONE),
|
||||||
CFG_STR("name_library", "Library", CFGF_NONE),
|
CFG_STR("name_library", "Library", CFGF_NONE),
|
||||||
CFG_STR("name_music", "Music", CFGF_NONE),
|
CFG_STR("name_music", "Music", CFGF_NONE),
|
||||||
|
@ -1848,6 +1848,7 @@ daap_reply_groups(struct evhttp_request *req, struct evbuffer *evbuf, char **uri
|
|||||||
const struct dmap_field *df;
|
const struct dmap_field *df;
|
||||||
const struct dmap_field **meta;
|
const struct dmap_field **meta;
|
||||||
struct sort_ctx *sctx;
|
struct sort_ctx *sctx;
|
||||||
|
cfg_t *lib;
|
||||||
const char *param;
|
const char *param;
|
||||||
char **strval;
|
char **strval;
|
||||||
char *tag;
|
char *tag;
|
||||||
@ -1979,6 +1980,11 @@ daap_reply_groups(struct evhttp_request *req, struct evbuffer *evbuf, char **uri
|
|||||||
if (strlen(dbgri.itemname) == 0)
|
if (strlen(dbgri.itemname) == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
/* Don't add single item albums/artists if configured to hide */
|
||||||
|
lib = cfg_getsec(cfg, "library");
|
||||||
|
if (cfg_getbool(lib, "hide_singles") && (strcmp(dbgri.itemcount, "1") == 0))
|
||||||
|
continue;
|
||||||
|
|
||||||
ngrp++;
|
ngrp++;
|
||||||
|
|
||||||
for (i = 0; i < nmeta; i++)
|
for (i = 0; i < nmeta; i++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user