summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAntti Ajanki <antti.ajanki@iki.fi>2010-09-14 20:48:23 +0300
committerAntti Ajanki <antti.ajanki@iki.fi>2010-09-14 20:48:23 +0300
commit94377a6b968a30e2a673f94fafc570b04f88bd2d (patch)
tree46746e29d4602cd277797bce5945861a24fb20c2 /src
parentd8489bcb53297055af4d30e3e7214bbf87c4fdb7 (diff)
downloadvdr-plugin-webvideo-94377a6b968a30e2a673f94fafc570b04f88bd2d.tar.gz
vdr-plugin-webvideo-94377a6b968a30e2a673f94fafc570b04f88bd2d.tar.bz2
Command line arguments override config file
Diffstat (limited to 'src')
-rw-r--r--src/vdr-plugin/webvideo.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/vdr-plugin/webvideo.c b/src/vdr-plugin/webvideo.c
index ab7eaab..9f79c5e 100644
--- a/src/vdr-plugin/webvideo.c
+++ b/src/vdr-plugin/webvideo.c
@@ -135,15 +135,19 @@ bool cPluginWebvideo::Initialize(void)
// default values if not given on the command line
if ((const char *)destdir == NULL)
- destdir = cString(VideoDirectory);
+ webvideoConfig->SetDownloadPath(cString(VideoDirectory));
if ((const char *)conffile == NULL)
conffile = AddDirectory(ConfigDirectory(Name()), "webvi.plugin.conf");
- webvideoConfig->SetDownloadPath(destdir);
- webvideoConfig->SetTemplatePath(templatedir);
- webvideoConfig->SetPostProcessCmd(postprocesscmd);
webvideoConfig->ReadConfigFile(conffile);
+ if ((const char *)destdir)
+ webvideoConfig->SetDownloadPath(destdir);
+ if ((const char *)templatedir)
+ webvideoConfig->SetTemplatePath(templatedir);
+ if ((const char *)postprocesscmd)
+ webvideoConfig->SetPostProcessCmd(postprocesscmd);
+
cString mymimetypes = AddDirectory(ConfigDirectory(Name()), "mime.types");
const char *mimefiles [] = {"/etc/mime.types", (const char *)mymimetypes, NULL};
MimeTypes = new cMimeTypes(mimefiles);