config: add merge_media_dirs option

By default, if there are multiple media directories specified, there
will be entries for each one in the root directory container.  If
there is only one media directory specified, then just its contents
will be in the root container, to save one level of browsing.

Setting this option changes the default behavior so that multiple
media dirs will behave like a single media dir.
This commit is contained in:
Justin Maggard
2014-03-12 11:40:49 -07:00
parent 7c0739ad3f
commit cce9a012b3
6 changed files with 14 additions and 3 deletions

View File

@ -832,7 +832,7 @@ start_scanner()
strncpyt(path, media_path->path, sizeof(path));
bname = basename(path);
/* If there are multiple media locations, add a level to the ContentDirectory */
if( media_dirs && media_dirs->next )
if( !GETFLAG(MERGE_MEDIA_DIRS_MASK) && media_dirs->next )
{
int startID = get_next_available_id("OBJECTS", BROWSEDIR_ID);
id = insert_directory(bname, path, BROWSEDIR_ID, "", startID);