alanmcgovern / monotorrent

The official repository for MonoTorrent, a bittorrent library for .NET

Home Page:https://github.com/alanmcgovern/monotorrent

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Help

sl1ms opened this issue · comments

commented

How to remove junk files from torrent downloader?download continues if priority is set to do not install. Simple ?

With the BitTorrent V1 protocol, you can't. 'junk' files must exist somewhere as data is downloaded in blocks which typically span a file boundary.

If the piece size is 512kB and you have two files, one of length 400kB and one of length 624kB, if you want to download the second file you must download all of the first file too. The first 112 bytes of the second file are in piece 0, and the 400kb file is the rest of piece 0.

If the first file were 1GB in size and is marked 'do not download', monotorrent would download at most about 2 pieces worth of data the very start, and the very end of the file. MonoTorrent also creates sparse files on filesystems which support that - which ensures 1GB of drive space won't be reserved for a file which is currently marked as 'do not download'.

Hope that helps!