Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/stowarr/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import time
from collections.abc import Callable
from typing import Any
from urllib.error import HTTPError

from .config import Service
from .http import JsonClient
Expand Down Expand Up @@ -86,7 +87,13 @@ def download_mapping(self, download_id: str) -> dict | None:
return None
item_id = next(iter(item_ids))
endpoint = "movie" if self.kind == "radarr" else "series"
item = self.http.request("GET", f"/api/v3/{endpoint}/{item_id}")
try:
item = self.http.request("GET", f"/api/v3/{endpoint}/{item_id}")
except HTTPError as error:
if error.code != 404:
raise
error.close()
return None
if self.kind == "radarr":
movie_file = item.get("movieFile")
files = [] if not movie_file else [{
Expand Down
Loading
Loading