/*
 * setuploadandsave.c: A plugin for the Video Disk Recorder
 *
 * See the README file for copyright information and how to reach the author.
 *
 * $Id$
 * $Id: svdrppara.c 0.2 2005/10/06 20:42:34 hflor Exp $
 */

#include <vdr/plugin.h>
#include <vdr/config.h>
#include <vdr/device.h>
#include <vdr/videodir.h>

static const char *VERSION        = "0.0.3";
static const char *DESCRIPTION    = "read and change vdr-setup-values";
static const char *MAINMENUENTRY  = NULL;

class cPluginSvdrppara : public cPlugin {
private:
  // Add any member variables or functions you may need here.
public:
  cPluginSvdrppara(void);
  virtual ~cPluginSvdrppara();
  virtual const char *Version(void) { return VERSION; }
  virtual const char *Description(void) { return DESCRIPTION; }
  virtual const char *CommandLineHelp(void);
  virtual bool ProcessArgs(int argc, char *argv[]);
  virtual bool Initialize(void);
  virtual bool Start(void);
  virtual void Stop(void);
  virtual void Housekeeping(void);
  virtual const char *MainMenuEntry(void) { return MAINMENUENTRY; }
  virtual cOsdObject *MainMenuAction(void);
  virtual cMenuSetupPage *SetupMenu(void);
  virtual bool SetupParse(const char *Name, const char *Value);
  virtual bool Service(const char *Id, void *Data = NULL);
  virtual const char **SVDRPHelpPages(void);
#if VDRVERSNUM >= 10334
  virtual cString SVDRPCommand(const char *Command, const char *Option, int &ReplyCode);
#else
  virtual bool ParseSVDRP(cSVDRP *SVDRP, const char *Cmd, const char *Option);
#endif
  };

cPluginSvdrppara::cPluginSvdrppara(void)
{
  // Initialize any member variables here.
  // DON'T DO ANYTHING ELSE THAT MAY HAVE SIDE EFFECTS, REQUIRE GLOBAL
  // VDR OBJECTS TO EXIST OR PRODUCE ANY OUTPUT!
}

cPluginSvdrppara::~cPluginSvdrppara()
{
  // Clean up after yourself!
}

const char *cPluginSvdrppara::CommandLineHelp(void)
{
  // Return a string that describes all known command line options.
  return NULL;
}

bool cPluginSvdrppara::ProcessArgs(int argc, char *argv[])
{
  // Implement command line argument processing here if applicable.
  return true;
}

bool cPluginSvdrppara::Initialize(void)
{
  // Initialize any background activities the plugin shall perform.
  return true;
}

bool cPluginSvdrppara::Start(void)
{
  // Start any background activities the plugin shall perform.
  return true;
}

void cPluginSvdrppara::Stop(void)
{
  // Stop any background activities the plugin shall perform.
}

void cPluginSvdrppara::Housekeeping(void)
{
  // Perform any cleanup or other regular tasks.
}

cOsdObject *cPluginSvdrppara::MainMenuAction(void)
{
  // Perform the action when selected from the main VDR menu.
  return NULL;
}

cMenuSetupPage *cPluginSvdrppara::SetupMenu(void)
{
  // Return a setup menu in case the plugin supports one.
  return NULL;
}

bool cPluginSvdrppara::SetupParse(const char *Name, const char *Value)
{
  // Parse your own setup parameters and store their values.
  return false;
}

bool cPluginSvdrppara::Service(const char *Id, void *Data)
{
  // Handle custom service requests from other plugins
  return false;
}

const char **cPluginSvdrppara::SVDRPHelpPages(void)
{
  static const char *HelpPages[] = {
    "DLIFETI <days>\n"
    "        read/set DefaultLifetime",
    "DPRIORY <priority>\n"
    "        read/set DefaultPriority",
    "MARGSTP <minutes>\n"
    "        read/set MarginStop",
    "MARGSTR <minutes>\n"
    "        read/set MarginStart",
    "OSDLANG <lang-id>\n"
    "        read/set OSDLanguage (0 for languagelist)",
    "OSDMSGT <seconds>\n"
    "        read/set OSDMessageTime",
    "PLIFETI <days>\n"
    "        read/set PauseLifetime",
    "PPRIORY <priority>\n"
    "        read/set PausePriority",
    "PRILIMI <primarylimit>\n"
    "        read/set PrimaryLimit",
    "RESUMID <res-id>\n"
    "        read/set ResumeID",
    "SPLITEF <0|1>\n"
    "        read/set SplitEditedFiles",
    "SVDRPTI <seconds>\n"
    "        read/set SVDRPTimeout",
    "USERACT <minutes>\n"
    "        read/set MinUserInactivity",
    "VIDEOSI <size>\n"
    "        read/set MaxVideoFileSize",
    "RECTIME <minutes>\n"
    "        read/set InstantRecordTime",
    "CONFDIR\n"
    "        read ConfigDirectory",
    "VIDEODI\n"
    "        read VideoDirectory",
    NULL
    };
  return HelpPages;
}

