import store from '../store'
const {ipcRenderer} = require('electron')

ipcRenderer.on('updateSongs', (event, args) => {
  store.dispatch('addSongs', args)
})

ipcRenderer.on('canPlay', (event, args) => {
  console.log('play file' + args)
  // store.commit('updateTorrentId', args[0])
  store.commit('updateSongIndex', args)
})

@@ -199,16 +199,19 @@
 ) =%3E %7B%0A 
+ //
  console
@@ -236,19 +236,16 @@
  args)%0A 
- //
  store.c
@@ -312,17 +312,59 @@
 Index', args
+%5B1%5D)%0A  store.commit('updateTitle', args%5B2%5D
 )%0A%7D)%0A

update store commits with torrent id for audio.onended event