Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[breaking] multiple refactorings in preparation for deferring torrent metadata resolution #292

Merged
merged 19 commits into from
Dec 7, 2024

Conversation

ikatson
Copy link
Owner

@ikatson ikatson commented Dec 7, 2024

Full context for what problem is being solved is here: #287

Some torrents don't resolve metadata from magnet links instantly and might take a long time.

The problem with this is that (lib)rqbit's current architecture implies that the torrents persisted in session have metadata fully resolved and always available.

So today the session has no idea of torrents that are "being resolved". The use-case is - we want to be able to add a torrent to a session, and let it resolve the metadata in background.

There are 2 conceptual ways to address that:

  1. Store "resolving" torrents completely separately from the the resolved ones. Then merge them together in UI, API, etc.
  2. Update the current data model to support the new states and null-ness of metadata.

This PR prepares the code for the 2nd approach. Also some refactorings to increase maintainability of "add_torrent" and "start_torrent" code.

@ikatson ikatson merged commit b9f949c into main Dec 7, 2024
5 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