Skip to content

Commit

Permalink
Prevent None items in cached_categories
Browse files Browse the repository at this point in the history
ARTE TV item of kind External link were mapped to None in cached_categories. Display of cached_categories was failing due to None element.
  • Loading branch information
thomas-ernest committed Dec 26, 2023
1 parent eb426ab commit e0b2eec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion resources/lib/mapper/artecollection.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ def _build_menu(self, json_dict, collection_type, **nav_arg):
# Abstract class should NOT be instantiated
# pylint: disable=assignment-from-none
meta = self._get_page_meta(json_dict)
items = [ArteTvVideoItem(self.plugin, item).map_artetv_item() for item in pages]
items = []
for page_item in pages:
menu_item = ArteTvVideoItem(self.plugin, page_item).map_artetv_item()
if menu_item is not None:
items.append(menu_item)
if meta and meta.get('pages', False):
total_pages = meta.get('pages')
current_page = meta.get('page')
Expand Down

0 comments on commit e0b2eec

Please sign in to comment.