Paco8 / plugin.video.skyott

Skyshowtime addon for Kodi
GNU General Public License v2.0
22 stars 7 forks source link

Video content playback problem. #12

Closed praspp closed 7 months ago

praspp commented 1 year ago

Hi, I have a Skyshowtime subscription paid for in Romania. I am logging in to the plugin in Poland. Signing in with the skyshowtime.key file works fine. The plugin displays user profiles, folder structure with content, but does not show the content in the "My List" folder. In addition, plugin.video.skyott v.0.3.0 does not play any movie or series. Kodi shows "Missing mandatory data: X-SkyOTT-UserToken". Token obtained using the SkyExtractCookie (Windows) or SkyExtractCookieAndroid (Fire OS) application. I attach the log. skyshowtime_debug.txt Checked on: Fire TV Cube 2gn., Fire OS 7.2.4.2, Kodi 19.5, Widevine L1, MS PlayReady DRM 3.0.0.416 Fire TV Stick 4K, Fire OS 6.2.8.1, Kodi 20.1, Widevine L1, MS PlayReady DRM 3.0.0.416

Paco8 commented 1 year ago

It fails to get the user token: {'errorCode': 'OVP_00027', 'description': 'Invalid provider/proposition supplied'} The provider and proposition for Skyshowtime is "SKYSHOWTIME". Maybe in Romania it uses a different value?

Try the following package. It won't fix the problem but it will provide more info in the log. Send the log afterwards.

plugin.video.skyott-0.3.0-3.zip

praspp commented 1 year ago

@Paco8 I have installed plugin.video.skyott-0.3.0-3. Plug-in does not start. Below log. kodi.log

rockshelter commented 1 year ago

I just logged-in to Github and was about to post about this same issue. (Version 0.3.0 from repo)

For context, I was using the plugin in my home country for the past week without issues.

Now, I'm trying it in Germany and I'm seeing the exact same thing as @praspp . I tried to login with the original cookie I got in my home country as well as a new cookie I just extracted from the browser under this new IP. All profiles are displayed, but nothing under "Continue Watching", "Movies", "Shows", etc.

Seems like it's a problem with EU-Roaming not working correctly ? It should hopefully be easy to spot if you VPN to a different EU country and see what changes... The official apps and website do work over here.

Paco8 commented 1 year ago

I tried using an IP from Germany but it still works fine for me, I got the user token. Can you see, using the Chrome devtools, what's the payload when loading the url https://ovp.skyshowtime.com/auth/tokens?

rockshelter commented 1 year ago

Thanks for answering ! I see two POSTs for that URL 1) {"auth":{"authScheme":"MESSO","authIssuer":"NOWTV","provider":"SKYSHOWTIME","providerTerritory":"PT","proposition":"SKYSHOWTIME"},"device":{"type":"COMPUTER","platform":"PC"}}

2) {"auth":{"authScheme":"MESSO","authIssuer":"NOWTV","provider":"SKYSHOWTIME","providerTerritory":"PT","proposition":"SKYSHOWTIME","personaId":"xyzxyz"},"device":{"type":"COMPUTER","platform":"PC","id":"abcdefg","drmDeviceId":"UNKNOWN"}}

(overwritten "personaId" and "id", just in case)

rockshelter commented 1 year ago

Quickly going through the Kodi log now, seems like it's exactly what @praspp is experiencing ?

2023-04-23 23:19:03.037 T:16344 debug : [plugin.video.skyott] platform_id: skyshowtime 2023-04-23 23:19:03.337 T:16344 debug : [plugin.video.skyott] get_tokens: data: {'errorCode': 'OVP_00027', 'description': 'Invalid provider/proposition supplied'} 2023-04-23 23:19:03.339 T:16344 debug : [plugin.video.skyott] Cleaning cache. 0 files removed. 2023-04-23 23:19:03.340 T:16344 debug : [plugin.video.skyott] params: {'action': 'category', 'name': 'TV Shows', 'slug': '/entertainment/highlights'} 2023-04-23 23:19:03.341 T:16344 debug : [plugin.video.skyott] https://web.clients.skyshowtime.com/bff/sections/v1?partition_id=no-partition&template=sections&segment=all_premium_users&slug=/entertainment/highlights 2023-04-23 23:19:03.813 T:16344 error : EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--

Paco8 commented 1 year ago

Ok, I need to know the data that the addon is sending. Try this package and send the log.

plugin.video.skyott-0.3.0-4.zip

praspp commented 1 year ago

Ok, I need to know the data that the addon is sending. Try this package and send the log.

plugin.video.skyott-0.3.0-4.zip

Here is log:

P.S. Playback in original Skyshowtime app for Fire OS, Android TV (Polish IP) works fine.

Paco8 commented 1 year ago

