From afd3b84b406921ecee049c8aeb0d7dc55bdaa76d Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Thu, 15 Aug 2019 13:10:39 -0700 Subject: [PATCH] Fixes for PR #1648 --- src/renderer/lib/playlist.js | 3 ++- src/renderer/lib/state.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/renderer/lib/playlist.js b/src/renderer/lib/playlist.js index eb369de164..5afe611c28 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 4ac7f34ae0..bfbd1f2b00 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 */