Fix complex entries for shows
This commit is contained in:
parent
2f1b232023
commit
1f508f9b27
2 changed files with 9 additions and 9 deletions
|
@ -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:
|
||||||
|
|
|
@ -68,15 +68,15 @@ 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:
|
|
||||||
IncludeShow(key)
|
|
||||||
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:
|
||||||
|
IncludeShow(key)
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "Config options for tivomirror (singleton)"
|
return "Config options for tivomirror (singleton)"
|
||||||
|
|
Loading…
Reference in a new issue