eitd : fix add ExtendedTextCache option

This commit is contained in:
Jacek Jendrzej
2016-04-20 12:54:27 +02:00
parent a918ca56b6
commit 797fd44a35
2 changed files with 5 additions and 1 deletions

View File

@@ -182,6 +182,8 @@ void SIevent::parse(Event &event)
{
int tsidonid = (transport_stream_id << 16) | original_network_id;
time_t start_time = parseDVBtime(event.getStartTimeMjd(), event.getStartTimeBcd());
extern long int secondsExtendedTextCache;
time_t now = time(NULL);
running = event.getRunningStatus();
@@ -226,6 +228,8 @@ void SIevent::parse(Event &event)
}
case EXTENDED_EVENT_DESCRIPTOR:
{
if(now && secondsExtendedTextCache && start_time > now + secondsExtendedTextCache)
continue;
const ExtendedEventDescriptor *d = (ExtendedEventDescriptor*) *dit;
std::string lang = d->getIso639LanguageCode();
std::transform(lang.begin(), lang.end(), lang.begin(), tolower);

View File

@@ -86,7 +86,7 @@ static bool notify_complete = false;
static unsigned int epg_save_frequently;
static long secondsToCache;
static long secondsExtendedTextCache;
long int secondsExtendedTextCache = 0;
static long oldEventsAre;
static int scanning = 1;