diff options
author | Matti Lehtimäki <matti.lehtimaki@gmail.com> | 2012-05-12 14:42:01 +0300 |
---|---|---|
committer | Matti Lehtimäki <matti.lehtimaki@gmail.com> | 2012-05-12 14:42:01 +0300 |
commit | 6b488dcedf24cf9b4890505eba992d683eedecac (patch) | |
tree | 51347d76c4b2891568e54348d9ce0ab99304bd0b /blacklist.c | |
parent | 548e0a6bc35d4c776039f7467c0d67eabf9ef46a (diff) | |
download | vdr-plugin-epgfixer-6b488dcedf24cf9b4890505eba992d683eedecac.tar.gz vdr-plugin-epgfixer-6b488dcedf24cf9b4890505eba992d683eedecac.tar.bz2 |
Support for ignoring and copying EPG data. Bug fixes.
Fix character set conversion for selected channels. Fix and improve Makefile (thanks to Ville Skyttä and Rolf Ahrenberg). Fix compiling with g++-4.7.
Diffstat (limited to 'blacklist.c')
-rw-r--r-- | blacklist.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/blacklist.c b/blacklist.c new file mode 100644 index 0000000..4bacf2c --- /dev/null +++ b/blacklist.c @@ -0,0 +1,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); + } +} |