Skip to content

Commit

Permalink
Merge pull request #143 from dreulavelle/bug/content/update_None_items
Browse files Browse the repository at this point in the history
Avoid [None] if empty content service
  • Loading branch information
Gaisberg authored Jan 18, 2024
2 parents a93050a + 9806366 commit 9547249
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/program/content/mdblist.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def run(self):
items += self._get_items_from_list(
list_id, self.settings.api_key
)
new_items = [item for item in items if item not in self.media_items]
new_items = [item for item in items if item not in self.media_items] or []
container = self.updater.create_items(new_items)
for item in container:
item.set("requested_by", "Mdblist")
Expand Down
2 changes: 1 addition & 1 deletion backend/program/content/overseerr.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def run(self):
"""Fetch media from overseerr and add them to media_items attribute
if they are not already there"""
items = self._get_items_from_overseerr(10000)
new_items = [item for item in items if item not in self.media_items]
new_items = [item for item in items if item not in self.media_items] or []
container = self.updater.create_items(new_items)
for item in container:
item.set("requested_by", "Overseerr")
Expand Down
2 changes: 1 addition & 1 deletion backend/program/content/plex_watchlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def run(self):
"""Fetch media from Plex Watchlist and add them to media_items attribute
if they are not already there"""
items = self._create_unique_list()
new_items = [item for item in items if item not in self.media_items]
new_items = [item for item in items if item not in self.media_items] or []
container = self.updater.create_items(new_items)
for item in container:
item.set("requested_by", "Plex Watchlist")
Expand Down

0 comments on commit 9547249

Please sign in to comment.