diff --git a/medusa/indexers/tvdbv2/tvdbv2_api.py b/medusa/indexers/tvdbv2/tvdbv2_api.py index 50cc84afba..c0f4077fa9 100644 --- a/medusa/indexers/tvdbv2/tvdbv2_api.py +++ b/medusa/indexers/tvdbv2/tvdbv2_api.py @@ -481,9 +481,18 @@ def _parse_images(self, sid): image_attributes = self._object_to_dict(image, key_mapping) bid = image_attributes.pop('id') - if bid not in _images[image_type][resolution]: - _images[image_type][resolution][bid] = {} - base_path = _images[image_type][resolution][bid] + + if image_type in ['season', 'seasonwide']: + sub_key = int(image.sub_key) + if sub_key not in _images[image_type][resolution]: + _images[image_type][resolution][sub_key] = {} + if bid not in _images[image_type][resolution][sub_key]: + _images[image_type][resolution][sub_key][bid] = {} + base_path = _images[image_type][resolution][sub_key][bid] + else: + if bid not in _images[image_type][resolution]: + _images[image_type][resolution][bid] = {} + base_path = _images[image_type][resolution][bid] for k, v in viewitems(image_attributes): if k is None or v is None: