iView.py crashing on some channels / categories as of early this morning

Issue #95 resolved
foobar created an issue

For example, was crashing on the comedy category or channel ABC2 - culprit seems to be that the carousel key in IviewIndexNode() does not always exist or is bad in some way.

changing it to:

    def fill_children(self):
        info = grab_json(self.url)
        for key in ["carousels", "collections", "index"]:
            if key in info: # <-- added test: does info[key] exist ?
              for collection_list in info[key]:
                  if isinstance(collection_list, dict):
                      for ep_info in collection_list.get("episodes", []):
                          self.add_series(ep_info)

seems to fix things - but I have almost no python skills, so just a kludge here…

Comments (2)

  1. Log in to comment