Skip to content

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.

2 participants