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:
- "College Football":
- "Conan":
- "Dirk Gently's Holistic Detective Agency":
- series: "Dirk Gently's Holistic Detective Agency"
short: "Dirk Gently"
host: "wavehh.lassitu.de:30080"
proxies:

View file

@ -68,13 +68,13 @@ class Config:
setattr(self, key, y[key])
for show in self.shows:
for key in show:
if isinstance(key, dict):
value = show[key]
if value and 'short' in value:
IncludeShow(key, value['short'])
if isinstance(show, dict):
if 'short' in show and 'series' in show:
IncludeShow(show['series'], show['short'])
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:
IncludeShow(key)