Move sound.play outisde the for loop

This commit is contained in:
Karan Thakkar
2016-10-15 12:38:46 +05:30
committed by Dan Flettre
parent d8c9014471
commit 0c44e10ca7

View File

@@ -133,9 +133,9 @@ module.exports = class TorrentListController {
if (torrentSummary.status === 'downloading') { if (torrentSummary.status === 'downloading') {
torrentSummary.status = 'paused' torrentSummary.status = 'paused'
ipcRenderer.send('wt-stop-torrenting', torrentSummary.infoHash) ipcRenderer.send('wt-stop-torrenting', torrentSummary.infoHash)
sound.play('DISABLE')
} }
}) })
sound.play('DISABLE')
} }
resumeAllTorrents () { resumeAllTorrents () {
@@ -143,9 +143,9 @@ module.exports = class TorrentListController {
if (torrentSummary.status === 'paused') { if (torrentSummary.status === 'paused') {
torrentSummary.status = 'downloading' torrentSummary.status = 'downloading'
this.startTorrentingSummary(torrentSummary.torrentKey) this.startTorrentingSummary(torrentSummary.torrentKey)
sound.play('ENABLE')
} }
}) })
sound.play('ENABLE')
} }
toggleTorrentFile (infoHash, index) { toggleTorrentFile (infoHash, index) {