Fixed restarting the EPG scan and keeping the frequency of calls to Device->SetPowerSaveIfUnused() low

This commit is contained in:
Klaus Schmidinger 2024-07-13 20:12:24 +02:00
parent 6bbb596968
commit d919817c35
2 changed files with 8 additions and 5 deletions

View File

@ -9947,3 +9947,5 @@ Video Disk Recorder Revision History
- Fixed handling of cSkinDisplayMenu::GetTextAreaFont() (reported by Matthias Senzel). - Fixed handling of cSkinDisplayMenu::GetTextAreaFont() (reported by Matthias Senzel).
- Fixed a timeout in cDvbDevice while tuning after the frontend has been reopened. - Fixed a timeout in cDvbDevice while tuning after the frontend has been reopened.
- Fixed setting the editable width in the LCARS skin (reported by Matthias Senzel). - Fixed setting the editable width in the LCARS skin (reported by Matthias Senzel).
- Fixed restarting the EPG scan and keeping the frequency of calls to
Device->SetPowerSaveIfUnused() low.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: eitscan.c 5.6 2024/07/06 11:19:21 kls Exp $ * $Id: eitscan.c 5.7 2024/07/13 20:12:24 kls Exp $
*/ */
#include "eitscan.h" #include "eitscan.h"
@ -152,11 +152,12 @@ void cEITScanner::Process(void)
paused = true; paused = true;
} }
// Allow unused devices to go into power save mode: // Allow unused devices to go into power save mode:
for (int i = 0; i < cDevice::NumDevices(); i++) { if ((now - lastScan) % 10 == 0) { // let's not do this too often
if (cDevice *Device = cDevice::GetDevice(i)) for (int i = 0; i < cDevice::NumDevices(); i++) {
Device->SetPowerSaveIfUnused(); if (cDevice *Device = cDevice::GetDevice(i))
Device->SetPowerSaveIfUnused();
}
} }
lastScan = time(NULL); // let's not do this too often
return; // pause for Setup.EPGScanTimeout hours return; // pause for Setup.EPGScanTimeout hours
} }
else if (paused) { else if (paused) {