diff --git a/src/renderer/lib/playlist.js b/src/renderer/lib/playlist.js index eb369de1..5afe611c 100644 --- a/src/renderer/lib/playlist.js +++ b/src/renderer/lib/playlist.js @@ -38,7 +38,8 @@ function getPreviousIndex (state) { function getCurrentLocalURL (state) { return state.server - ? state.server.localURL + '/' + state.playing.fileIndex + '/' + encodeURIComponent(state.playing.fileName) + ? state.server.localURL + '/' + state.playing.fileIndex + '/' + + encodeURIComponent(state.playing.fileName) : '' } diff --git a/src/renderer/lib/state.js b/src/renderer/lib/state.js index 4ac7f34a..bfbd1f2b 100644 --- a/src/renderer/lib/state.js +++ b/src/renderer/lib/state.js @@ -88,6 +88,7 @@ function getDefaultPlayState () { return { infoHash: null, /* the info hash of the torrent we're playing */ fileIndex: null, /* the zero-based index within the torrent */ + fileName: null, /* name of the file that is playing */ location: 'local', /* 'local', 'chromecast', 'airplay' */ type: null, /* 'audio' or 'video', could be 'other' if ever support eg streaming to VLC */ currentTime: 0, /* seconds */