From 7ac5dfd828fbcac23817a3a89e7facfe4bbc2932 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sun, 7 Feb 2016 17:15:06 +1100 Subject: [PATCH] Reinstate File.PrioritizeRegion() for backward compatibility --- file.go | 4 ++++ 1 file changed, 4 insertions(+) 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)