diff --git a/file.go b/file.go index 94d71a1f..41767e66 100644 --- a/file.go +++ b/file.go @@ -79,6 +79,10 @@ func (f *File) Download() { f.t.DownloadPieces(f.t.torrent.byteRegionPieces(f.offset, f.length)) } +func (f *File) PrioritizeRegion(off, len int64) { + f.t.DownloadPieces(f.t.torrent.byteRegionPieces(f.offset+off, len)) +} + func byteRegionExclusivePieces(off, size, pieceSize int64) (begin, end int) { begin = int((off + pieceSize - 1) / pieceSize) end = int((off + size) / pieceSize)