startStreaming should always return a map
This commit is contained in:
parent
8227427834
commit
0a81b43f1d
1 changed files with 3 additions and 3 deletions
|
@ -135,7 +135,7 @@ $(document).ready(function() {
|
||||||
if (media.startsWith('magnet:?')) {
|
if (media.startsWith('magnet:?')) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
startStreamingTorrent(media)
|
startStreamingTorrent(media)
|
||||||
.then((url) => { resolve(url); })
|
.then((url) => { resolve({'url':url}); })
|
||||||
.catch((error) => { reject(error); });
|
.catch((error) => { reject(error); });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -241,8 +241,8 @@ $(document).ready(function() {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
startStreaming(resource, subtitles).then((url) => {
|
startStreaming(resource, subtitles).then((response) => {
|
||||||
requestArgs.args.resource = url;
|
requestArgs.args.resource = response.url;
|
||||||
// XXX subtitles currently break the Chromecast playback,
|
// XXX subtitles currently break the Chromecast playback,
|
||||||
// see https://github.com/balloob/pychromecast/issues/74
|
// see https://github.com/balloob/pychromecast/issues/74
|
||||||
// if (response.subtitles) {
|
// if (response.subtitles) {
|
||||||
|
|
Loading…
Reference in a new issue