mirror of https://github.com/zlatinb/muwire
show piece progress
parent
a16d9ab7f9
commit
1081f4bcd0
|
@ -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"
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue