Skip to content

method for getting webseed url, bugfix v1 single-file torrent creation#8

Merged
sneakers-the-rat merged 3 commits intomainfrom
webseeds-full-path
Aug 5, 2025
Merged

method for getting webseed url, bugfix v1 single-file torrent creation#8
sneakers-the-rat merged 3 commits intomainfrom
webseeds-full-path

Conversation

@sneakers-the-rat
Copy link
Contributor

@sneakers-the-rat sneakers-the-rat commented Aug 5, 2025

By the time we have piece ranges, we don't know about the torrent info.name field anymore, so we can't construct URLs accurately.

Give that responsibility to the relevant piece range classes, giving them a webseed_url method that can be used to get the full url to request from some url that's used as a webseed.

so e.g. for a multi-file torrent named my_torrent with a file a.exe, a webseed given as https://example.com/data/ should have the file stored at https://example.com/data/my_torrent/a.exe

this also fixes v1-only single file torrents (a rare and discouraged case) which improperly added the metadata to the files list, rather than just having name and length.


📚 Documentation preview 📚: https://torrent-models--8.org.readthedocs.build/en/8/

@sneakers-the-rat sneakers-the-rat merged commit c68d96c into main Aug 5, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant