Commit Graph

14 Commits

Author SHA1 Message Date
Ryszard Knop
06f75d4996 Guess the decompressed file size for downloaded Zip/Tar archives
For some archives, the Itch API returns the expected decompressed file
size, but serves compressed archives with its content. Iterate over Zip
and Tar archives to get the expected decompressed file size. In case
there's anything wrong with the archives, just quietly ignore these.

Fixes #21
2024-11-08 22:01:33 +01:00
Ryszard Knop
e6b4428e22 Don't crash when trying to download restricted title pages
While we currently can't handle them properly, this at least lets full
library downloads proceed to the end.
2024-04-17 19:10:14 +02:00
Ryszard Knop
2a18cea131 Reformat the codebase with Ruff 2024-03-17 01:19:03 +01:00
Ryszard Knop
25ace8f358 Add Ruff linting configs, fix reported warnings 2024-03-17 01:15:04 +01:00
Ryszard Knop
21d675f33f Report notes if available, regardless of success 2024-03-17 00:25:02 +01:00
Ryszard Knop
e61ef0cba3 Force use UTF-8 end-to-end for site downloading
Itch always uses UTF-8. This change prevents garbled output with
non-Latin scripts if requests or BS4 does not guess that correctly.
2023-01-29 15:22:24 +01:00
Ryszard Knop
90346f579a Bump to 0.3.0, bump deps, misc cleanups and type corrections
Some of the misc issues were found with mypy. Not adding it to dev deps
for now as it complains about missing types in libraries and does not
honor noqa where we need it (non-literal TypedDict keys).
2022-06-12 19:31:25 +02:00
Ryszard Knop
4542057654 Add a Settings system
Allows permanently configuring itch-dl with an API key and other things
in the future. Adds a new dependency, Pydantic, to validate the config.
2022-06-12 19:28:31 +02:00
Ryszard Knop
611fec5a74 Handle files of unknown size as well
Some uploads contain no 'size' in their metadata, despite being hosted
on Itch.io infra. Download these as well.
2022-05-30 22:42:48 +02:00
Ryszard Knop
008e6870e8 Implement infobox parsing, misc bugfixes, version bump 2022-05-15 20:10:32 +02:00
Ryszard Knop
f5c0f4658d Implement screenshot/cover art downloads, initial infobox parsing 2022-05-15 18:51:13 +02:00
Ryszard Knop
8a6bed69f4 Make error handling saner 2022-05-15 17:19:34 +02:00
Ryszard Knop
bf8a695521 File and site downloads are back 2022-05-15 16:38:31 +02:00
Ryszard Knop
4a8f88b48e Trial The Third: Start rewriting the thing
Wooo, someone wants to use this! Let's make it less embarrassing.
2022-05-15 02:02:45 +02:00