blob: 4bacf2c8f4cd117819a097291684456dbb289796 (
plain)
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
|
/*
* blacklist.c: Blacklist list item
*
* See the README file for copyright information and how to reach the author.
*
*/
#include "blacklist.h"
/* Global instance */
cEpgfixerList<cBlacklist, cChannel> EpgfixerBlacklists;
bool cBlacklist::Apply(cChannel *Channel)
{
if (enabled && IsActive(Channel->GetChannelID()))
return true;
return false;
}
void cBlacklist::SetFromString(char *s, bool Enabled)
{
Free();
enabled = Enabled;
if (s[0] == '!')
string = strdup(s+1);
else
string = strdup(s);
if (s[0] == '!' || s[0] == '#')
enabled = false;
char *p = (s[0] == '#') ? NULL : s;
if (p) {
char *p = (s[0] == '!') ? s+1 : s;
numchannels = LoadChannelsFromString(p);
}
}
|