Skip to content

Commit

Permalink
fix(jxxghp#2755): remove yield None, handle generator termination on …
Browse files Browse the repository at this point in the history
…error
  • Loading branch information
InfinityPacer committed Sep 27, 2024
1 parent 1add203 commit 5993bfc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/modules/emby/emby.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ def get_items(self, parent: Union[str, int], start_index: int = 0, limit: Option
try:
res = RequestUtils().get_res(url, params)
if not res or res.status_code != 200:
yield None
return None
items = res.json().get("Items") or []
for item in items:
if not item:
Expand Down
2 changes: 1 addition & 1 deletion app/modules/jellyfin/jellyfin.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ def get_items(self, parent: Union[str, int], start_index: int = 0, limit: Option
try:
res = RequestUtils().get_res(url, params)
if not res or res.status_code != 200:
yield None
return None
items = res.json().get("Items") or []
for item in items:
if not item:
Expand Down

0 comments on commit 5993bfc

Please sign in to comment.