From 94377a6b968a30e2a673f94fafc570b04f88bd2d Mon Sep 17 00:00:00 2001 From: Antti Ajanki Date: Tue, 14 Sep 2010 20:48:23 +0300 Subject: Command line arguments override config file --- HISTORY | 7 +++++++ src/vdr-plugin/webvideo.c | 12 ++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/HISTORY b/HISTORY index 3137f99..b56737b 100644 --- a/HISTORY +++ b/HISTORY @@ -202,3 +202,10 @@ Video site modules: /etc/webvi.conf) - Fixed Google video module. - Disabled ruutu.fi search which is not working. + +2010-xx-xx: Version 0.3.3 + +- correct template path in webvi.plugin.conf, use user CXXFLAGS, + SYSLIBDIR and DESTDIR in Makefiles, fix typos (patches by Ville + Skyttä) +- Command line arguments override config file 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); -- cgit v1.2.3