Commit graph

13 commits

Author SHA1 Message Date
King_DuckZ
5aa42b5e43 Add some more read_ functions to TorrentRead 2025-04-07 01:27:59 +01:00
King_DuckZ
50f33300be Refactor higher level code into TorrentRead class
This also addresses the issue with paths of more than 1 item
so all torrents should now work and adds some error reporting
through exceptions
2025-04-07 01:01:52 +01:00
King_DuckZ
3e2cfb3b37 Allow searching for raw variants
This makes the visitor a little bit more complicated but
it allows client code to fetch raw variants. It is useful when
dealing with arrays and maps, so that client code can decide to
cache the intermediate array or map into a variable and then run
subsequent searches on that variant rather than from the start.
It should make looping a bit less expensive.
2025-04-06 00:57:44 +01:00
King_DuckZ
9fb7dd8537 Attach GPL3+ licence 2025-04-05 20:13:24 +01:00
King_DuckZ
903095c23f Add support for verifying hashes in torrents with multiple files
Directory names are not supported yet so this only works
if all the torrent files exist, are of the correct size and
are directly located in the working directory
2025-04-05 20:04:36 +01:00
King_DuckZ
ca049e5f6f Bug fix in parser when reading large integers 2025-04-05 20:03:24 +01:00
King_DuckZ
72d52860f6 Refactor visitors into separate files
This also includes some small improvements that I don't remember right now
2025-04-05 20:02:17 +01:00
King_DuckZ
365a888511 Hash verification works for torrents with a single file 2025-04-03 01:06:04 +01:00
King_DuckZ
6ef11e3256 Cleanup
Properly add libstriezel as a meson dependency
2025-04-02 23:52:45 +01:00
King_DuckZ
24450dc07d Clean up and simplify code 2025-04-02 23:39:32 +01:00
King_DuckZ
c1f8016f66 Add helper find function
Hash calculation is only correct if the relative path
found in the torrent file is accessible from pwd
2025-04-02 21:30:35 +01:00
King_DuckZ
fc0086b90f More generic implementation for searching nodes 2025-04-02 21:14:56 +01:00
King_DuckZ
3dcfcc7f0c Working proof of concept 2025-04-02 20:41:48 +01:00