When player is active, and magnet link is pasted, go back to list

This commit is contained in:
Feross Aboukhadijeh
2016-05-19 18:56:41 -07:00
parent 264c035ef7
commit 5dca89b61c

View File

@@ -213,7 +213,6 @@ function dispatch (action, ...args) {
onOpen(args[0] /* files */)
}
if (action === 'addTorrent') {
backToList()
addTorrent(args[0] /* torrent */)
}
if (action === 'showOpenTorrentFile') {
@@ -620,6 +619,7 @@ function getTorrentSummary (torrentKey) {
// Adds a torrent to the list, starts downloading/seeding. TorrentID can be a
// magnet URI, infohash, or torrent file: https://github.com/feross/webtorrent#clientaddtorrentid-opts-function-ontorrent-torrent-
function addTorrent (torrentId) {
backToList()
var torrentKey = state.nextTorrentKey++
var path = state.saved.downloadPath
if (torrentId.path) {