If I use the payload from your log I also get the "Invalid provider/proposition supplied". I think the problem is in the providerTerritory value. If I change PL to ES (I'm in Spain) it works. If I use another country (PT, NL, BG... and so on) I get the error. So I guess it's only valid to use your home country under providerTerritory.

Could you tell me the content of the file userdata/addon_data/plugin.video.skyott/skyshowtime/localisation.json?

praspp commented 1 year ago

Localization.json file content: localisation.json.txt

Paco8 commented 1 year ago

Your subscription is from Romania, isn't it? If you change in that file PL with RO, does it work?

praspp commented 1 year ago

After changing the localisation.json file from: "x-skyott-territory": "PL" on "x-skyott-territory": "RO" playing movies and series started working. The contents of the "My List" folder are now visible.

praspp commented 1 year ago

@Paco8 It would be a good idea to enter "Subscription Country" in the plugin settings, which will change the "x-skyott-territory" parameter in the localization.json file. It takes a very long time to start playing a movie or a TV series episode ~60s. Can you improve it? Thank you for your work.

Paco8 commented 1 year ago

In order to start playback as soon as possible:

praspp commented 1 year ago

Ok, now videos start faster. What about the "Subscription Country" setting, can you implement?

Paco8 commented 1 year ago

I've just added that option in version 0.3.1.

praspp commented 1 year ago

After entering the subscription country code (RO), the v.0.3.1 plugin does not work properly. Video playback ends with an error. Video content is visible in folders. This setting does not change the "x-skyott-territory" parameter in the localization.json file [userdata/addon_data/plugin.video.skyott/skyshowtime/localisation.json]. After manually editing the localization.json file, playback starts to work.

Paco8 commented 1 year ago

What error do you get after playback?

praspp commented 1 year ago

"errorCode":"OVP_00012","description":"Access from this country is restricted: [location: PL, home territory: RO, user EU portability: disabled, channel EU portability: enabled]"

Paco8 commented 1 year ago

What changes did you make in localisation.json? Did you change x-skyott-activeterritory as well?

praspp commented 1 year ago

I changed in localization.json file from "x-skyott-territory": "PL" on "x-skyott-territory": "RO" I didn't change the "PL" parameter for "x-skyott-activeterritory" Contents of localization.json file after changes: localisation.json.txt

Paco8 commented 1 year ago

Could you test if this version works correctly for you?

plugin.video.skyott-0.3.1-2.zip

praspp commented 1 year ago

plugin.video.skyott-0.3.1-2 works fine. The content is available. Video playback works. Thank you. I close the issue.

rockshelter commented 1 year ago

Apologies that I haven't been around to provide logs, I don't have access to the device throughout the day. This doesn't seem to work on my end, I'm afraid.

Here's what I did:

My localisation.json weirdly looks like this now: {"headers": {"x-skyott-territory": "XX", "x-skyott-activeterritory": "XX", "x-skyott-language": "en-US"}, "territoryAvailabilityStatus": "UNAVAILABLE"}

I wonder @praspp if you were to start from scratch too, would it work on your end?

@Paco8 , log attached , with some values redacted. kodi_redacted.log.txt

praspp commented 1 year ago

@samukas I followed the procedure described by you. I have a subscription purchased in Romania. I am logging in in Poland. plugin.video.syott-0.3.2 works fine. The content is available. Video playback works.

rockshelter commented 1 year ago

Oh well, there goes my theory then. I appreciate you checking it !

@Paco8 , I also gave it a try getting the cookie with the Android APK and not via Chrome, but I'm getting the same result.

praspp commented 1 year ago

@samukas Do you use a VPN for Skyshowtime in Germany?

Paco8 commented 1 year ago

@samukas can you play using a web browser? I can't even log in using a IP from Germany, it says that Skyshowtime is not available there.

Looking at the errors from your log, the cookie is probably wrong.

rockshelter commented 1 year ago

Usually I would say without a doubt that I have no VPN on, but AndroidTV does not notify you in any way if one connects at startup. So I'll double check tonight to be sure.

In any case I tested it in my PC as well just now over TeamViewer (and I'm sure there's no VPN on there) and it's also not working. I know playback wouldn't work anyway on Windows, but I also can't get to the list of Movies or TV Shows.

@Paco8, playback works through the Browser. Sign in has to be done through https://www.skyshowtime.com/signin

Edit: I guess the difference with me is, I'm travelling to a country where the service did not launch, but streaming is possible for existing subscriptions due to the EU-roaming policy. Whereas @praspp is travelling with a Romanian subscription to Poland, two countries where the service is available. So maybe there's something different there, cookie-wise ?

Paco8 commented 1 year ago

Try using the same cookie from the web browser in the addon and see if it works or maybe produces a different error.

rockshelter commented 1 year ago

Yeah, that's what I'm doing. Got a new cookie now in the same Windows machine I have Kodi on and tried to use that.

`2023-04-26 12:04:22.226 T:9504 DEBUG <CAddonSettings[plugin.video.skyott]>: trying to load setting definitions from old format... 2023-04-26 12:04:22.228 T:9504 DEBUG : [plugin.video.skyott] platform_id: skyshowtime 2023-04-26 12:04:22.229 T:9504 DEBUG : [plugin.video.skyott] territory: PT 2023-04-26 12:04:22.548 T:9504 DEBUG : [plugin.video.skyott] get_tokens: post_data: {'auth': {'authScheme': 'MESSO', 'authIssuer': 'NOWTV', 'provider': 'SKYSHOWTIME', 'providerTerritory': 'PT', 'proposition': 'SKYSHOWTIME', 'personaId': None}, 'device': {'type': 'COMPUTER', 'platform': 'PC', 'id': '', 'drmDeviceId': 'UNKNOWN'}} 2023-04-26 12:04:22.848 T:9504 DEBUG : [plugin.video.skyott] get_tokens: headers: {'Accept': 'application/vnd.tokens.v1+json', 'Content-Type': 'application/vnd.tokens.v1+json', 'cookie': '', 'x-sky-signature': 'SkyOTT client="SKYSHOWTIME-ANDROID-v1",signature="6MMh2uiGFq5/w3I0ZopkfQiS1to=",timestamp="1682503462",version="1.0"'} 2023-04-26 12:04:22.849 T:9504 DEBUG : [plugin.video.skyott] get_tokens: response data: {'errorCode': 'OVP_00001', 'description': 'Missing mandatory data: authToken'} 2023-04-26 12:04:22.850 T:9504 DEBUG : [plugin.video.skyott] Cleaning cache. 0 files removed. 2023-04-26 12:04:22.851 T:9504 DEBUG : [plugin.video.skyott] params: {'action': 'login', 'method': 'cookie'} 2023-04-26 12:04:22.863 T:4160 INFO : Loading skin file: FileBrowser.xml, load type: KEEP_IN_MEMORY 2023-04-26 12:04:22.909 T:4160 DEBUG : ------ Window Init (FileBrowser.xml) ------ 2023-04-26 12:04:25.581 T:4160 DEBUG : CInputManager::ProcessMouse: trying mouse action leftclick 2023-04-26 12:04:29.919 T:4160 DEBUG : Skipped 3 duplicate messages.. 2023-04-26 12:04:29.919 T:4160 DEBUG : CInputManager::ProcessMouse: trying mouse action wheeldown 2023-04-26 12:04:32.705 T:4160 DEBUG : Skipped 3 duplicate messages.. 2023-04-26 12:04:32.705 T:4160 DEBUG : CInputManager::ProcessMouse: trying mouse action leftclick 2023-04-26 12:04:32.961 T:4160 DEBUG : ------ Window Deinit (FileBrowser.xml) ------ 2023-04-26 12:04:32.976 T:9504 DEBUG : [plugin.video.skyott] clear_session 2023-04-26 12:04:32.978 T:9504 INFO : CPythonInvoker(25, C:\Users\S\AppData\Roaming\Kodi\addons\plugin.video.skyott\default.py): script successfully run 2023-04-26 12:04:32.978 T:9504 DEBUG : CPythonInvoker::onExecutionDone(25, C:\Users\S\AppData\Roaming\Kodi\addons\plugin.video.skyott\default.py) 2023-04-26 12:04:33.037 T:9504 DEBUG : . 2023-04-26 12:04:33.172 T:9504 INFO : Python interpreter stopped 2023-04-26 12:04:33.172 T:9504 DEBUG : Thread LanguageInvoker 9504 terminating 2023-04-26 12:04:33.182 T:7584 ERROR : XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.video.skyott/?action=login&method=cookie 2023-04-26 12:04:33.182 T:7584 DEBUG : Thread waiting 7584 terminating 2023-04-26 12:04:33.188 T:4160 DEBUG : ------ Window Deinit (DialogBusy.xml) ------ 2023-04-26 12:04:33.191 T:4160 ERROR : CGUIMediaWindow::GetDirectory(plugin://plugin.video.skyott/?action=login&method=cookie) failed 2023-04-26 12:04:33.191 T:4160 DEBUG : CGUIMediaWindow::GetDirectory (plugin://plugin.video.skyott/?action=user) 2023-04-26 12:04:33.191 T:4160 DEBUG : ParentPath = [plugin://plugin.video.skyott/] 2023-04-26 12:04:33.192 T:4160 DEBUG : Loading items: 3, directory: plugin://plugin.video.skyott/?action=user sort method: 0, ascending: false 2023-04-26 12:04:33.201 T:2328 DEBUG : CAddonDatabase::SetLastUsed[plugin.video.skyott] took 10 ms 2023-04-26 12:04:33.204 T:4540 DEBUG : Thread BackgroundLoader start, auto delete: false 2023-04-26 12:04:33.211 T:4540 DEBUG : Thread BackgroundLoader 4540 terminating 2023-04-26 12:04:34.757 T:4160 DEBUG : CInputManager::ProcessMouse: trying mouse action leftclick 2023-04-26 12:04:34.758 T:4160 DEBUG : CGUIMediaWindow::GetDirectory (plugin://plugin.video.skyott/) 2023-04-26 12:04:34.758 T:4160 DEBUG : ParentPath = [plugin://] 2023-04-26 12:04:34.759 T:7620 DEBUG : Thread waiting start, auto delete: false 2023-04-26 12:04:34.780 T:2328 DEBUG : CAddonDatabase::SetLastUsed[plugin.video.skyott] took 20 ms 2023-04-26 12:04:34.780 T:7620 DEBUG : XFILE::CPluginDirectory::StartScript - calling plugin Skyott('plugin://plugin.video.skyott/','20','','resume:false') 2023-04-26 12:04:34.781 T:10644 DEBUG : Thread LanguageInvoker start, auto delete: false 2023-04-26 12:04:34.781 T:10644 INFO : initializing python engine. 2023-04-26 12:04:34.781 T:10644 DEBUG : CPythonInvoker(26, C:\Users\S\AppData\Roaming\Kodi\addons\plugin.video.skyott\default.py): start processing 2023-04-26 12:04:34.827 T:10644 DEBUG : -->Python Interpreter Initialized<-- 2023-04-26 12:04:34.828 T:10644 DEBUG :

2023-04-26 12:04:34.828 T:10644 DEBUG : CPythonInvoker(26, C:\Users\S\AppData\Roaming\Kodi\addons\plugin.video.skyott\default.py): the source file to load is "C:\Users\S\AppData\Roaming\Kodi\addons\plugin.video.skyott\default.py" 2023-04-26 12:04:34.828 T:10644 DEBUG : CPythonInvoker(26, C:\Users\S\AppData\Roaming\Kodi\addons\plugin.video.skyott\default.py): setting the Python path to C:\Users\S\AppData\Roaming\Kodi\addons\plugin.video.skyott;C:\Users\S\AppData\Roaming\Kodi\addons\script.module.certifi\lib;C:\Users\S\AppData\Roaming\Kodi\addons\script.module.chardet\lib;C:\Users\S\AppData\Roaming\Kodi\addons\script.module.dateutil\lib;C:\Users\S\AppData\Roaming\Kodi\addons\script.module.defusedxml\lib;C:\Users\S\AppData\Roaming\Kodi\addons\script.module.idna\lib;C:\Users\S\AppData\Roaming\Kodi\addons\script.module.inputstreamhelper\lib;C:\Users\S\AppData\Roaming\Kodi\addons\script.module.requests\lib;C:\Users\S\AppData\Roaming\Kodi\addons\script.module.six\lib;C:\Users\S\AppData\Roaming\Kodi\addons\script.module.ttml2ssa\resources\lib;C:\Users\S\AppData\Roaming\Kodi\addons\script.module.urllib3\lib;C:\Program Files\Kodi\system\python\Lib;C:\Program Files\Kodi\python3.8.zip;C:\Program Files\Kodi\system\python\DLLs;C:\Program Files\Kodi;C:\Program Files\Kodi\system\python;C:\Program Files\Kodi\system\python\lib\site-packages 2023-04-26 12:04:34.828 T:10644 DEBUG : CPythonInvoker(26, C:\Users\S\AppData\Roaming\Kodi\addons\plugin.video.skyott\default.py): entering source directory C:\Users\S\AppData\Roaming\Kodi\addons\plugin.video.skyott 2023-04-26 12:04:34.828 T:10644 DEBUG : CPythonInvoker(26, C:\Users\S\AppData\Roaming\Kodi\addons\plugin.video.skyott\default.py): instantiating addon using automatically obtained id of "plugin.video.skyott" dependent on version 0.0.0 of the xbmc.python api 2023-04-26 12:04:34.860 T:4160 DEBUG : ------ Window Init (DialogBusy.xml) ------ 2023-04-26 12:04:36.004 T:10644 DEBUG : [plugin.video.skyott] Profile directory: C:\Users\S\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.skyott\ 2023-04-26 12:04:36.007 T:10644 DEBUG : [plugin.video.skyott] profile_dir: C:\Users\S\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.skyott\ 2023-04-26 12:04:36.009 T:10644 DEBUG <CAddonSettings[plugin.video.skyott]>: trying to load setting definitions from old format... 2023-04-26 12:04:36.012 T:10644 DEBUG : [plugin.video.skyott] platform_id: skyshowtime 2023-04-26 12:04:36.012 T:10644 DEBUG : [plugin.video.skyott] territory: PT 2023-04-26 12:04:36.017 T:10644 DEBUG : [plugin.video.skyott] {'Accept': 'application/vnd.localisationinfo.v1+json', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36', 'x-skyott-provider': 'SKYSHOWTIME', 'x-skyott-proposition': 'SKYSHOWTIME', 'x-sky-signature': 'SkyOTT client="SKYSHOWTIME-ANDROID-v1",signature="8o0ZKaclsBgwppi/kN2L7snjipY=",timestamp="1682503476",version="1.0"'} 2023-04-26 12:04:36.436 T:10644 DEBUG : [plugin.video.skyott] get_localisation: data: {'headers': {'x-skyott-territory': 'XX', 'x-skyott-activeterritory': 'XX', 'x-skyott-language': 'en-US'}, 'territoryAvailabilityStatus': 'UNAVAILABLE'} 2023-04-26 12:04:37.158 T:10644 DEBUG : [plugin.video.skyott] get_tokens: post_data: {'auth': {'authScheme': 'MESSO', 'authIssuer': 'NOWTV', 'provider': 'SKYSHOWTIME', 'providerTerritory': 'PT', 'proposition': 'SKYSHOWTIME', 'personaId': ''}, 'device': {'type': 'COMPUTER', 'platform': 'PC', 'id': '', 'drmDeviceId': 'UNKNOWN'}} 2023-04-26 12:04:37.401 T:10644 DEBUG : [plugin.video.skyott] get_tokens: headers: {'Accept': 'application/vnd.tokens.v1+json', 'Content-Type': 'application/vnd.tokens.v1+json', 'cookie': '', 'x-sky-signature': 'SkyOTT client="SKYSHOWTIME-ANDROID-v1",signature="B5P/Pb1AuESHml3HjvqfzxiTLDM=",timestamp="1682503477",version="1.0"'} 2023-04-26 12:04:37.401 T:10644 DEBUG : [plugin.video.skyott] get_tokens: response data: {'userToken': '', 'tokenExpiryTime': '2023-04-27T10:04:37.072Z', 'recommendedTokenReacquireTime': '2023-04-27T09:47:14.245Z'} 2023-04-26 12:04:37.518 T:10644 DEBUG : [plugin.video.skyott] Cleaning cache. 0 files removed. 2023-04-26 12:04:37.518 T:10644 DEBUG : [plugin.video.skyott] params: {} 2023-04-26 12:04:37.519 T:10644 DEBUG : [plugin.video.skyott] handle: 20 2023-04-26 12:04:37.931 T:10644 INFO : CPythonInvoker(26, C:\Users\S\AppData\Roaming\Kodi\addons\plugin.video.skyott\default.py): script successfully run 2023-04-26 12:04:37.931 T:10644 DEBUG : CPythonInvoker::onExecutionDone(26, C:\Users\S\AppData\Roaming\Kodi\addons\plugin.video.skyott\default.py) 2023-04-26 12:04:37.933 T:7620 DEBUG : Thread waiting 7620 terminating 2023-04-26 12:04:37.968 T:4160 DEBUG : ------ Window Deinit (DialogBusy.xml) ------ 2023-04-26 12:04:37.976 T:12612 DEBUG : Thread BackgroundLoader start, auto delete: false 2023-04-26 12:04:37.991 T:10644 DEBUG : . 2023-04-26 12:04:38.017 T:2328 DEBUG : ffmpeg[0x243e123a060X]: [image2] Custom AVIOContext makes no sense and will be ignored with AVFMT_NOFILE format. 2023-04-26 12:04:38.022 T:12612 DEBUG : Thread BackgroundLoader 12612 terminating 2023-04-26 12:04:38.135 T:10644 INFO : Python interpreter stopped 2023-04-26 12:04:38.135 T:10644 DEBUG : Thread LanguageInvoker 10644 terminating 2023-04-26 12:04:39.378 T:4160 DEBUG : CInputManager::ProcessMouse: trying mouse action leftclick 2023-04-26 12:04:39.380 T:4160 DEBUG : CGUIMediaWindow::GetDirectory (plugin://plugin.video.skyott/?action=category&name=TV%20Shows&slug=%2fentertainment%2fhighlights) 2023-04-26 12:04:39.380 T:4160 DEBUG : ParentPath = [plugin://plugin.video.skyott/] 2023-04-26 12:04:39.382 T:12664 DEBUG : Thread waiting start, auto delete: false 2023-04-26 12:04:39.393 T:2328 DEBUG : CAddonDatabase::SetLastUsed[plugin.video.skyott] took 12 ms 2023-04-26 12:04:39.393 T:12664 DEBUG : XFILE::CPluginDirectory::StartScript - calling plugin Skyott('plugin://plugin.video.skyott/','21','?action=category&name=TV%20Shows&slug=%2fentertainment%2fhighlights','resume:false') 2023-04-26 12:04:39.394 T:256 DEBUG : Thread LanguageInvoker start, auto delete: false 2023-04-26 12:04:39.394 T:256 INFO : initializing python engine. 2023-04-26 12:04:39.394 T:256 DEBUG : CPythonInvoker(27, C:\Users\S\AppData\Roaming\Kodi\addons\plugin.video.skyott\default.py): start processing 2023-04-26 12:04:39.424 T:256 DEBUG : -->Python Interpreter Initialized<-- 2023-04-26 12:04:39.424 T:256 DEBUG :

2023-04-26 12:04:39.424 T:256 DEBUG : CPythonInvoker(27, C:\Users\S\AppData\Roaming\Kodi\addons\plugin.video.skyott\default.py): the source file to load is "C:\Users\S\AppData\Roaming\Kodi\addons\plugin.video.skyott\default.py" 2023-04-26 12:04:39.424 T:256 DEBUG : CPythonInvoker(27, C:\Users\S\AppData\Roaming\Kodi\addons\plugin.video.skyott\default.py): setting the Python path to C:\Users\S\AppData\Roaming\Kodi\addons\plugin.video.skyott;C:\Users\S\AppData\Roaming\Kodi\addons\script.module.certifi\lib;C:\Users\S\AppData\Roaming\Kodi\addons\script.module.chardet\lib;C:\Users\S\AppData\Roaming\Kodi\addons\script.module.dateutil\lib;C:\Users\S\AppData\Roaming\Kodi\addons\script.module.defusedxml\lib;C:\Users\S\AppData\Roaming\Kodi\addons\script.module.idna\lib;C:\Users\S\AppData\Roaming\Kodi\addons\script.module.inputstreamhelper\lib;C:\Users\S\AppData\Roaming\Kodi\addons\script.module.requests\lib;C:\Users\S\AppData\Roaming\Kodi\addons\script.module.six\lib;C:\Users\S\AppData\Roaming\Kodi\addons\script.module.ttml2ssa\resources\lib;C:\Users\S\AppData\Roaming\Kodi\addons\script.module.urllib3\lib;C:\Program Files\Kodi\system\python\Lib;C:\Program Files\Kodi\python3.8.zip;C:\Program Files\Kodi\system\python\DLLs;C:\Program Files\Kodi;C:\Program Files\Kodi\system\python;C:\Program Files\Kodi\system\python\lib\site-packages 2023-04-26 12:04:39.424 T:256 DEBUG : CPythonInvoker(27, C:\Users\S\AppData\Roaming\Kodi\addons\plugin.video.skyott\default.py): entering source directory C:\Users\S\AppData\Roaming\Kodi\addons\plugin.video.skyott 2023-04-26 12:04:39.425 T:256 DEBUG : CPythonInvoker(27, C:\Users\S\AppData\Roaming\Kodi\addons\plugin.video.skyott\default.py): instantiating addon using automatically obtained id of "plugin.video.skyott" dependent on version 0.0.0 of the xbmc.python api 2023-04-26 12:04:39.482 T:4160 DEBUG : ------ Window Init (DialogBusy.xml) ------ 2023-04-26 12:04:40.249 T:256 DEBUG : [plugin.video.skyott] Profile directory: C:\Users\S\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.skyott\ 2023-04-26 12:04:40.252 T:256 DEBUG : [plugin.video.skyott] profile_dir: C:\Users\S\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.skyott\ 2023-04-26 12:04:40.253 T:256 DEBUG <CAddonSettings[plugin.video.skyott]>: trying to load setting definitions from old format... 2023-04-26 12:04:40.254 T:256 DEBUG : [plugin.video.skyott] platform_id: skyshowtime 2023-04-26 12:04:40.254 T:256 DEBUG : [plugin.video.skyott] territory: PT 2023-04-26 12:04:40.270 T:256 DEBUG : [plugin.video.skyott] Cleaning cache. 0 files removed. 2023-04-26 12:04:40.270 T:256 DEBUG : [plugin.video.skyott] params: {'action': 'category', 'name': 'TV Shows', 'slug': '/entertainment/highlights'} 2023-04-26 12:04:40.271 T:256 DEBUG : [plugin.video.skyott] https://web.clients.skyshowtime.com/bff/sections/v1?partition_id=no-partition&template=sections&segment=all_premium_users&slug=/entertainment/highlights 2023-04-26 12:04:40.511 T:256 ERROR : EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--

rockshelter commented 1 year ago

Tested the following just now (again, on Windows, so can't test actual playback until later tonight on Android) During this test, in the addon settings, I have "PT" as my Subscription Country.

In Chrome:

In Kodi: If I have the VPN to Portugal switched on and then "Login with Cookie File", I can use any of the cookie files (PT or DE) and browsing will work. If I turn the VPN off and restart Kodi, browsing continues to work. (I'm assuming, only until that token expires)

However, if I don't have a VPN turned on when I "Login with the Cookie File", browsing won't work at all, no matter if I use Cookie PT or Cookie DE.

rockshelter commented 1 year ago

I ran a few more tests with Surfshark VPN and can attest the following: The cookie I get from Chrome appears to be fine.

If I turn on a VPN to countries where SkyShowtime exists, the Kodi login is sucessful, it gets the token and I'm able to browse. (I tried: Netherlands, Croatia, Spain)

If I turn on a VPN to countries where SkyShowtime only exists through Roaming, it fails. (I tried: France, Austria, Italy, Germany)

Which leads me to believe that, for EU-Roaming to work, something might be missing in whatever the addon is doing when I feed it the cookie file (if I understand correctly, it tries to get a token?)

Paco8 commented 1 year ago

Could you take a look, using the chome devtools, the headers sent by the browser? I'm interesting to know specially the values of x-skyott-activeterritory and x-skyott-territory.

In my tests using a German IP, playback is not possible when x-skyott-activeterritory is "XX". If I change it to the code of one of countries where Skyshowtime is available I still get an error: "Access from this country is restricted: [location: DE, home territory: ES, user EU portability: disabled, channel EU portability: enabled".

If I use a web browser with a German IP I get "Skyshowtime is not available in your region".

rockshelter commented 1 year ago

It's sending my subscription country in both ("PT"), even when logging in with a German IP. ottheaders

My cookie also has the following values: outOfTerritory=true portability=AVAILABLE activeTerritory=PT hterr=PT

Paco8 commented 1 year ago

Test this package. It should use PT for x-skyott-activeterritory instead of XX. But I'm not sure if playback would be possible.

plugin.video.skyott-0.3.2-2.zip

praspp commented 1 year ago

I ran a few more tests with Surfshark VPN and can attest the following: The cookie I get from Chrome appears to be fine.

If I turn on a VPN to countries where SkyShowtime exists, the Kodi login is sucessful, it gets the token and I'm able to browse. (I tried: Netherlands, Croatia, Spain)

If I turn on a VPN to countries where SkyShowtime only exists through Roaming, it fails. (I tried: France, Austria, Italy, Germany)

Which leads me to believe that, for EU-Roaming to work, something might be missing in whatever the addon is doing when I feed it the cookie file (if I understand correctly, it tries to get a token?)

@samukas Skyshowtime applies a geolocation blockade in countries where it does not provide its services, e.g. Germany, France, Italy. You would have to find a VPN service that bypasses (cheats) this block. Most likely VPN Surfshark is not smart enough to bypass geoblocked content when you connect to countries where SkyShowtime exists (e.g. Portugal, Netherlands, Croatia, Spain). I don't think that by modifying the plug-in code, without the right VPN, you can play movies and series in Germany.

rockshelter commented 1 year ago

@Paco8 , thank you, I'll give it a test later tonight and let you know.

@praspp , Skyshowtime cannot legally do that. Of course they don't allow people in those countries to subscribe, because they don't offer the service there. But for people who already have a subscription, according to EU/EEA Portability Rules, you are allowed to travel with your subscription to other EU/EEA countries (for a limited time or not). The official app and website work flawlessly on my end... in Germany.

I mentioned Surfshark VPN as a mere example of trying out different IPs / locations. Playback doesn't work with Surfshark anyway because Sky detects it's a VPN. But playback works without any issues with a German home internet IP

rockshelter commented 1 year ago

https://eur-lex.europa.eu/EN/legal-content/glossary/content-portability.html

This is my understanding of how EU/EEA Portability works (or should work) for SkyShowtime (in a browser and official apps)

Basically, if one's account was created from a country that's part of this portability agreement:

Example
Subscription Country: Romania

Travel to Germany: streaming allowed, you see Romania's catalog
Travel to Poland: streaming allowed, you see Romania's catalog
Travel to Spain: streaming allowed, you see Romania's catalog
Travel to Bosnia: streaming allowed, but you see Bosnia's catalog, because Bosnia is not part of the agreement
Travel to Canada: streaming not allowed

If your account was created from a country that's not part of the agreement:

Example
Subscription Country: Bosnia

Travel to Poland: streaming allowed, you see Poland's catalog
Travel to Spain: streaming allowed, you see Spain's catalog
Travel to Romania: streaming allowed, you see Romania's catalog
Travel to Canada: streaming not allowed
Travel to Germany: streaming not allowed

This is also reflected in the headers that are sent on Chrome by the way.

With my account from Portugal and German IP: x-skyott-activeterritory: PT x-skyott-territory: PT

With my account from Portugal and Bosnian IP: x-skyott-activeterritory: BA x-skyott-territory: PT

rockshelter commented 1 year ago

@Paco8 , I'm afraid you were right.

With plugin.video.skyott-0.3.2-2.zip I'm able to select Profiles, Continue Watching (which shows up incomplete for some reason, but not relevant for this I guess) and also browse the Catalog now, but playback doesn't work.

Log is attached. kodi_video03_redacted.log

Screen recording: https://streamable.com/9ns1ap (My Kodi step by step, as well as "proof" with the official app where playback works under the same German IP)

rockshelter commented 1 year ago

@Paco8 , so I'm not sure what I did differently, other than getting a fresh cookie from Chrome just now, but playback is working !! Using the last zip you shared here: plugin.video.skyott-0.3.2-2.zip

Not sure if this will work in all situations since, as I mentioned before, for some specific cases, x-skyott-activeterritory and x-skyott-territory need to be different values. My cookie has the following values, which I think you could use to automatically get territory and activeterritory ? outOfTerritory=true; portability=AVAILABLE; activeTerritory=PT; hterr=PT;

Something is still not accurate, my localisation file (in Chrome) looks like this: {"headers":{"x-skyott-territory":"PT","x-skyott-activeterritory":"PT","x-skyott-language":"pt-PT"},"territoryAvailabilityStatus":"AVAILABLE"}

While in the addon, it looks like: {"headers": {"x-skyott-territory": "XX", "x-skyott-activeterritory": "XX", "x-skyott-language": "en-US"}, "territoryAvailabilityStatus": "UNAVAILABLE"}

But anyway... for my use case, I can confirm that this is working for now I'll continue to test playback over the next couple of days and report back.

rockshelter commented 1 year ago

@praspp I wonder what your cookie looks like in Poland? Does it also have the following params ? outOfTerritory, portability, activeTerritory, hterr

praspp commented 1 year ago

@samukas cookie outOfTerritory=true <-- this entry is missing in the cookie portability=AVAILABLE activeTerritory=PL hterr=PL (When I log into Skyshowtime it changes to "RO")

file skyshowtime.key outOfTerritory=true <-- this entry is missing in file skyshowtime.key portability=AVAILABLE activeTerritory=PL hterr=RO

rockshelter commented 1 year ago

@praspp

Interesting, I wouldn't have expected that, to be honest. So I wonder while you are in Poland with your Romanian subscription, which of these movies do you see as being available / are able to stream in the official apps or website?

Romania Catalog American Honey (2016) Beginners (2010) Missing Impossible - Fallout (2018) Schindler's List (1993)

Poland Catalog A Quiet Place (2018) Action Point (2018) A Snow White Christmas (1980) Admission (2013)

praspp commented 1 year ago

@samukas I can see and stream all movies listed in the Polish directory on the official apps or website and via Kodi plugin. Movies from the Romanian catalog are unavailable for me. And very well, because I am Polish and I live in Poland. I only have Skyshowtime subscription in Romania. ;)

rockshelter commented 1 year ago

Understood! So it's safe to say that you've been streaming from Poland for more than 30-37 days, I imagine ?

My assumption is that that's when Sky would have switched you to the Poland catalog , before you would have had the Romanian one

rockshelter commented 1 year ago

And thank you so much for checking, I feel like I've hijacked your tread :)

rockshelter commented 1 year ago

@Paco8 , to cover all scenarios, looks like 2 params are needed instead of just one?

Subscription country (hterr in cookie? / x-skyott-territory in header?) Catalog country (activeTerritory in cookie? / x-skyott-activeterritory in headers?)

Should these two be manually editable in the plugin settings or maybe a check box to read them from the cookie ?

Paco8 commented 1 year ago

I think the catalog country option isn't necessary because it can be obtained from the localisation file (and probably from the cookie). And the subscription country will probably be possible to get it from the cookie too, so maybe the option won't be necessary.

rockshelter commented 1 year ago

On another note, I spoke too soon... again. After sucessful plaback this morning, I came back to home, tried to play something and got the usual "Access from this country is restricted" message.

I got a new key file this time, it worked for a few moments and an hour later it's no longer working.

Whatever the issue is with being "Out of territory", it seems cookie/token/whatever expires way too quickly. Maybe this is a problem that will go away if/once login is implemented.