mirror of https://github.com/Kylart/KawAnime.git
Fix bug where file streamed would always be shown when playing local files afterwards
This commit is contained in:
parent
5a8e1b8296
commit
592d29c714
|
@ -22,7 +22,12 @@ function init (event, { link }) {
|
|||
const server = createServer(file)
|
||||
server.listen()
|
||||
|
||||
event.sender.send(events.init.success, { torrent: link, name: file.name, path: file.path, port: server.address().port })
|
||||
event.sender.send(events.init.success, {
|
||||
link,
|
||||
name: file.name,
|
||||
path: file.path,
|
||||
port: server.address().port
|
||||
})
|
||||
})
|
||||
|
||||
// Pause/Resume downloading as needed
|
||||
|
|
|
@ -184,7 +184,8 @@ export default {
|
|||
this.$store.dispatch('streaming/play', {
|
||||
link: this.path,
|
||||
name: this.title,
|
||||
neighbours: null
|
||||
neighbours: null,
|
||||
isTorrent: false
|
||||
})
|
||||
} else {
|
||||
this.$electron.shell.openItem(this.path)
|
||||
|
|
|
@ -16,13 +16,12 @@ export default {
|
|||
}
|
||||
|
||||
const event = eventsList.streaming.init
|
||||
const handler = (e, data) => {
|
||||
|
||||
ipcRenderer.once(event.success, (e, data) => {
|
||||
commit('setPlayer', { ...data, show: true, isTorrent })
|
||||
dispatch('getNeighbours')
|
||||
ipcRenderer.removeListener(event.success, handler)
|
||||
}
|
||||
})
|
||||
|
||||
ipcRenderer.on(event.success, handler)
|
||||
ipcRenderer.send(event.main, opts)
|
||||
},
|
||||
getNeighbours ({ rootState, state, commit, rootGetters }) {
|
||||
|
|
Loading…
Reference in New Issue