Commit Graph

23 Commits

Author SHA1 Message Date
Michael Manganiello
96699a2f1b fix: Catch ProtocolError when writing screenshots/covers 2024-07-26 21:19:18 -03:00
Michael Manganiello
aced1f1ff2 misc: Migrate IGDBBaseHandler to async
Convert `IGDBBaseHandler` methods to be asynchronous, and use an `httpx`
async client, instead of `requests` sync client.

This change also removes the direct dependency with `requests`, as the
project no longer uses it, preferring `httpx` instead.
2024-07-26 21:19:01 -03:00
Michael Manganiello
56066d6765 misc: Migrate filesystem resource handler to async
For filesystem resource handler, `requests` calls have been replaced
with `httpx`, and file I/O has been replaced with `anyio` utils.

The existing approach to save covers and screenshots, by calling
`shutil.copyfileobj` with the raw response is no longer needed. `httpx`
does not provide a file-like object when streaming [1], so there's no
easy drop-in replacement.

However, the applied solution correctly builds the file iteratively, by
consuming the response in chunks.

[1] https://github.com/encode/httpx/discussions/2296
2024-07-24 00:18:17 -03:00
Georges-Antoine Assi
d05a539871 Fix covers deleted when uploading extension other then PNG 2024-07-14 17:30:05 -04:00
zurdi
884e7a35ac fixed re-download lost covers 2024-07-11 08:47:59 +02:00
zurdi
59c2a51a6f added collection cover management 2024-07-03 14:31:17 +02:00
zurdi
7dfbcc9a0b dinamic ratio for small artwork 2024-06-26 19:37:50 +02:00
zurdi
8de804ff27 redesigned select source on match rom dialog 2024-06-20 13:41:46 +02:00
zurdi
8386625f7f bigger small size cover 2024-06-20 11:36:13 +02:00
Georges-Antoine Assi
057fef7ce9 better error handling when image fetch 503 2024-06-19 23:00:56 -04:00
Georges-Antoine Assi
6e049c1012 can accept nulls 2024-06-19 10:19:00 -04:00
Georges-Antoine Assi
e2c5ba68cb backend tweaks + refactor 2024-06-18 23:21:17 -04:00
zurdi
d02d416f40 generate small version of custom cover 2024-06-18 14:20:49 +02:00
zurdi
84e442c0c5 cover path platform migrated to id 2024-06-18 01:24:19 +02:00
zurdi
851f354e9e fixed from trunk check 2024-06-17 19:11:12 +02:00
Zurdi
242dbb9da5 cover path migration to id 2024-06-17 13:45:35 +02:00
Zurdi
b5383d3cb2 fixed getting 1080p cover from manual search 2024-06-16 18:35:37 +02:00
Georges-Antoine Assi
8ab3aba614 fix trunk issues 2024-06-15 11:43:33 -04:00
Zurdi
cf38949a65 fetch 1080p cover and huge screenshots 2024-06-15 16:58:13 +02:00
Georges-Antoine Assi
b2085f87a8 bunch of fixes for trunk 2024-05-21 17:10:11 -04:00
Georges-Antoine Assi
a7cf0d389a run trunk format on all files 2024-05-21 10:18:13 -04:00
Georges-Antoine Assi
59575416e8 changes from self-review 2024-05-05 17:08:23 -04:00
Georges-Antoine Assi
dc33054ba1 more name refactoring 2024-05-05 16:45:58 -04:00