#if VDRVERSNUM >= 10334
cString cPluginSvdrppara::SVDRPCommand(const char *Command, const char *Option, int &ReplyCode)
{

#define CMD(c) (strcasecmp(Command, c) == 0)
#define REPL(code, msg...) { ReplyCode = code; return cString::sprintf(msg); }

  if        CMD("DLIFETI")
  {
    int oldvalue = Setup.DefaultLifetime;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue > 0 && newvalue <= 99)
        {
          Setup.DefaultLifetime = newvalue;
          REPL(951, "DefaultLifetime was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 1 to 99");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(901, "DefaultLifetime is %d", oldvalue);
  } else if CMD("DPRIORY")
  {
    int oldvalue = Setup.DefaultPriority;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue > 0 && newvalue <= 99)
        {
          Setup.DefaultPriority = newvalue;
          REPL(952, "DefaultPriority was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 1 to 99");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(902, "DefaultPriority is %d", oldvalue);
  } else if CMD("MARGSTP")
  {
    int oldvalue = Setup.MarginStop;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue > 0 && newvalue <= 99)
        {
          Setup.MarginStop = newvalue;
          REPL(953, "MarginStop was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 1 to 99");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(903, "MarginStop is %d", oldvalue);
  } else if CMD("MARGSTR")
  {
    int oldvalue = Setup.MarginStart;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue > 0 && newvalue <= 99)
        {
          Setup.MarginStart = newvalue;
          REPL(954, "MarginStart was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 1 to 99");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(904, "MarginStart is %d", oldvalue);
  } else if CMD("OSDLANG")
  {
    int oldvalue = Setup.OSDLanguage;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue == 0)
        {
          ReplyCode = 999;
	  char *list = NULL;
          for (int iloop = 0; iloop < I18nNumLanguages; iloop++)
	  {
	    char *newline;
	    asprintf(&newline, "%sOSDLANG %02d --> %s\n", list ? list : "", iloop+1, I18nLanguages()[iloop]);
	    if (list) free(list);
	    list = newline;
	  }
	  char *ret;
	  asprintf(&ret, "%send of languagelist", list ? list : "");
	  if (list) free(list);
	  return cString(ret, true);
        } else if (newvalue > 0 && newvalue <= I18nNumLanguages)
        {
          Setup.OSDLanguage = newvalue - 1;
          cFont::SetCode(I18nCharSets()[Setup.OSDLanguage]);
          REPL(955, "OSDLanguage was %d (%s) new is %d (%s).", oldvalue+1, I18nLanguages()[oldvalue], newvalue, I18nLanguages()[newvalue-1]);
        } else
          REPL(501, "range for value only from 1 to 99");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(905, "OSDLanguage is %d (%s)", oldvalue+1, I18nLanguages()[oldvalue]);
  } else if CMD("OSDMSGT")
  {
    int oldvalue = Setup.OSDMessageTime;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue > 0 && newvalue <= 99)
        {
          Setup.OSDMessageTime = newvalue;
          REPL(956, "OSDMessageTime was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 1 to 99");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(906, "OSDMessageTime is %d", oldvalue);
  } else if CMD("PLIFETI")
  {
    int oldvalue = Setup.PauseLifetime;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue > 0 && newvalue <= 99)
        {
          Setup.PauseLifetime = newvalue;
          REPL(957, "PauseLifetime was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 1 to 99");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(907, "PauseLifetime is %d", oldvalue);
  } else if CMD("PPRIORY")
  {
    int oldvalue = Setup.PausePriority;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue > 0 && newvalue <= 99)
        {
          Setup.PausePriority = newvalue;
          REPL(958, "PausePriority was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 1 to 99");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(908, "PausePriority is %d", oldvalue);
  } else if CMD("PRILIMI")
  {
    int oldvalue = Setup.PrimaryLimit;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue > 0 && newvalue <= 99)
        {
          Setup.PrimaryLimit = newvalue;
          REPL(959, "PrimaryLimit was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 1 to 99");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(909, "PrimaryLimit is %d", oldvalue);
  } else if CMD("RESUMID")
  {
    int oldvalue = Setup.ResumeID;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue > 0 && newvalue <= 99)
        {
          Setup.ResumeID = newvalue;
          REPL(960, "ResumeID was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 1 to 99");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(910, "ResumeID is %d", oldvalue);
  } else if CMD("SPLITEF")
  {
    int oldvalue = Setup.SplitEditedFiles;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue >= 0 && newvalue <= 1)
        {
          Setup.SplitEditedFiles = newvalue;
          REPL(961, "SplitEditedFiles was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only 0 or 1");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(911, "SplitEditedFiles is %d", oldvalue);
  } else if CMD("SVDRPTI")
  {
    int oldvalue = Setup.SVDRPTimeout;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue > 4 && newvalue <= 999)
        {
          Setup.SVDRPTimeout = newvalue;
          REPL(962, "SVDRPTimeout was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 5 to 999");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(912, "SVDRPTimeout is %d", oldvalue);
  } else if CMD("USERACT")
  {
    int oldvalue = Setup.MinUserInactivity;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue >=0 && newvalue <= 999)
        {
          Setup.MinUserInactivity = newvalue;
          REPL(963, "MinUserInactivity was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 0 to 999");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(913, "MinUserInactivity is %d", oldvalue);
  } else if CMD("VIDEOSI")
  {
    int oldvalue = Setup.MaxVideoFileSize;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue >= 100 && newvalue <= 2000)
        {
          Setup.MaxVideoFileSize = newvalue;
          REPL(964, "MaxVideoFileSize was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 100 to 2000");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(914, "MaxVideoFileSize is %d", oldvalue);
  } else if CMD("RECTIME")
  {
    int oldvalue = Setup.InstantRecordTime;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue > 0 && newvalue < 1440)
        {
          Setup.InstantRecordTime = newvalue;
          REPL(965, "InstantRecordTime was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 1 to 1439");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(915, "InstantRecordTime is %d", oldvalue);
  } else if CMD("CONFDIR")
  {
    char buffer[MaxFileName];
    strcpy(buffer, ConfigDirectory());
    *(buffer + strlen(buffer) - 8) = 0;
    REPL(916, "ConfigDirectory is %s", buffer);
  } else if CMD("VIDEODI")
  {
    REPL(917, "VideoDirectory is %s", VideoDirectory);
  }
  return NULL;

