mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Schedules are now cleaned up once every hour (not only at 05:00)
This commit is contained in:
parent
2d5f3497bf
commit
1e121f6eed
1
HISTORY
1
HISTORY
@ -3997,3 +3997,4 @@ Video Disk Recorder Revision History
|
|||||||
now automatically deleted.
|
now automatically deleted.
|
||||||
- Removed an invalid access to Event->schedule in cSchedule::DelEvent().
|
- Removed an invalid access to Event->schedule in cSchedule::DelEvent().
|
||||||
- Modified cSchedule::Cleanup() (events are always sorted by time).
|
- Modified cSchedule::Cleanup() (events are always sorted by time).
|
||||||
|
- Schedules are now cleaned up once every hour (not only at 05:00).
|
||||||
|
5
epg.c
5
epg.c
@ -7,7 +7,7 @@
|
|||||||
* Original version (as used in VDR before 1.3.0) written by
|
* Original version (as used in VDR before 1.3.0) written by
|
||||||
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
|
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
|
||||||
*
|
*
|
||||||
* $Id: epg.c 1.44 2005/12/26 15:09:03 kls Exp $
|
* $Id: epg.c 1.45 2005/12/26 15:10:27 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "epg.h"
|
#include "epg.h"
|
||||||
@ -890,7 +890,7 @@ void cSchedules::Cleanup(bool Force)
|
|||||||
time_t now = time(NULL);
|
time_t now = time(NULL);
|
||||||
struct tm tm_r;
|
struct tm tm_r;
|
||||||
struct tm *ptm = localtime_r(&now, &tm_r);
|
struct tm *ptm = localtime_r(&now, &tm_r);
|
||||||
if (now - lastCleanup > 3600 && ptm->tm_hour == 5) {
|
if (now - lastCleanup > 3600) {
|
||||||
isyslog("cleaning up schedules data");
|
isyslog("cleaning up schedules data");
|
||||||
cSchedulesLock SchedulesLock(true, 1000);
|
cSchedulesLock SchedulesLock(true, 1000);
|
||||||
cSchedules *s = (cSchedules *)Schedules(SchedulesLock);
|
cSchedules *s = (cSchedules *)Schedules(SchedulesLock);
|
||||||
@ -899,6 +899,7 @@ void cSchedules::Cleanup(bool Force)
|
|||||||
p->Cleanup(now);
|
p->Cleanup(now);
|
||||||
}
|
}
|
||||||
lastCleanup = now;
|
lastCleanup = now;
|
||||||
|
if (ptm->tm_hour == 5)
|
||||||
ReportEpgBugFixStats(true);
|
ReportEpgBugFixStats(true);
|
||||||
}
|
}
|
||||||
if (epgDataFileName && now - lastDump > 600) {
|
if (epgDataFileName && now - lastDump > 600) {
|
||||||
|
Loading…
Reference in New Issue
Block a user