summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave <vdr@pickles.me.uk>2013-08-13 12:12:49 +0100
committerDave <vdr@pickles.me.uk>2013-08-13 12:12:49 +0100
commitf1341286419473da24fdfc7ed72c380fbf397640 (patch)
tree81a746320f2966b151772768c8c811b90d970159
parent90c434e9f5e9776d87363912422eaecadcf64f32 (diff)
downloadvdrtva-0.3.4.tar.gz
vdrtva-0.3.4.tar.bz2
Only add events on same channel to series.v0.3.4
-rw-r--r--HISTORY6
-rw-r--r--vdrtva.c15
2 files changed, 14 insertions, 7 deletions
diff --git a/HISTORY b/HISTORY
index 8b61068..bf95633 100644
--- a/HISTORY
+++ b/HISTORY
@@ -91,3 +91,9 @@ VDR Plugin 'vdrtva' Revision History
2013-04-14: Version 0.3.3
- Update patch for VDR 2.0.0.
+
+2013-08-13: Version 0.3.4
+- Add headings to improve readability of daily log report.
+- Add channel name of first event to links file entries.
+- Only add item to a series if it is on the same channel as the original
+ (fix for UK "Channel 5" stable using same series CRID on multiple channels).
diff --git a/vdrtva.c b/vdrtva.c
index 8d61d51..0a12554 100644
--- a/vdrtva.c
+++ b/vdrtva.c
@@ -379,7 +379,7 @@ cString cPluginvdrTva::SVDRPCommand(const char *Command, const char *Option, int
if (Links.MaxNumber() >=1) {
ReplyCode = 250;
for (cLinkItem *linkItem = Links.First(); linkItem; linkItem = Links.Next(linkItem)) {
- reply.Append("%s,%d;%s;%s;%s;%s\n", linkItem->sCRID(), linkItem->ModTime(), linkItem->iCRIDs(), linkItem->Path(), linkItem->Title(), linkItem->channelName());
+ reply.Append("%s;%d;%s;%s;%s;%s\n", linkItem->sCRID(), linkItem->ModTime(), linkItem->iCRIDs(), linkItem->Path(), linkItem->Title(), linkItem->channelName());
}
}
if (reply.Length() > 0) return cString(reply.Buffer());
@@ -580,12 +580,13 @@ void cPluginvdrTva::AddNewEventsToSeries()
cString scrid = cString::sprintf("%s%s", chanDA->DA(),eventCRID->sCRID());
cLinkItem *Item = Links.getLinkItem(scrid);
if (Item != NULL) {
-// Is the event already being recorded? Create a new timer if not.
+// Is the event already being recorded, possibly as part of a different series?
cString icrid = cString::sprintf("%s%s", chanDA->DA(),eventCRID->iCRID());
if (Links.isEventNeeded(icrid)) {
+// Is the event on the same channel as the first event of the series? If so create a new timer.
cChannel *channel = Channels.GetByNumber(eventCRID->Cid());
const cSchedule *schedule = Schedules->GetSchedule(channel);
- if (schedule) {
+ if (schedule && (!Item->channelName() || !strcmp(channel->Name(), Item->channelName()))) {
const cEvent *event = schedule->GetEvent(eventCRID->Eid());
if (CreateTimerFromEvent(event, Item->Path())) {
Links.AddSeriesLink(scrid, event->StartTime(), icrid, NULL, NULL, NULL);
@@ -986,8 +987,8 @@ char mailcmd[256];
fprintf(mail, "From: %s\n", mailfrom);
fprintf(mail, "To: %s\n", mailto);
fprintf(mail, "Subject: vdrTva report\n");
- fprintf(mail, "Content-Type: text/plain; charset=ISO-8859-1\n");
- fprintf(mail, "\n");
+ fprintf(mail, "Content-Type: text/plain; charset=ISO-8859-1\n\n");
+ fprintf(mail, "Activity since last report\n--------------------------\n \n");
fputs(buffer, mail);
pclose(mail);
Clear();
@@ -1392,7 +1393,7 @@ void cLinks::Load()
cReadLine ReadLine;
time_t modtime;
while ((s = ReadLine.Read(f)) != NULL) {
- char *scrid = strtok_r(s, ",", &strtok_next);
+ char *scrid = strtok_r(s, ";,", &strtok_next);
char *mtime = strtok_r(NULL, ";", &strtok_next);
char *icrids = strtok_r(NULL, ";", &strtok_next);
char *path = strtok_r(NULL, ";", &strtok_next);
@@ -1418,7 +1419,7 @@ void cLinks::Save()
FILE *f = fopen(newlinks, "w");
if (f) {
for (cLinkItem *Item = First(); Item; Item = Next(Item)) {
- fprintf(f, "%s,%ld;%s", Item->sCRID(), Item->ModTime(), Item->iCRIDs());
+ fprintf(f, "%s;%ld;%s", Item->sCRID(), Item->ModTime(), Item->iCRIDs());
if (Item->Path()) {
fprintf(f, ";%s", Item->Path());
}