summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonty35 <videosrc@vdr.muc.bieringer.de>2008-12-20 09:16:02 +0100
committermonty35 <videosrc@vdr.muc.bieringer.de>2008-12-20 09:16:02 +0100
commitdabdbe5409bacc56e22461a6a1ff9b736381b158 (patch)
tree177105738f666f9784c865e54702bc717e44c43d
parentc3ea2c9a8171523110b6d33c6be31a36f79f0b36 (diff)
downloadvdr-plugin-tvtv-dabdbe5409bacc56e22461a6a1ff9b736381b158.tar.gz
vdr-plugin-tvtv-dabdbe5409bacc56e22461a6a1ff9b736381b158.tar.bz2
Import patch to 0.3.3p7
-rw-r--r--HISTORY5
-rw-r--r--README19
-rw-r--r--config.h1
-rw-r--r--i18n.c29
-rw-r--r--tvtv.c5
-rw-r--r--update.c30
6 files changed, 75 insertions, 14 deletions
diff --git a/HISTORY b/HISTORY
index 0f26fea..7ec38a4 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,6 +1,11 @@
VDR Plugin 'tvtv' Revision History
-----------------------------------
+2008-11-11: Version 0.3.3p7
+- Create a toggle to control adding of ongoing non-VPS timers ((thx to monty35)
+ Note: if "off", this avoids a restart of a deleted running record/timer on
+ next TVTV update
+
2008-10-28: Version 0.3.3p6
- Minor change to be compatible to 1.6.0
- Fix segfault after manual update
diff --git a/README b/README
index 916c622..6c19201 100644
--- a/README
+++ b/README
@@ -2,9 +2,14 @@ This is a "plugin" for the Video Disk Recorder (VDR).
Written by: Mario Gross <vdr-tvtv-plugin@arcor.de>
(based on Version 0.1.6 created by Gerald Berwolf <genka@vdrportal.de>)
+
+ Further improvements by monty35 <monty35@gmx.de>
Project's homepage: http://home.arcor.de/grossmar
+ Further improvement patches:
+ http://www.vdrportal.de/board/thread.php?threadid=77102
+
See the file COPYING for license information.
@@ -44,10 +49,17 @@ Setup Menu:
Show In Main Menu
Shows entry in main menu to perform update manually
+ Add ongoing non-VPS timers
+ Do not readd (and causing instant start of record)
+ non-VPS timers, if start time is in the past
+
Use VPS
Add timers using VPS if available (only VDR 1.3.5+)
- Use Nature within File Name
+ Format of File Name
+ Select format of file name (Format/Nature/Title) in various
+ combinations
+
Use Station Name within File Name
Nature and/or Station Name are added to the filename as separate
directory.
@@ -57,11 +69,10 @@ Setup Menu:
taken from EPG. This switch decides whether or not the description
coming from TVTV will be added as a comment to info.vdr.
- Time shift bugfix
- Time shift (hrs)
+ Timer update time shift bugfix
Sometimes a timer is wrongly updated due to a bug in the TVTV database.
It is shifted 1 hour (2 hours during daylight saving time) ealier. This can
- be avoided by enabling this fix.
+ be avoided by enabling this fix. "auto" is the recommended setting.
Reload ChannelMap
If channel map is changed it can be reloaded with this command
diff --git a/config.h b/config.h
index a28d2d7..33b9932 100644
--- a/config.h
+++ b/config.h
@@ -42,6 +42,7 @@ public:
char password[30];
int updatetime;
int autoupdate;
+ int AddOngoingNonVpsTimers;
int FormatRecordName;
int usestation;
int show_in_mainmenu;
diff --git a/i18n.c b/i18n.c
index 0dcf6db..3ce2717 100644
--- a/i18n.c
+++ b/i18n.c
@@ -499,6 +499,35 @@ const tI18nPhrase Phrases[] = {
#endif
#endif
},
+ { "Add ongoing non-VPS timers", // English
+ "Laufende nicht-VPS Timers hinzufügen", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "", // Français
+ "", // Norsk
+ "", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Greek
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Català
+#if VDRVERSNUM > 10302
+ "", // Russian
+#if VDRVERSNUM > 10307
+ "", // Hrvatski
+#if VDRVERSNUM > 10313
+ "", // Eesti
+#if VDRVERSNUM > 10316
+ "", // Dansk
+#endif
+#endif
+#endif
+#endif
+ },
{ "manual", // English
"manuell", // Deutsch
"", // Slovenski
diff --git a/tvtv.c b/tvtv.c
index aa4263d..1700950 100644
--- a/tvtv.c
+++ b/tvtv.c
@@ -10,7 +10,7 @@
#include "update.h"
-static const char *VERSION = "0.3.3p6";
+static const char *VERSION = "0.3.3p7";
static const char *DESCRIPTION = "TVTV Timers update";
static const char *MAINMENUENTRY = "TVTV";
@@ -84,6 +84,7 @@ void cMenuSetupTVTV::Setup(void) {
Add(new cMenuEditBoolItem( tr("Auto Update"), &data.autoupdate));
Add(new cMenuEditIntItem( tr("Updatetime (min)"), &data.updatetime));
Add(new cMenuEditBoolItem( tr("Show In Main Menu"), &data.show_in_mainmenu));
+ Add(new cMenuEditBoolItem( tr("Add ongoing non-VPS timers"), &data.AddOngoingNonVpsTimers));
// VPS was introduced with VDR 1.3.5
#if VDRVERSNUM >= 10305
@@ -151,6 +152,7 @@ void cMenuSetupTVTV::Store(void)
SetupStore("UseProxy", TVTVConfig.useproxy);
SetupStore("HTTPProxy", TVTVConfig.httpproxy);
SetupStore("AutoUpdate", TVTVConfig.autoupdate);
+ SetupStore("AddOngoingNonVpstimers", TVTVConfig.AddOngoingNonVpsTimers);
SetupStore("UpdateTime", TVTVConfig.updatetime);
SetupStore("FormatRecordName", TVTVConfig.FormatRecordName);
SetupStore("UseStationInFName", TVTVConfig.usestation);
@@ -295,6 +297,7 @@ bool cPluginTVTV::SetupParse(const char *Name, const char *Value)
else if (!strcasecmp(Name, "UseProxy")) TVTVConfig.useproxy = atoi(Value);
else if (!strcasecmp(Name, "HTTPProxy")) strcpy(TVTVConfig.httpproxy, Value);
else if (!strcasecmp(Name, "AutoUpdate")) TVTVConfig.autoupdate = atoi(Value);
+ else if (!strcasecmp(Name, "AddOngoingNonVpsTimers")) TVTVConfig.AddOngoingNonVpsTimers = atoi(Value);
else if (!strcasecmp(Name, "UpdateTime")) TVTVConfig.updatetime = atoi(Value);
else if (!strcasecmp(Name, "FormatRecordName")) TVTVConfig.FormatRecordName = atoi(Value);
else if (!strcasecmp(Name, "UseStationInFName")) TVTVConfig.usestation = atoi(Value);
diff --git a/update.c b/update.c
index 97f4c3f..a8cbd21 100644
--- a/update.c
+++ b/update.c
@@ -490,13 +490,13 @@ void cUpdate::ProcessImportedFile(const char *sBuffer)
// fix buggy received timezones
timelocal = localtime(&tStartTime);
if (timelocal->tm_gmtoff / 36 != StartTZ) {
- dsyslog("TVTV: buggy timezone in tSTartTime detected: %+04d, fix to: %+04d", StartTZ, (int) (timelocal->tm_gmtoff / 36));
+ dsyslog("TVTV: buggy timezone in tSTartTime detected: %+05d, fix to: %+05d", StartTZ, (int) (timelocal->tm_gmtoff / 36));
StartTZ = timelocal->tm_gmtoff / 36;
};
timelocal = localtime(&tEndTime);
if (timelocal->tm_gmtoff / 36 != EndTZ) {
- dsyslog("TVTV: buggy timezone in tEndTime detected: %+04d, fix to: %+04d", EndTZ, (int) (timelocal->tm_gmtoff / 36));
+ dsyslog("TVTV: buggy timezone in tEndTime detected: %+05d, fix to: %+05d", EndTZ, (int) (timelocal->tm_gmtoff / 36));
EndTZ = timelocal->tm_gmtoff / 36;
};
@@ -506,7 +506,7 @@ void cUpdate::ProcessImportedFile(const char *sBuffer)
if (vps) {
timelocal = localtime(&tVpsTime);
if (timelocal->tm_gmtoff / 36 != VpsTZ) {
- dsyslog("TVTV: buggy timezone in tVpsTime detected: %+04d, fix to: %+04d", VpsTZ, (int) (timelocal->tm_gmtoff / 36));
+ dsyslog("TVTV: buggy timezone in tVpsTime detected: %+05d, fix to: %+05d", VpsTZ, (int) (timelocal->tm_gmtoff / 36));
VpsTZ = timelocal->tm_gmtoff / 36;
};
tVpsTime -= VpsTZ*36;
@@ -733,13 +733,20 @@ void cUpdate::ProcessImportedFile(const char *sBuffer)
vps ? "VPS":"-");
} else { // if (tEndTime < tCurrentTime)
- Timers.Add(oTimer);
-
- if (tStartTime < tCurrentTime) {
- isyslog("TVTV: timer %d notice: StartTime is behind CurrentTime", oTimer->Index() + 1);
- }
+ if ((tStartTime < tCurrentTime) && (vps == false) && (TVTVConfig.AddOngoingNonVpsTimers == 0)) {
+ // Do not add timer entry with start time in the past, if vps is not active
+ isyslog("TVTV: timer NOT added (StartTime in the past & AddOngoingNonVpsTimers=off) (%s) [%s/%s/%d/%04d-%04d/%s]",
+ oTimer->File(),
+ tvtv_timer[DEF_TVTV_SCHEDULE_UID].c_str(),
+ tvtv_timer[DEF_TVTV_SCHEDULE_CHN].c_str(),
+ vps ? (tVps.tm_mday):(tStart.tm_mday),
+ vps ? (tVps.tm_hour * 100 + tVps.tm_min):(tStart.tm_hour * 100 + tStart.tm_min),
+ tEnd.tm_hour * 100 + tEnd.tm_min,
+ vps ? "VPS":"-");
+ } else {
+ Timers.Add(oTimer);
- isyslog("TVTV: timer %d added (%s) [%s/%s/%d/%04d-%04d/%s]", oTimer->Index() + 1,
+ isyslog("TVTV: timer %d added (%s) [%s/%s/%d/%04d-%04d/%s]", oTimer->Index() + 1,
oTimer->File(),
tvtv_timer[DEF_TVTV_SCHEDULE_UID].c_str(),
tvtv_timer[DEF_TVTV_SCHEDULE_CHN].c_str(),
@@ -747,6 +754,11 @@ void cUpdate::ProcessImportedFile(const char *sBuffer)
vps ? (tVps.tm_hour * 100 + tVps.tm_min):(tStart.tm_hour * 100 + tStart.tm_min),
tEnd.tm_hour * 100 + tEnd.tm_min,
vps ? "VPS":"-");
+ if ((tEndTime < tCurrentTime) && (vps == false)) {
+ isyslog("TVTV: timer %d notice: StartTime is behind CurrentTime (AddOngoingNonVpsTimers=on)", oTimer->Index() + 1);
+ };
+
+ }
} // if (tEndTime < tCurrentTime)
}
}