Fix complex entries for shows

This commit is contained in:
Stefan Bethke 2017-07-27 23:00:00 +02:00
parent 2f1b232023
commit 1f508f9b27
2 changed files with 9 additions and 9 deletions

View file

@ -2,7 +2,7 @@
shows: shows:
- "College Football": - "College Football":
- "Conan": - "Conan":
- "Dirk Gently's Holistic Detective Agency": - series: "Dirk Gently's Holistic Detective Agency"
short: "Dirk Gently" short: "Dirk Gently"
host: "wavehh.lassitu.de:30080" host: "wavehh.lassitu.de:30080"
proxies: proxies:

View file

@ -68,13 +68,13 @@ class Config:
setattr(self, key, y[key]) setattr(self, key, y[key])
for show in self.shows: for show in self.shows:
for key in show: if isinstance(show, dict):
if isinstance(key, dict): if 'short' in show and 'series' in show:
value = show[key] IncludeShow(show['series'], show['short'])
if value and 'short' in value:
IncludeShow(key, value['short'])
else: else:
IncludeShow(key) logger.error("Need either a string or a dict with 'series' and 'short' entries for a show, got \"{}\".".format\
(show))
sys.exit(1)
else: else:
IncludeShow(key) IncludeShow(key)