diff --git a/manifest.json b/manifest.json index 4510a77..befdd11 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "Force High-Resolution DisneyNOW", "author": "TheBrokenRail", - "version": "1.2", + "version": "1.3", "description": "This browser extension forces DisneyNOW to use their higher-resolution video stream by imitating the Android app. (It also blocks some DisneyNOW ads.)", "homepage_url": "https://gitea.thebrokenrail.com/TheBrokenRail/force-high-resolution-disneynow", "content_scripts": [ diff --git a/src/page.js b/src/page.js index 36007e2..2224593 100644 --- a/src/page.js +++ b/src/page.js @@ -96,7 +96,8 @@ Object.defineProperty(XMLHttpRequest.prototype, 'send', { // Log Video Stream URL this.addEventListener("load", function () { const obj = JSON.parse(this.responseText); - const assetUrl = new URL(obj.video.assets.asset[0].value); + const video = obj.video ? obj.video : obj.channels.channel[0]; + const assetUrl = new URL(video.assets.asset[0].value); console.log('Video Stream URL: ' + assetUrl); });