Closed gnoling closed 3 years ago
Can you post some screenshots how channels are displayed on website? And if you can open developer tools on Chrome and try to find file which contains data of page in json format?
European discovery+ sites have tv-guide section and channels and epg are loaded to iptvmanager from there. Channels are also displayed on own pages but that is not used for iptvmanager.
Okay I got it figured out. Can someone in US play channel while developer tools network tab open and look for file named channelPlaybackInfo or videoPlaybackInfo. Post full url and contents of file.
Sure, is there anything I should censor in cookies, and would HAR dumps be ideal or?
It is probably best delete cookies.
www.discoveryplus.com_Archive [21-01-29 14-36-05].har.txt
There are both OPTION and POST requests there, I think one or two might be repeated. Cookies removed.
Thanks. Please try channel playback with this https://github.com/Dis90/plugin.video.discoveryplus/tree/us_channels Kodi 19 Matrix only Channels in add-on can be found Home -> For You -> Network Logo Rail IPTV Manager is also supported.
Looks like it works fine for listing channels under both Network Logo Rail and in the IPTV Manager, but trying to watch a channel results in a "Not permitted to watch" error in both cases. Looking at my debug log, this appears to be related:
2021-01-29 15:30:12.283 T:63689 DEBUG <general>: [plugin.video.discoveryplus-1.3.9+matrix.1]: Response code: 200
2021-01-29 15:30:12.283 T:63689 DEBUG <general>: [plugin.video.discoveryplus-1.3.9+matrix.1]: Response: b'{\n "data" : {\n "attributes" : {\n "realm" : "go",\n "token" : "redacted"\n },\n "id" : "token-3c5fea3d-5c5e-4b8f-b830-7585cf47ce45",\n "type" : "token"\n },\n "meta" : {\n "site" : {\n "attributes" : {\n "brand" : "dplus_us",\n "theme" : "dplus_us",\n "websiteHostName" : ""\n },\n "id" : "dplus_us",\n "type" : "site"\n }\n }\n}'
2021-01-29 15:30:12.284 T:63689 DEBUG <general>: [plugin.video.discoveryplus-1.3.9+matrix.1]: Request URL: https://us1-prod-direct.discoveryplus.com/playback/v3/channelPlaybackInfo
2021-01-29 15:30:12.284 T:63689 DEBUG <general>: [plugin.video.discoveryplus-1.3.9+matrix.1]: Method: post
2021-01-29 15:30:12.284 T:63689 DEBUG <general>: [plugin.video.discoveryplus-1.3.9+matrix.1]: Params: {'usePreAuth': 'true'}
2021-01-29 15:30:12.284 T:63689 DEBUG <general>: [plugin.video.discoveryplus-1.3.9+matrix.1]: Payload: {"deviceInfo": {"adBlocker": "true"}, "channelId": "85", "wisteriaProperties": {"product": "dplus_us"}}
2021-01-29 15:30:12.284 T:63689 DEBUG <general>: [plugin.video.discoveryplus-1.3.9+matrix.1]: Headers: {'x-disco-params': 'realm=go,siteLookupKey=dplus_us', 'x-disco-client': 'WEB:UNKNOWN:dplus_us:0.0.1'}
2021-01-29 15:30:12.415 T:63689 DEBUG <general>: [plugin.video.discoveryplus-1.3.9+matrix.1]: Response code: 403
2021-01-29 15:30:12.415 T:63689 DEBUG <general>: [plugin.video.discoveryplus-1.3.9+matrix.1]: Response: b'{\n "errors" : [ {\n "status" : "403",\n "code" : "access.denied",\n "id" : "PAz9FuPsPk",\n "detail" : "Not permitted to watch."\n } ]\n}'
I wasn't sure if token was sensitive or not so I redacted it. *edit, also, this only applies to channels. Watching non-channels still works fine.
Same channel works on browser? Try change adBlocker to false https://github.com/Dis90/plugin.video.discoveryplus/blob/500fbba4d91bb122ffb043869a6e7b88d84651f1/resources/lib/dplay.py#L740
Or x-disco-client to WEB:UNKNOWN:dplus_us:13.0.0 https://github.com/Dis90/plugin.video.discoveryplus/blob/500fbba4d91bb122ffb043869a6e7b88d84651f1/resources/lib/dplay.py#L58
Looks like either method gets me, doesn't seem like adblocker true/false makes a difference (oh, yes, the same channels work in a browser):
2021-01-29 16:01:02.236 T:66300 DEBUG <general>: [plugin.video.discoveryplus-1.3.9+matrix.1]: Request URL: https://us1-prod-direct.discoveryplus.com/playback/v3/channelPlaybackInfo
2021-01-29 16:01:02.236 T:66300 DEBUG <general>: [plugin.video.discoveryplus-1.3.9+matrix.1]: Method: post
2021-01-29 16:01:02.236 T:66300 DEBUG <general>: [plugin.video.discoveryplus-1.3.9+matrix.1]: Params: {'usePreAuth': 'true'}
2021-01-29 16:01:02.236 T:66300 DEBUG <general>: [plugin.video.discoveryplus-1.3.9+matrix.1]: Payload: {"deviceInfo": {"adBlocker": "true"}, "channelId": "118", "wisteriaProperties": {"product": "dplus_us"}}
2021-01-29 16:01:02.236 T:66300 DEBUG <general>: [plugin.video.discoveryplus-1.3.9+matrix.1]: Headers: {'x-disco-params': 'realm=go,siteLookupKey=dplus_us', 'x-disco-client': 'WEB:UNKNOWN:dplus_us:13.0.0'}
2021-01-29 16:01:02.406 T:66300 DEBUG <general>: [plugin.video.discoveryplus-1.3.9+matrix.1]: Response code: 400
2021-01-29 16:01:02.406 T:66300 DEBUG <general>: [plugin.video.discoveryplus-1.3.9+matrix.1]: Response: b'{\n "errors" : [ {\n "status" : "400",\n "code" : "invalid.payload",\n "id" : "NV769J6z0U",\n "detail" : "wisteriaProperties.sessionId cannot be blank, wisteriaProperties.platform cannot be blank, wisteriaProperties.streamProvider.pingConfig is required, wisteriaProperties.advertiser.firstPlay is required, wisteriaProperties.device.type cannot be blank, wisteriaProperties.streamProvider.suspendBeaconing is required, wisteriaProperties.advertiser.fwIsLat is required"\n } ]\n}'
Pasting my wisteriaProperties from the earlier dump but pretty formatted... who knows if these can be bogus/same as this every time or what though:
"wisteriaProperties": {
"advertiser": {
"adId": "|89834640865601169443990565279669956394|9|16119316059887c96adc1388850c6985a96d96e6018ed",
"firstPlay": 0,
"fwDid": "",
"fwIsLat": 0,
"fwNielsenAppId": "P5A0FD4DE-4AE6-4B22-811B-36B9BD091980",
"gpaln": ""
},
"appBundle": "",
"device": {
"language": "en",
"make": "",
"model": "",
"name": "Firefox",
"os": "Linux",
"osVersion": "unknown device.osVersion",
"type": "desktop",
"id": "afd18db43c1b34c470538a36e9b4eb95"
},
"platform": "desktop",
"product": "dplus_us",
"sessionId": "a00e1843-8b82-412f-9ad4-fb46f4699e6f",
"streamProvider": {
"suspendBeaconing": 0,
"hlsVersion": 7,
"pingConfig": 1
}
}
Did error message change after changing x-disco-client? I updated jsonPayload to us_channels branch.
If you edit jsonPayload and change firstPlay, fwIsLat, suspendBeaconing, hlsVersion, pingConfig from strings to ints it works. So instead of 'firstPlay': '0' make it 'firstPlay': 0
I get Not Permitted to Watch when choosing the actual channels (Travel Channel, Discovery, etc) but the 24/7 Linear Channels like Property Brothers works. I'm not getting any EPG data either. Also, when trying to view a show that is now a linear channel, it shows up in the addon but nothing shows, since there are no seasons/episodes to choose from. They can only be viewed with the IPTV integration
If you edit jsonPayload and change firstPlay, fwIsLat, suspendBeaconing, hlsVersion, pingConfig from strings to ints it works. So instead of 'firstPlay': '0' make it 'firstPlay': 0
Changed strings to ints.
I get Not Permitted to Watch when choosing the actual channels (Travel Channel, Discovery, etc) but the 24/7 Linear Channels like Property Brothers works. I'm not getting any EPG data either.
I don't know why that "Not permitted to watch" error is happening. If anyone has any ideas please let me know. Is there EPG data available on website?
Also, when trying to view a show that is now a linear channel, it shows up in the addon but nothing shows, since there are no seasons/episodes to choose from.
Do you mean "Introducing discovery+ Channels" category? It can be found: Home -> For You
I think the not permitted to watch error is because they don't actually have those channels to stream, as of now it's just the 24/7 linear channels. I don't see EPG anywhere so I guess that answers that. Can you make it so that it just puts the channel name in as the show name for EPG for now, so that something shows up in the TV listing?
Introducing discovery+ channels work, but if I go to Browse->HGTV->A-Z->Property Brothers (which is now a linear channel, can't pick and choose seasons/episodes) then it's just blank. Whereas going to Introducting discovery+ Channels->Property Brothers channel, I have the option to play the channel
Okay it clarifies things. Stupid that they set those channels available with "hasLiveStream" but they are not actually available. Have to hide them from addon.
Good idea to use channel name as epg event. I will do that.
Introducing discovery+ channels work, but if I go to Browse->HGTV->A-Z->Property Brothers (which is now a linear channel, can't pick and choose seasons/episodes) then it's just blank.
This was actually bug.
Try now :)
Looks good to me, no more not available channels, EPG shows channel name as title and if I browse to a show that is now a channel I have the option to watch the channel.
Support added
The US region just added channels.
I'd love to see support for them now that they're actually available in the US. Alas, simply enabling it/removing the if-else for US in the iptvmanager.py file in the addon seems to result in a 404 when hitting the API, so I guess maybe they're not available in the actual API yet or maybe the API differs...
On discoveryplus.com in a web browser, they don't have a dedicated section yet and are a dedicated row instead.