show piece progress
This commit is contained in:
@@ -140,6 +140,8 @@ class DownloadSession {
|
||||
}
|
||||
|
||||
synchronized int positionInPiece() {
|
||||
if (mapped == null)
|
||||
return 0
|
||||
mapped.position()
|
||||
}
|
||||
}
|
||||
|
@@ -90,6 +90,11 @@ class MainFrameView {
|
||||
int done = row.downloader.donePieces()
|
||||
"$done/$pieces pieces"
|
||||
})
|
||||
closureColumn(header: "Piece", type: String, read: { row ->
|
||||
int position = row.downloader.positionInPiece()
|
||||
int pieceSize = row.downloader.pieceSize // TODO: fix for last piece
|
||||
"$position/$pieceSize bytes"
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user