Fix file list enabled/disabled logic

* Files that are either 100% downloaded OR streamble should be enabled
* Disabled files should not be clickable

This fixes both bugs.
This commit is contained in:
DC
2016-04-06 02:38:07 -07:00
parent 5022877b04
commit 28c386d916
2 changed files with 3 additions and 2 deletions

View File

@@ -207,10 +207,11 @@ function TorrentList (state) {
// Show a single torrentSummary file in the details view for a single torrent
function renderFileRow (torrentSummary, file, index) {
// First, find out how much of the file we've downloaded
var isDone = file.numPiecesPresent === file.numPieces
var isDone = false
var progress = ''
if (torrentSummary.progress && torrentSummary.progress.files) {
var fileProg = torrentSummary.progress.files[index]
isDone = fileProg.numPiecesPresent === fileProg.numPieces
progress = Math.round(100 * fileProg.numPiecesPresent / fileProg.numPieces) + '%'
}