Closed proninyaroslav closed 5 years ago
Well, I don't quite understand completely the logic inside piece_picker
, but it's my understanding that none of this measures guarantee the sequential download, much less the piece download within the deadline. I never used setPieceDeadline
, only the SEQUENTIAL_DOWNLOAD
flag and not in a critical situation, only as a best effort to preview the file if it's a single file download. (https://github.com/frostwire/frostwire/blob/master/common/src/main/java/com/frostwire/bittorrent/BTDownload.java#L658)
My recommendation is that you post this question that is more on the libtorrent
side there, and whatever the clarification you get, we can sort out some additional support here if needed.
Hi. I'm trying to implement streaming for a user-selected file from the torrent. In this case, other files usually have
NORMAL
priority, and for the selected file, after reading byte and for reading the next bytes portion (if pieces not downloaded) I set pieces priority asSEVEN
and callsetPieceDeadline(1000)
, thereby creating the effect of a consistent and almost uninterrupted download on the HTTP-client side. But this approach does not work and the file download does not succeed sequentially, as if changing the priority toSEVEN
is ignored. This prioritized pieces are not downloaded first. This only works if I set the priority of all files asIGNORE
, except for the selected one. Is it possible to implement a sequential download for the selected file or are there pitfalls about which I know little?