diff --git a/scanner/scanner/scanner.py b/scanner/scanner/scanner.py index c1823ac16..773c0b18f 100644 --- a/scanner/scanner/scanner.py +++ b/scanner/scanner/scanner.py @@ -210,7 +210,8 @@ async def post(self, path: str, *, data: dict[str, Any]) -> str: if r.status == 409 and ( (path == "shows" and ret["startAir"][:4] != str(data["start_air"].year)) or ( - path == "movies" and ret["airDate"][:4] != str(data["air_date"].year) + path == "movies" + and ret["airDate"][:4] != str(data["air_date"].year) ) ): logging.info( @@ -224,14 +225,16 @@ async def post(self, path: str, *, data: dict[str, Any]) -> str: async def delete(self, path: str): logging.info("Deleting %s", path) async with self._client.delete( - f"{self._url}/movies?filter=path eq \"{path}\"", headers={"X-API-Key": self._api_key} + f'{self._url}/movies?filter=path eq "{path}"', + headers={"X-API-Key": self._api_key}, ) as r: if not r.ok: logging.error(f"Request error: {await r.text()}") r.raise_for_status() async with self._client.delete( - f"{self._url}/episodes?filter=path eq \"{path}\"", headers={"X-API-Key": self._api_key} + f'{self._url}/episodes?filter=path eq "{path}"', + headers={"X-API-Key": self._api_key}, ) as r: if not r.ok: logging.error(f"Request error: {await r.text()}")