lbryio / lbry-sdk

The LBRY SDK for building decentralized, censorship resistant, monetized, digital content apps.
https://lbry.com
MIT License
7.19k stars 484 forks source link

Investigate resuming BitTorrent client development #3629

Closed kauffj closed 1 year ago

kauffj commented 2 years ago

1 - What's the status of existing code? 2 - What would be necessary to ship an SDK (and Desktop release) that would offer torrent support for downloads only? What about streaming?

shyba commented 2 years ago

1- Running from latest source: lbrynet get bigbuckbunny-torrent1 results in:

2022-07-08 02:26:34,669 INFO     lbry.file.file_manager:214: starting download for bigbuckbunny-torrent1
2022-07-08 02:26:35,137 INFO     lbry.torrent.session:182: torrent alert: added torrent: dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c
2022-07-08 02:26:36,991 INFO     lbry.torrent.session:101: Metadata completed for btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c - Big Buck Bunny
2022-07-08 02:27:03,563 INFO     lbry.file.file_manager:135: claim contains a metadata only update to a stream we have
2022-07-08 02:27:03,569 INFO     lbry.file.file_manager:166: already have stream for bigbuckbunny-torrent1
2022-07-08 02:27:03,570 INFO     lbry.torrent.session:101: Metadata completed for btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c - Big Buck Bunny
2022-07-08 02:27:04,175 INFO     lbry.torrent.session:182: torrent alert: added torrent: dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c

plays fine.

None of the binaries include support for it as they do not ship with libtorrent. This issue comment points to other places where libtorrent is used with python and pure python implementations of a simple downloader.

2 - Streaming can be achieved by either:

The main missing thing at the moment is building and shipping libtorrent with bindings properly across all supported platforms. That requires some work but is definitely doable as many projects are shipped this way. In the long term, having better bindings or a pure python lib is ideal.

Does support for downloads only include the ability to create claims with BT infohashes?