diff --git a/config.yaml b/config.yaml index 4bc6b02..1659f0a 100644 --- a/config.yaml +++ b/config.yaml @@ -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: diff --git a/tivomirror.py b/tivomirror.py index 5912b06..36c278c 100755 --- a/tivomirror.py +++ b/tivomirror.py @@ -68,15 +68,15 @@ 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']) - else: - IncludeShow(key) + 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) def __repr__(self): return "Config options for tivomirror (singleton)"