summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY2
-rw-r--r--HISTORY.DE2
-rw-r--r--conf/epgsearchupdmail-html.templ3
-rw-r--r--doc-src/en/epgsearch.4.txt1
-rw-r--r--uservars.h20
5 files changed, 27 insertions, 1 deletions
diff --git a/HISTORY b/HISTORY
index 9ff21eb..6e37d32 100644
--- a/HISTORY
+++ b/HISTORY
@@ -24,6 +24,8 @@ new:
* %day%, %month% and %year% which return the numeric day, month and year
(with century) of an event
* %chgrp% returns the VDR channel group name corresponding to an event
+ * %liveeventid% returns the encoded event ID as used in the frontend 'live' to add
+ direct links e.g. in the search timer mails.
- in memory to pat: french translation update, thanks to Patrice Staudt
- italian translation update, thanks to Diego Pierotto
- finnish translation update, thanks to Rolf Ahrenberg
diff --git a/HISTORY.DE b/HISTORY.DE
index 7975db2..31837cc 100644
--- a/HISTORY.DE
+++ b/HISTORY.DE
@@ -23,6 +23,8 @@ neu:
* %day%, %month% und %year% liefern den numerische Tag, das Monat und das
Jahr (mit Jahrhundert) einer Sendung
* %chgrp% liefert die VDR Kanalgruppe einer Sendung
+ * %liveeventid% liefert die kodierte Event-ID wie sie im Frontend 'live' benutzt wird.
+ Damit können nun z.B. in den Searchtimer-Mails direkte Links angegeben werden.
- Im Gedenken an pat: Update der französischen Übersetzung, Danke an Patrice Staudt
- Update der italienischen Übersetzung, Danke an Diego Pierotto
- Update der finnischen Übersetzung, Danke an Rolf Ahrenberg
diff --git a/conf/epgsearchupdmail-html.templ b/conf/epgsearchupdmail-html.templ
index 1562c68..abe4744 100644
--- a/conf/epgsearchupdmail-html.templ
+++ b/conf/epgsearchupdmail-html.templ
@@ -191,7 +191,8 @@ a.rightspace {
##############################################################################
<event>
<table class="event">
-<tr class="event"><th class="timer">Title:</th><th class="timer">%title%</th></tr>
+<tr class="event"><th class="timer">Title:</th>
+ <th class="timer"><a href="http://localhost:8008/edit_timer.html?epgid=%liveeventid%">%title%</a></th></tr>
<tr class="event"><td>Subtitle:</td><td>%subtitle%</td></tr>
<tr class="event"><td>Start/End:</td><td>%time_w% %date% %time%-%timeend%</td></tr>
<tr class="event"><td>Channel:</td><td>%chlng% (%chnr%)</td></tr>
diff --git a/doc-src/en/epgsearch.4.txt b/doc-src/en/epgsearch.4.txt
index 758dbc2..3f4d6bc 100644
--- a/doc-src/en/epgsearch.4.txt
+++ b/doc-src/en/epgsearch.4.txt
@@ -539,6 +539,7 @@ The following variables exist:
%summary% - summary
%htmlsummary% - summary, where all CR are replaced with '<br />'
%eventid% - numeric event ID
+ %liveeventid% - encoded event ID as used in the frontend 'live'
%t_status% - timer status ('T', 't', 'R')
%v_status% - VPS status
%r_status% - running status
diff --git a/uservars.h b/uservars.h
index 7dc356d..8c1895e 100644
--- a/uservars.h
+++ b/uservars.h
@@ -168,6 +168,24 @@ public:
else return ""; }
};
+class cLiveEventIDVar : public cInternalVar {
+public:
+ cLiveEventIDVar() : cInternalVar("%liveeventid%") {}
+ string Evaluate(const cEvent* e, bool escapeStrings = false)
+ {
+ if (!e) return "";
+ cChannel *channel = Channels.GetByChannelID(e->ChannelID(), true);
+ if (!channel) return "";
+
+ string res(channel->GetChannelID().ToString());
+ res = "event_" + res;
+ res = ReplaceAll(res, ".", "p");
+ res = ReplaceAll(res, "-", "m");
+ res += "_" + NumToString(e->EventID());
+ if (escapeStrings) return "'" + EscapeString(res) + "'"; else return res;
+ }
+};
+
class cTimeVar : public cInternalVar {
public:
cTimeVar() : cInternalVar("%time%") {}
@@ -617,6 +635,7 @@ class cUserVars : public cList<cUserVar> {
cSummaryVar summaryVar;
cHTMLSummaryVar htmlsummaryVar;
cEventIDVar eventIDVar;
+ cLiveEventIDVar liveeventIDVar;
cTimeVar timeVar;
cTimeEndVar timeEndVar;
cTime_wVar time_wVar;
@@ -667,6 +686,7 @@ class cUserVars : public cList<cUserVar> {
internalVars[summaryVar.Name()] = &summaryVar;
internalVars[htmlsummaryVar.Name()] = &htmlsummaryVar;
internalVars[eventIDVar.Name()] = &eventIDVar;
+ internalVars[liveeventIDVar.Name()] = &liveeventIDVar;
internalVars[timeVar.Name()] = &timeVar;
internalVars[timeEndVar.Name()] = &timeEndVar;
internalVars[time_wVar.Name()] = &time_wVar;