Merge pull request #1648 from hicom150/pass_title_metadata

Pass title metadata in media url
This commit is contained in:
Feross Aboukhadijeh
2019-08-15 13:08:59 -07:00
committed by GitHub
2 changed files with 2 additions and 1 deletions

View File

@@ -269,6 +269,7 @@ module.exports = class PlaybackController {
// update state
state.playing.infoHash = infoHash
state.playing.fileIndex = index
state.playing.fileName = fileSummary.name
state.playing.type = TorrentPlayer.isVideo(fileSummary) ? 'video'
: TorrentPlayer.isAudio(fileSummary) ? 'audio'
: 'other'

View File

@@ -38,7 +38,7 @@ function getPreviousIndex (state) {
function getCurrentLocalURL (state) {
return state.server
? state.server.localURL + '/' + state.playing.fileIndex
? state.server.localURL + '/' + state.playing.fileIndex + '/' + encodeURIComponent(state.playing.fileName)
: ''
}