Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
hide ETA when done
Browse files Browse the repository at this point in the history
  • Loading branch information
dcposch committed Nov 12, 2016
1 parent c8aece6 commit 440694c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/webtorrent/components/torrentStats.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ class TorrentStats extends React.Component {
}

function renderEta () {
if (torrent.timeRemaining === Infinity) return (<span>-</span>)
if (torrent.timeRemaining === Infinity) return // Zero download speed
if (torrent.downloaded === torrent.length) return // Already done

const rawEta = torrent.timeRemaining / 1000
const hours = Math.floor(rawEta / 3600) % 24
Expand Down

0 comments on commit 440694c

Please sign in to comment.