-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathepghandler.c
More file actions
48 lines (41 loc) · 1.23 KB
/
epghandler.c
File metadata and controls
48 lines (41 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* epghandler.c: EpgHandler
*
* See the README file for copyright information and how to reach the author.
*
*/
#include "blacklist.h"
#include "epgclone.h"
#include "tools.h"
#include "epghandler.h"
#if VDRVERSNUM >= 20304
bool cEpgfixerEpgHandler::BeginSegmentTransfer(const cChannel *Channel, bool Dummy)
{
currentChannel = Channel;
return true;
}
#endif
bool cEpgfixerEpgHandler::FixEpgBugs(cEvent *Event)
{
// Get ChannelID from Event, or use currentChannel as fallback for events without schedule
tChannelID channelID = Event->ChannelID();
if (!channelID.Valid() && currentChannel)
channelID = currentChannel->GetChannelID();
FixOriginalEpgBugs(Event);
FixCharSets(Event, channelID);
StripHTML(Event);
FixBugs(Event, channelID);
return false;
}
bool cEpgfixerEpgHandler::HandleEvent(cEvent *Event)
{
// Get ChannelID from Event, or use currentChannel as fallback for events without schedule
tChannelID channelID = Event->ChannelID();
if (!channelID.Valid() && currentChannel)
channelID = currentChannel->GetChannelID();
return EpgfixerEpgClones.Apply(Event, channelID);
}
bool cEpgfixerEpgHandler::IgnoreChannel(const cChannel *Channel)
{
return EpgfixerBlacklists.Apply((cChannel *)Channel);
}