Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/azatoth/minidlna.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Maggard <jmaggard@users.sourceforce.net>2011-06-25 04:39:45 +0400
committerJustin Maggard <jmaggard@users.sourceforce.net>2011-06-25 04:39:45 +0400
commitc228fba8e114bc89c6be525f80e40c77cd1c5713 (patch)
treed9c80c0d9bdf9dd38fbeb58442fc1ce5490218b7 /minidlna.c
parent10308ba4a5ac6f0469b30bfd817ec4048f3dc82a (diff)
* Add the ability to change the root media container. (Thanks to Ivan Mironov)
Diffstat (limited to 'minidlna.c')
-rw-r--r--minidlna.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/minidlna.c b/minidlna.c
index de01adb..1180074 100644
--- a/minidlna.c
+++ b/minidlna.c
@@ -376,6 +376,7 @@ init(int argc, char * * argv)
runtime_vars.port = -1;
runtime_vars.notify_interval = 895; /* seconds between SSDP announces */
+ runtime_vars.root_container = NULL;
/* read options file first since
* command line arguments have final say */
@@ -559,6 +560,34 @@ init(int argc, char * * argv)
if( (strcmp(ary_options[i].value, "yes") == 0) || atoi(ary_options[i].value) )
SETFLAG(DLNA_STRICT_MASK);
break;
+ case ROOT_CONTAINER:
+ switch( ary_options[i].value[0] )
+ {
+ case '.':
+ runtime_vars.root_container = NULL;
+ break;
+ case 'B':
+ case 'b':
+ runtime_vars.root_container = BROWSEDIR_ID;
+ break;
+ case 'M':
+ case 'm':
+ runtime_vars.root_container = MUSIC_ID;
+ break;
+ case 'V':
+ case 'v':
+ runtime_vars.root_container = VIDEO_ID;
+ break;
+ case 'P':
+ case 'p':
+ runtime_vars.root_container = IMAGE_ID;
+ break;
+ default:
+ fprintf(stderr, "Invalid root container! [%s]\n",
+ ary_options[i].value);
+ break;
+ }
+ break;
default:
fprintf(stderr, "Unknown option in file %s\n",
optionsfile);