eitd : fix add ExtendedTextCache option

Origin commit data
------------------
Branch: ni/coolstream
Commit: 797fd44a35
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2016-04-20 (Wed, 20 Apr 2016)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2016-04-20 12:54:27 +02:00
parent c33b5aad44
commit f24c9ce73c
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);