You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a couple of improvements that I would like to suggest.
The first is that the margin before/after recording (padding time) is
saved in the RecordTimerEntry when an instance is created. This would
mean that whenever a timer's runtime needs to be compared to an EPG
entry or looked up in the EPG (e.g. in AutoTimer.timeSimilarityPercent()
or RecordTimer.RecordTimerEntry.getEventFromEPG()), the actual event
time is used rather than the padded time. The code that calls
AutoTimer.timeSimilarityPercent() adjusts for padding, but if the
AutoTimer doesn't specify ts own padding, it uses the current padding
values, not the values used to create the timer.
There are a couple of bugs in a plugin for an online EPG/recording
setting service used in the Beyonwiz version of enigma2 that can only be
fixed correctly if the correct padding values are known.
These bugs may be more of a problem in Australia than in Europe, because
some Australian broadcasters do not keep accurately to their published
schedule. The after-recording margin typically needs to be 25-30 minutes
in Australia. This is often longer than some programs (especially
children's programs), and it means that if an EPG lookup is done on
(timerStart+timerEnd)/2, the time looked up can be for the wrong program.
I know that this is a change that affects much more than just
AutoTimers. I suggest that it it were to be implemented,
RecordTimerEntry.begin and RecordTimerEntry.end should keep their
current meanings, and two additional attributes,
RecordTimerEntry.margin_before and RecordTimerEntry.margin_after should
be added.
The second suggestion is a more compact implementation for
AutoTimer.timeSimilarityPercent():
Instead of:
|def timeSimilarityPercent(rtimer, evtBegin, evtEnd, timer=None): ... if
(rtimerBegin <= evtBegin) and (evtEnd <= rtimerEnd): commonTime = evtEnd
I have a couple of improvements that I would like to suggest.
The first is that the margin before/after recording (padding time) is
saved in the RecordTimerEntry when an instance is created. This would
mean that whenever a timer's runtime needs to be compared to an EPG
entry or looked up in the EPG (e.g. in AutoTimer.timeSimilarityPercent()
or RecordTimer.RecordTimerEntry.getEventFromEPG()), the actual event
time is used rather than the padded time. The code that calls
AutoTimer.timeSimilarityPercent() adjusts for padding, but if the
AutoTimer doesn't specify ts own padding, it uses the current padding
values, not the values used to create the timer.
There are a couple of bugs in a plugin for an online EPG/recording
setting service used in the Beyonwiz version of enigma2 that can only be
fixed correctly if the correct padding values are known.
These bugs may be more of a problem in Australia than in Europe, because
some Australian broadcasters do not keep accurately to their published
schedule. The after-recording margin typically needs to be 25-30 minutes
in Australia. This is often longer than some programs (especially
children's programs), and it means that if an EPG lookup is done on
(timerStart+timerEnd)/2, the time looked up can be for the wrong program.
I know that this is a change that affects much more than just
AutoTimers. I suggest that it it were to be implemented,
RecordTimerEntry.begin and RecordTimerEntry.end should keep their
current meanings, and two additional attributes,
RecordTimerEntry.margin_before and RecordTimerEntry.margin_after should
be added.
The second suggestion is a more compact implementation for
AutoTimer.timeSimilarityPercent():
Instead of:
|def timeSimilarityPercent(rtimer, evtBegin, evtEnd, timer=None): ... if
(rtimerBegin <= evtBegin) and (evtEnd <= rtimerEnd): commonTime = evtEnd
commonTime = rtimerEnd - rtimerBegin elif evtBegin <= rtimerBegin <=
evtEnd: commonTime = evtEnd - rtimerBegin elif rtimerBegin <= evtBegin
<= rtimerEnd: commonTime = rtimerEnd - evtBegin else: commonTime = 0 |||
use:
|def timeSimilarityPercent(rtimer, evtBegin, evtEnd, timer=None): ...
commonTime = max(min(evtEnd, rtimerEnd) - max(evtBegin, rtimerBegin), 0)|
Possibly also allow for negative values for |timeSimilarityPercent()|
when there is no overlap by removing|max(..., 0)|. from the expression,, so:
|commonTime = min(evtEnd, rtimerEnd) - max(evtBegin, rtimerBegin)|
The text was updated successfully, but these errors were encountered: