Fix #167, extra / in plex uri gives no error during backend route check, but fails when playing the video.
This commit is contained in:
parent
f2bb9f69cd
commit
09e19c5d20
@ -52,6 +52,9 @@ class PlexPlayer {
|
||||
throw Error(`Unable to find server "${lineupItem.serverKey}" specied by program.`);
|
||||
}
|
||||
server = server[0];
|
||||
if (server.uri.endsWith("/")) {
|
||||
server.uri = server.uri.slice(0, server.uri.length - 1);
|
||||
}
|
||||
|
||||
try {
|
||||
let plexSettings = db['plex-settings'].find()[0];
|
||||
|
||||
@ -2,8 +2,15 @@ const request = require('request')
|
||||
class Plex {
|
||||
constructor(opts) {
|
||||
this._accessToken = typeof opts.accessToken !== 'undefined' ? opts.accessToken : ''
|
||||
let uri = "http://127.0.0.1:32400";
|
||||
if ( (typeof opts.uri) !== 'undefined' ) {
|
||||
uri = opts.uri;
|
||||
if (uri.endsWith("/")) {
|
||||
uri = uri.slice(0, uri.length - 1);
|
||||
}
|
||||
}
|
||||
this._server = {
|
||||
uri: typeof opts.uri !== 'undefined' ? opts.uri : 'http://127.0.0.1:32400',
|
||||
uri: uri,
|
||||
host: typeof opts.host !== 'undefined' ? opts.host : '127.0.0.1',
|
||||
port: typeof opts.port !== 'undefined' ? opts.port : '32400',
|
||||
protocol: typeof opts.protocol !== 'undefined' ? opts.protocol : 'http'
|
||||
|
||||
@ -62,9 +62,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!--div class="modal-body container list-group list-group-root" vs-repeat="options" dnd-list="content" ng-if="showList()"-->
|
||||
<div class="modal-body container list-group list-group-root filler-list" dnd-list="content" ng-if="showList()" >
|
||||
<div class="modal-body container list-group list-group-root filler-list" vs-repeat="options" dnd-list="content" ng-if="showList()">
|
||||
<div class="list-group-item flex-container" style="cursor: default;" ng-repeat="x in content" dnd-draggable="x" dnd-moved="content.splice($index, 1)" dnd-effect-allowed="move">
|
||||
<div class="program-start" >
|
||||
{{durationString(x.duration)}}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user