void-packages/srcpkgs/orion/patches/b7360bbd4a856ea45c770f882be...

33 lines
854 B
Diff

--- a/src/qml/PlayerView.qml
+++ b/src/qml/PlayerView.qml
@@ -128,13 +128,27 @@
function loadAndPlay(){
- if (!streamMap) return
+ if (!streamMap) {
+ console.log("streamMap not available yet");
+ return;
+ }
var description = setWatchingTitle();
var start = !isVod ? -1 : seekBar.value
- var url = streamMap[Settings.quality]
+ var quality = Settings.quality;
+ if (!streamMap.hasOwnProperty(quality)) {
+ console.log("no stream for quality", quality);
+ quality = "source";
+ console.log("using", quality);
+ }
+ var url = streamMap[quality]
+
+ if (url == null) {
+ console.error("did not have a playback url");
+ return;
+ }
console.debug("Loading: ", url)