Fix magnet link progress bug

This commit is contained in:
DC
2016-03-23 05:10:32 -07:00
parent 74829a6239
commit 73d5a4e1ab

View File

@@ -512,7 +512,7 @@ function updateTorrentProgress () {
var changed = false
state.client.torrents.forEach(function (torrent) {
var torrentSummary = getTorrentSummary(torrent.infoHash)
if (!torrentSummary) return
if (!torrentSummary || !torrent.files) return
torrent.files.forEach(function (file, index) {
var numPieces = file._endPiece - file._startPiece + 1
var numPiecesPresent = 0