OS X: Bounce the Downloads stack when download completes

(If the download is inside the Downloads folder.)
This commit is contained in:
Feross Aboukhadijeh
2016-05-13 12:25:03 -07:00
parent 6589e134b3
commit 290a25c393
2 changed files with 14 additions and 2 deletions

View File

@@ -773,6 +773,7 @@ function torrentDone (torrentKey, torrentInfo) {
state.dock.badge += 1
}
showDoneNotification(torrentSummary)
ipcRenderer.send('downloadFinished', getTorrentPath(torrentSummary))
}
update()
@@ -1018,12 +1019,16 @@ function openTorrentContextMenu (infoHash) {
menu.popup(electron.remote.getCurrentWindow())
}
function showItemInFolder (torrentSummary) {
function getTorrentPath (torrentSummary) {
var itemPath = path.join(torrentSummary.path, torrentSummary.files[0].path)
if (torrentSummary.files.length > 1) {
itemPath = path.dirname(itemPath)
}
ipcRenderer.send('showItemInFolder', itemPath)
return itemPath
}
function showItemInFolder (torrentSummary) {
ipcRenderer.send('showItemInFolder', getTorrentPath(torrentSummary))
}
function saveTorrentFileAs (torrentSummary) {