#undef CMD
#undef REPL

}

#else

bool cPluginSvdrppara::ParseSVDRP(cSVDRP *SVDRP, const char *Cmd, const char *Option)
{

#define CMD(c) (strcasecmp(Cmd, c) == 0)
#define REPL(code, msg...) { SVDRP->Reply(code, msg); }

  if        CMD("DLIFETI")
  {
    int oldvalue = Setup.DefaultLifetime;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue > 0 && newvalue <= 99)
        {
          Setup.DefaultLifetime = newvalue;
          REPL(951, "DefaultLifetime was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 1 to 99");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(901, "DefaultLifetime is %d", oldvalue);
  } else if CMD("DPRIORY")
  {
    int oldvalue = Setup.DefaultPriority;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue > 0 && newvalue <= 99)
        {
          Setup.DefaultPriority = newvalue;
          REPL(952, "DefaultPriority was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 1 to 99");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(902, "DefaultPriority is %d", oldvalue);
  } else if CMD("MARGSTP")
  {
    int oldvalue = Setup.MarginStop;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue > 0 && newvalue <= 99)
        {
          Setup.MarginStop = newvalue;
          REPL(953, "MarginStop was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 1 to 99");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(903, "MarginStop is %d", oldvalue);
  } else if CMD("MARGSTR")
  {
    int oldvalue = Setup.MarginStart;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue > 0 && newvalue <= 99)
        {
          Setup.MarginStart = newvalue;
          REPL(954, "MarginStart was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 1 to 99");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(904, "MarginStart is %d", oldvalue);
  } else if CMD("OSDLANG")
  {
    int oldvalue = Setup.OSDLanguage;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue == 0)
        {
          for (int iloop = 0; iloop < I18nNumLanguages; iloop++)
            REPL(-999, "OSDLANG %02d --> %s", iloop+1, I18nLanguages()[iloop]);
          REPL(999, "end of languagelist");
        } else if (newvalue > 0 && newvalue <= I18nNumLanguages)
        {
          Setup.OSDLanguage = newvalue - 1;
#if VDRVERSNUM >= 10301
          cFont::SetCode(I18nCharSets()[Setup.OSDLanguage]);
#endif
          REPL(955, "OSDLanguage was %d (%s) new is %d (%s).", oldvalue+1, I18nLanguages()[oldvalue], newvalue, I18nLanguages()[newvalue-1]);
        } else
          REPL(501, "range for value only from 1 to 99");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(905, "OSDLanguage is %d (%s)", oldvalue+1, I18nLanguages()[oldvalue]);
  } else if CMD("OSDMSGT")
  {
    int oldvalue = Setup.OSDMessageTime;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue > 0 && newvalue <= 99)
        {
          Setup.OSDMessageTime = newvalue;
          REPL(956, "OSDMessageTime was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 1 to 99");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(906, "OSDMessageTime is %d", oldvalue);
  } else if CMD("PLIFETI")
  {
    int oldvalue = Setup.PauseLifetime;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue > 0 && newvalue <= 99)
        {
          Setup.PauseLifetime = newvalue;
          REPL(957, "PauseLifetime was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 1 to 99");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(907, "PauseLifetime is %d", oldvalue);
  } else if CMD("PPRIORY")
  {
    int oldvalue = Setup.PausePriority;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue > 0 && newvalue <= 99)
        {
          Setup.PausePriority = newvalue;
          REPL(958, "PausePriority was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 1 to 99");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(908, "PausePriority is %d", oldvalue);
  } else if CMD("PRILIMI")
  {
    int oldvalue = Setup.PrimaryLimit;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue > 0 && newvalue <= 99)
        {
          Setup.PrimaryLimit = newvalue;
          REPL(959, "PrimaryLimit was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 1 to 99");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(909, "PrimaryLimit is %d", oldvalue);
  } else if CMD("RESUMID")
  {
    int oldvalue = Setup.ResumeID;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue > 0 && newvalue <= 99)
        {
          Setup.ResumeID = newvalue;
          REPL(960, "ResumeID was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 1 to 99");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(910, "ResumeID is %d", oldvalue);
  } else if CMD("SPLITEF")
  {
    int oldvalue = Setup.SplitEditedFiles;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue >= 0 && newvalue <= 1)
        {
          Setup.SplitEditedFiles = newvalue;
          REPL(961, "SplitEditedFiles was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only 0 or 1");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(911, "SplitEditedFiles is %d", oldvalue);
  } else if CMD("SVDRPTI")
  {
    int oldvalue = Setup.SVDRPTimeout;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue > 4 && newvalue <= 999)
        {
          Setup.SVDRPTimeout = newvalue;
          REPL(962, "SVDRPTimeout was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 5 to 999");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(912, "SVDRPTimeout is %d", oldvalue);
  } else if CMD("USERACT")
  {
    int oldvalue = Setup.MinUserInactivity;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue >=0 && newvalue <= 999)
        {
          Setup.MinUserInactivity = newvalue;
          REPL(963, "MinUserInactivity was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 0 to 999");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(913, "MinUserInactivity is %d", oldvalue);
  } else if CMD("VIDEOSI")
  {
    int oldvalue = Setup.MaxVideoFileSize;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue >= 100 && newvalue <= 2000)
        {
          Setup.MaxVideoFileSize = newvalue;
          REPL(964, "MaxVideoFileSize was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 100 to 2000");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(914, "MaxVideoFileSize is %d", oldvalue);
  } else if CMD("RECTIME")
  {
    int oldvalue = Setup.InstantRecordTime;
    if (*Option)
    {
      if (isnumber(Option))
      {
        int newvalue = atoi(Option);
        if (newvalue > 0 && newvalue < 1440)
        {
          Setup.InstantRecordTime = newvalue;
          REPL(965, "InstantRecordTime was %d new is %d.", oldvalue, newvalue);
        } else
          REPL(501, "range for value only from 1 to 1439");
      } else
        REPL(501, "only numbers allowed");
    } else
      REPL(915, "InstantRecordTime is %d", oldvalue);
  } else if CMD("CONFDIR")
  {
    char buffer[MaxFileName];
    strcpy(buffer, ConfigDirectory());
    *(buffer + strlen(buffer) - 8) = 0;
    REPL(916, "ConfigDirectory is %s", buffer);
  } else if CMD("VIDEODI")
  {
    REPL(917, "VideoDirectory is %s", VideoDirectory);
  } else
    return false;
  return true;

#undef CMD
#undef REPL

}
#endif

VDRPLUGINCREATOR(cPluginSvdrppara); // Don't touch this!
