Skip to content

What is the best way to determine if a download has completed? #895

Answered by anacrolix
kslr asked this question in Q&A
Discussion options

You must be logged in to vote

My strategy for thumbnails is to provide the file as an input over HTTP, and let it use the streaming support in anacrolix/torrent to just fetch what it needs. It typically results in thumbnails appearing long before file is completely downloaded.

Here's the implementation I use: https://github.com/anacrolix/webtorrent-public/blob/master/services/poster.go.

See how it's done in https://www.coveapp.info/ for a demo.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kslr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants