-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(torrent): improve get_files() fields handling
This commit fixes the following issues with `Torrent.get_files()`: If Client.get_torrent() was called with "files" not in `arguments`, then `get_files()` returns an empty list. This is surprising - it should raise an error instead. If Client.get_torrent() was called with arguments=["files"], get_files() fails because it expects to find `properties` and `wanted`, which were not requested. For efficiency we should not force users to request fields they don't need, so leave these unset in this case.
- Loading branch information
Showing
3 changed files
with
18 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters