Notify completed torrents only if we actually DL'd them
In other words, don't notify completed torrents if all we did was verify data files that were already on disk
This commit is contained in:
parent
15e3e49aa4
commit
ccfed4caa7
1 changed files with 8 additions and 5 deletions
|
|
@ -484,16 +484,19 @@ function addTorrentEvents (torrent) {
|
|||
}
|
||||
|
||||
function torrentDone () {
|
||||
// UPdate the torrent summary
|
||||
// Update the torrent summary
|
||||
var torrentSummary = getTorrentSummary(torrent.infoHash)
|
||||
torrentSummary.status = 'seeding'
|
||||
updateTorrentProgress()
|
||||
|
||||
// Notify the user that a torrent finished
|
||||
if (!state.window.isFocused) {
|
||||
state.dock.badge += 1
|
||||
// Notify the user that a torrent finished, but only if we actually DL'd at least part of it.
|
||||
// Don't notify if we merely finished verifying data files that were already on disk.
|
||||
if (torrent.received > 0) {
|
||||
if (!state.window.isFocused) {
|
||||
state.dock.badge += 1
|
||||
}
|
||||
showDoneNotification(torrent)
|
||||
}
|
||||
showDoneNotification(torrent)
|
||||
|
||||
update()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue