diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2014-03-09 12:11:32 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2014-03-09 12:11:32 +0100 |
commit | a9f1297022319c97e16f6d904254a6d0bae4442e (patch) | |
tree | 55347962328500afc784946c5e965b0c02871b10 /sources.c | |
parent | f8058586f9d438bfd3c501a3a313a1cc1c30299b (diff) | |
download | vdr-a9f1297022319c97e16f6d904254a6d0bae4442e.tar.gz vdr-a9f1297022319c97e16f6d904254a6d0bae4442e.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 3.5 2013/12/28 11:33:08 kls Exp $ + * $Id: sources.c 3.6 2014/03/09 12:05:42 kls Exp $ */ #include "sources.h" @@ -124,3 +124,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; +} |