diff options
author | horchi <vdr@jwendel.de> | 2018-03-09 17:38:03 +0100 |
---|---|---|
committer | horchi <vdr@jwendel.de> | 2018-03-09 17:38:03 +0100 |
commit | bc845e984ba0790bb160c80578ed8ddde2637735 (patch) | |
tree | fd0634486fac759ec9a44e3a58795258a6cc2519 /timer.c | |
parent | f7db728bcfa4d1663b07873bfa364ccbb9bfb1ce (diff) | |
download | vdr-plugin-epg2vdr-bc845e984ba0790bb160c80578ed8ddde2637735.tar.gz vdr-plugin-epg2vdr-bc845e984ba0790bb160c80578ed8ddde2637735.tar.bz2 |
2018-03-09 version 1.1.93 (horchi)\n - added: Menu for matching 'jobs' (timersdone) of search timer results, with delete option\n - added: some german translations\n - added: optional (configurable) osd notification on timer change\n\n1.1.93
Diffstat (limited to 'timer.c')
-rw-r--r-- | timer.c | 25 |
1 files changed, 23 insertions, 2 deletions
@@ -60,7 +60,7 @@ int cUpdate::checkSwitchTimer() tell(0, "Switching to channel '%s'", channel->Name()); if (!cDevice::PrimaryDevice()->SwitchChannel(channel, true)) - Skins.Message(mtError, tr("Can't switch channel!")); + Skins.QueueMessage(mtError, tr("Can't switch channel!")); else res = success; } @@ -175,6 +175,19 @@ int cUpdate::performTimerJobs() return fail; } + // move this to cUpdate::init() + + std::string user = "@"; + long int webLoginEnabled = no; + long int osdTimerNotify = no; + + getParameter("webif", "needLogin", webLoginEnabled); + + if (webLoginEnabled) + user += Epg2VdrConfig.user; + + getParameter(user.c_str(), "osdTimerNotify", osdTimerNotify); + // iterate pending actions ... timerDb->clear(); @@ -239,6 +252,9 @@ int cUpdate::performTimerJobs() timerDb->setCharValue("ACTION", taAssumed); timerDb->setCharValue("STATE", tsDeleted); timerDb->update(); + + if (osdTimerNotify) + Skins.QueueMessage(mtInfo, cString::sprintf("Timer '%s' deleted", timerDb->getStrValue("FILE"))); } // -------------------------------- @@ -427,6 +443,9 @@ int cUpdate::performTimerJobs() timerDb->setCharValue("ACTION", taAssumed); timerDb->setCharValue("STATE", tsPending); timerDb->store(); + + if (osdTimerNotify) + Skins.QueueMessage(mtInfo, cString::sprintf("Timer '%s' %s", timerDb->getStrValue("FILE"), insert ? "created" : "modified")); } } @@ -654,7 +673,9 @@ int cUpdate::updateTimerTable() { int doneid = timerDb->getIntValue("DONEID"); - if (!timerDb->hasCharValue("STATE", tsFinished)) + if (!timerDb->hasCharValue("STATE", tsFinished) && + !timerDb->hasCharValue("STATE", tsRunning) && + !timerDb->hasCharValue("STATE", tsError)) { timerDb->setCharValue("STATE", tsDeleted); timerDb->update(); |