From: Felix Domke Date: Fri, 3 Feb 2006 21:30:49 +0000 (+0000) Subject: add record margin X-Git-Tag: 2.6.0~4200 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/1963e01e7ffb86fe0e6942d3630222eddf1ebc67 add record margin --- diff --git a/RecordTimer.py b/RecordTimer.py index 1e2aca1d..4cfada5a 100644 --- a/RecordTimer.py +++ b/RecordTimer.py @@ -22,12 +22,15 @@ from ServiceReference import ServiceReference # parses an event, and gives out a (begin, end, name, duration, eit)-tuple. +# begin and end will be corrected def parseEvent(ev): name = ev.getEventName() description = ev.getShortDescription() begin = ev.getBeginTime() end = begin + ev.getDuration() eit = ev.getEventId() + begin -= config.recording.margin_before.value[0] * 60 + end += config.recording.margin_after.value[0] * 60 return (begin, end, name, description, eit) # please do not translate log messages diff --git a/lib/python/Components/RecordingConfig.py b/lib/python/Components/RecordingConfig.py index 99c15a66..1353f18a 100644 --- a/lib/python/Components/RecordingConfig.py +++ b/lib/python/Components/RecordingConfig.py @@ -4,6 +4,6 @@ from enigma import * def InitRecordingConfig(): config.recording = ConfigSubsection(); - config.recording.asktozap = configElement("config.recording.asktozap", configSelection, 1, (("yes", _("yes")), ("no", _("no"))) ); - - + config.recording.asktozap = configElement("config.recording.asktozap", configSelection, 1, (("yes", _("yes")), ("no", _("no"))) ) + config.recording.margin_before = configElement("config.recording.margin_before", configSequence, [0], configsequencearg.get("INTEGER", (0, 30))) + config.recording.margin_after = configElement("config.recording.margin_after", configSequence, [0], configsequencearg.get("INTEGER", (0, 30)))