aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-02-03 21:30:49 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-02-03 21:30:49 +0000
commit1963e01e7ffb86fe0e6942d3630222eddf1ebc67 (patch)
treebfd9f36075fdc822bcc92a91e3b56596650bba29
parent0a23feb1aebe448bd4b063a5fa1253ac40a40503 (diff)
downloadenigma2-1963e01e7ffb86fe0e6942d3630222eddf1ebc67.tar.gz
enigma2-1963e01e7ffb86fe0e6942d3630222eddf1ebc67.zip
add record margin
-rw-r--r--RecordTimer.py3
-rw-r--r--lib/python/Components/RecordingConfig.py6
2 files changed, 6 insertions, 3 deletions
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)))