Fixed logging when a timer has entered the VPS margin

This commit is contained in:
Klaus Schmidinger 2024-03-08 10:50:06 +01:00
parent ff16bbd777
commit bc32ffe2f9
2 changed files with 6 additions and 5 deletions

View File

@ -9887,7 +9887,7 @@ Video Disk Recorder Revision History
- Fixed possible duplicate component entries in the info of an ongoing recording
(reported by Christoph Haubrich).
2024-03-06:
2024-03-08:
- Fixed the move assignment operator to check for self-assignment (suggested by
Stefan Herdler).
@ -9908,3 +9908,4 @@ Video Disk Recorder Revision History
- Improved handling present/following data for VPS timers (thanks to Markus Ehrnsperger).
- Logging event status changes now also shows the previous status (thanks to Markus
Ehrnsperger).
- Fixed logging when a timer has entered the VPS margin.

8
vdr.c
View File

@ -22,7 +22,7 @@
*
* The project's page is at http://www.tvdr.de
*
* $Id: vdr.c 5.12 2022/12/19 15:13:56 kls Exp $
* $Id: vdr.c 5.13 2024/03/08 10:50:06 kls Exp $
*/
#include <getopt.h>
@ -1139,10 +1139,8 @@ int main(int argc, char *argv[])
bool NeedsTransponder = false;
if (Timer->HasFlags(tfActive) && !Timer->Recording()) {
if (Timer->HasFlags(tfVps)) {
if (Timer->Matches(Now, true, Setup.VpsMargin)) {
if (Timer->Matches(Now, true, Setup.VpsMargin))
InVpsMargin = true;
Timer->SetInVpsMargin(InVpsMargin);
}
else if (Timer->Event()) {
InVpsMargin = Timer->Event()->StartTime() <= Now && Now < Timer->Event()->EndTime();
NeedsTransponder = Timer->Event()->StartTime() - Now < VPSLOOKAHEADTIME * 3600 && !Timer->Event()->SeenWithin(VPSUPTODATETIME);
@ -1158,6 +1156,8 @@ int main(int argc, char *argv[])
else
NeedsTransponder = Timer->Matches(Now, true, TIMERLOOKAHEADTIME);
}
if (!Timer->Recording())
Timer->SetInVpsMargin(InVpsMargin);
if (NeedsTransponder || InVpsMargin) {
// Find a device that provides the required transponder:
cDevice *Device = cDevice::GetDeviceForTransponder(Timer->Channel(), MINPRIORITY);