diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2014-03-09 12:15:08 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2014-03-09 12:15:08 +0100 |
commit | e823560ec53c7209f278fa331b2c0d227ca5529e (patch) | |
tree | 9584f6105f7938eb3474f23c8fe4552c06c43dbb /sources.c | |
parent | ff1422a75a753789633f48c01726324107a237e6 (diff) | |
download | vdr-e823560ec53c7209f278fa331b2c0d227ca5529e.tar.gz vdr-e823560ec53c7209f278fa331b2c0d227ca5529e.tar.bz2 |
Fixed adding new source types in case they are already registered
Diffstat (limited to 'sources.c')
-rw-r--r-- | sources.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: sources.c 2.2 2010/02/28 15:15:39 kls Exp $ + * $Id: sources.c 2.2.1.1 2014/03/09 12:13:25 kls Exp $ */ #include "sources.h" @@ -112,3 +112,12 @@ cSource *cSources::Get(int Code) } return NULL; } + +bool cSources::ContainsSourceType(char SourceType) +{ + for (cSource *p = First(); p; p = Next(p)) { + if (cSource::ToChar(p->Code()) == SourceType) + return true; + } + return false; +} |