summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhorchi <vdr@jwendel.de>2018-02-22 19:09:47 +0100
committerhorchi <vdr@jwendel.de>2018-02-22 19:09:47 +0100
commitb1b244a5b7ff76e6b6a07e05c0afe4cb0f69d6b4 (patch)
tree1067a6dc30399e9d53d7d9626c6cf98e62bfabd2
parent697e967988bbac57f344c5a0f496a6fb2d993a77 (diff)
downloadvdr-plugin-epg2vdr-b1b244a5b7ff76e6b6a07e05c0afe4cb0f69d6b4.tar.gz
vdr-plugin-epg2vdr-b1b244a5b7ff76e6b6a07e05c0afe4cb0f69d6b4.tar.bz2
2018-02-22 version 1.1.88 (horchi)\n - added: Optional switch timer notification message\n\n1.1.88
-rw-r--r--HISTORY.h7
-rw-r--r--epg2vdr.c3
-rw-r--r--plgconfig.c1
-rw-r--r--plgconfig.h1
-rw-r--r--po/de_DE.po5
-rw-r--r--po/it_IT.po5
-rw-r--r--timer.c10
-rw-r--r--update.h1
8 files changed, 29 insertions, 4 deletions
diff --git a/HISTORY.h b/HISTORY.h
index 7540445..037acba 100644
--- a/HISTORY.h
+++ b/HISTORY.h
@@ -5,8 +5,8 @@
*
*/
-#define _VERSION "1.1.87"
-#define VERSION_DATE "20.02.2018"
+#define _VERSION "1.1.88"
+#define VERSION_DATE "22.02.2018"
#define DB_API 6
@@ -19,6 +19,9 @@
/*
* ------------------------------------
+2018-02-22 version 1.1.88 (horchi)
+ - added: Optional switch timer notification message
+
2018-02-20 version 1.1.87 (horchi)
- change: No forerunnings for switch timers
diff --git a/epg2vdr.c b/epg2vdr.c
index 654ccd3..c96f988 100644
--- a/epg2vdr.c
+++ b/epg2vdr.c
@@ -292,6 +292,7 @@ void cMenuSetupEPG2VDR::Setup()
Add(new cMenuEditBoolItem(tr("Replace Timer Menu"), &data.replaceTimerMenu));
Add(new cMenuEditBoolItem(tr("XChange Key Ok/Blue"), &data.xchgOkBlue));
Add(new cMenuEditBoolItem(tr("Show Channels without EPG"), &data.showEmptyChannels));
+ Add(new cMenuEditIntItem(tr("Switch timer notification timer [s]"), &data.switchTimerNotifyTime, 0, 999));
Add(new cOsdItem(cString::sprintf("--------------------- %s ---------------------------------", tr("Web"))));
cList<cOsdItem>::Last()->SetSelectable(false);
@@ -375,6 +376,7 @@ void cMenuSetupEPG2VDR::Store()
SetupStore("ReplaceScheduleMenu", Epg2VdrConfig.replaceScheduleMenu);
SetupStore("ReplaceTimerMenu", Epg2VdrConfig.replaceTimerMenu);
SetupStore("ExtendedEpgData2Aux", Epg2VdrConfig.extendedEpgData2Aux);
+ SetupStore("SwTimerNotifyTime", Epg2VdrConfig.switchTimerNotifyTime);
if (userCount && Epg2VdrConfig.userIndex >= 0)
{
@@ -1150,6 +1152,7 @@ bool cPluginEPG2VDR::SetupParse(const char *Name, const char *Value)
else if (!strcasecmp(Name, "ReplaceTimerMenu")) Epg2VdrConfig.replaceTimerMenu = atoi(Value);
else if (!strcasecmp(Name, "User")) sstrcpy(Epg2VdrConfig.user, Value, sizeof(Epg2VdrConfig.user));
else if (!strcasecmp(Name, "ExtendedEpgData2Aux")) Epg2VdrConfig.extendedEpgData2Aux = atoi(Value);
+ else if (!strcasecmp(Name, "SwTimerNotifyTime")) Epg2VdrConfig.switchTimerNotifyTime = atoi(Value);
else
return false;
diff --git a/plgconfig.c b/plgconfig.c
index b41983b..786f3d9 100644
--- a/plgconfig.c
+++ b/plgconfig.c
@@ -34,4 +34,5 @@ cEpg2VdrConfig::cEpg2VdrConfig()
*user = 0;
showEmptyChannels = no;
extendedEpgData2Aux = no;
+ switchTimerNotifyTime = 0;
}
diff --git a/plgconfig.h b/plgconfig.h
index b810b36..daff92d 100644
--- a/plgconfig.h
+++ b/plgconfig.h
@@ -38,6 +38,7 @@ struct cEpg2VdrConfig : public cEpgConfig
char user[100+TB];
int showEmptyChannels;
int extendedEpgData2Aux;
+ int switchTimerNotifyTime;
};
extern cEpg2VdrConfig Epg2VdrConfig;
diff --git a/po/de_DE.po b/po/de_DE.po
index 74fba70..9206031 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr@jwendel.de>\n"
-"POT-Creation-Date: 2018-02-12 08:57+0100\n"
+"POT-Creation-Date: 2018-02-22 19:07+0100\n"
"PO-Revision-Date: 2009-08-27 21:40+0200\n"
"Last-Translator: Klaus Schmidinger <kls@cadsoft.de>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -91,6 +91,9 @@ msgstr "Tausche Taste OK/Blau"
msgid "Show Channels without EPG"
msgstr "Zeige Kanäle ohne EPG"
+msgid "Switch timer notification timer [s]"
+msgstr ""
+
msgid "Web"
msgstr "Netzwerk"
diff --git a/po/it_IT.po b/po/it_IT.po
index 7204b5c..72444e3 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr@jwendel.de>\n"
-"POT-Creation-Date: 2018-02-12 15:20+0100\n"
+"POT-Creation-Date: 2018-02-22 19:07+0100\n"
"PO-Revision-Date: 2009-08-27 21:45+0100\n"
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -96,6 +96,9 @@ msgstr ""
msgid "Show Channels without EPG"
msgstr ""
+msgid "Switch timer notification timer [s]"
+msgstr ""
+
msgid "Web"
msgstr ""
diff --git a/timer.c b/timer.c
index 28c8a6c..80cdbba 100644
--- a/timer.c
+++ b/timer.c
@@ -27,6 +27,15 @@ int cUpdate::checkSwitchTimer()
if (time(0) < swTimer->start)
{
+ if (!swTimer->notified && Epg2VdrConfig.switchTimerNotifyTime && time(0) >= swTimer->start - Epg2VdrConfig.switchTimerNotifyTime)
+ {
+ char* buf;
+ asprintf(&buf, "Switching in %ld seconds to '%s'", swTimer->start-time(0), swTimer->channelId.c_str());
+ Skins.Message(mtInfo, buf);
+ free(buf);
+ swTimer->notified = yes;
+ }
+
it++;
continue;
}
@@ -505,6 +514,7 @@ int cUpdate::takeSwitchTimer()
switchTimers[timerid].eventId = timerDb->getIntValue("EVENTID");
switchTimers[timerid].channelId = timerDb->getStrValue("CHANNELID");
switchTimers[timerid].start = timerDb->getIntValue("_STARTTIME");
+ switchTimers[timerid].notified = no;
timerDb->setCharValue("ACTION", taAssumed);
timerDb->setCharValue("STATE", tsPending);
diff --git a/update.h b/update.h
index 15e1594..92ebe35 100644
--- a/update.h
+++ b/update.h
@@ -149,6 +149,7 @@ class cUpdate : public cThread, public cStatus, public cParameters
long eventId;
std::string channelId;
time_t start;
+ int notified;
};
// struct to store a recording action delieverd by the status interface