retrospect-addon / plugin.video.retrospect

Retrospect is a Kodi video add-on which allows you to watch streams of a number of free and publicly available online TV stream sites.
https://www.rieter.net/content/
GNU General Public License v3.0
110 stars 36 forks source link

NPO live and replay not playing (31-01) #1672

Closed chakubie closed 1 year ago

chakubie commented 1 year ago

Bug report

Describe the bug

Since today 31-01 NPO live and replay streams stopped playing

Expected Behavior

Actual Behavior

Possible Fix

To Reproduce

Steps to reproduce the behavior:

Debuglog

https://paste.kodi.tv/fahunokija

The debug retrospect.log can be found here:

Screenshots

Additional context or screenshots (if appropriate)

Your Environment

Used Operating system:

Used versions:

ErikBrown2 commented 1 year ago

Same here. My log is https://paste.kodi.tv/efevepujep It happens on all my setups, Windows 10 and LibreElec and Kodi 19.5 and 20.

Arathonk commented 1 year ago

Same here! Log: https://paste.kodi.tv/yucenelahi

WesRos commented 1 year ago

With libreelec on rpi4 the same issue. I've tried to reinstall Widevine, doesn't help.

PhyxionNL commented 1 year ago

Ook op Windows werkt het niet (er is geen een aflevering meer die werkt). Via de NPO app werkt het wel. Hier lijkt het fout te gaan 👀

20230131 21:19:39 - [DEBUG   ] - subtitlehelper.py    - 78   - Found existing subtitle: C:\Users\Kodi\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.retrospect\cache\AT_300008601.nl.srt
20230131 21:19:39 - [DEBUG   ] - addonsettings.py     - 528  - Ignoring Retrospect setting use_adaptive_addon=True and using it anyways.
20230131 21:19:39 - [INFO    ] - addonsettings.py     - 550  - Adaptive Stream add-on 'inputstream.adaptive' with decryption support was found.
20230131 21:19:39 - [INFO    ] - npostream.py         - 56   - Determining MPD streams for VideoId: AT_300008601
20230131 21:19:39 - [INFO    ] - urihandler.py        - 554  - Performing a GET for https://www.npostart.nl/api/token
20230131 21:19:39 - [DEBUG   ] - cachehttpadapter.py  - 72   - No-Cache-Hit: https://www.npostart.nl/api/token
20230131 21:19:39 - [DEBUG   ] - cachehttpadapter.py  - 50   - Retrieving data from: https://www.npostart.nl/api/token
20230131 21:19:39 - [DEBUG   ] - cachehttpadapter.py  - 144  - Found cache-control and etag data: {'no-cache': True, 'no-store': True, 'private': True}
20230131 21:19:39 - [INFO    ] - urihandler.py        - 559  - GET resulted in '200 OK' (0:00:00.142110) for https://www.npostart.nl/api/token
20230131 21:19:39 - [CRITICAL] - videoaction.py       - 108  - Could not playback the url
20230131 21:19:39 - [CRITICAL] - videoaction.py       - 108  - | Traceback (most recent call last):
20230131 21:19:39 - [CRITICAL] - videoaction.py       - 108  - |   File "C:\Users\Kodi\AppData\Roaming\Kodi\addons\plugin.video.retrospect\resources\lib\actions\videoaction.py", line 48, in execute
20230131 21:19:39 - [CRITICAL] - videoaction.py       - 108  - |     media_item = self.__channel.process_video_item(media_item)
20230131 21:19:39 - [CRITICAL] - videoaction.py       - 108  - |   File "C:\Users\Kodi\AppData\Roaming\Kodi\addons\plugin.video.retrospect\resources\lib\chn_class.py", line 480, in process_video_item
20230131 21:19:39 - [CRITICAL] - videoaction.py       - 108  - |     return data_parser.Updater(item)
20230131 21:19:39 - [CRITICAL] - videoaction.py       - 108  - |   File "C:\Users\Kodi\AppData\Roaming\Kodi\addons\plugin.video.retrospect\channels\channel.nos\nos2010\chn_nos2010.py", line 1252, in update_video_item
20230131 21:19:39 - [CRITICAL] - videoaction.py       - 108  - |     return self.__update_video_item(item, whatson_id)
20230131 21:19:39 - [CRITICAL] - videoaction.py       - 108  - |   File "C:\Users\Kodi\AppData\Roaming\Kodi\addons\plugin.video.retrospect\channels\channel.nos\nos2010\chn_nos2010.py", line 1385, in __update_video_item
20230131 21:19:39 - [CRITICAL] - videoaction.py       - 108  - |     error = NpoStream.add_mpd_stream_from_npo(None, episode_id, item, live=item.isLive)
20230131 21:19:39 - [CRITICAL] - videoaction.py       - 108  - |   File "C:\Users\Kodi\AppData\Roaming\Kodi\addons\plugin.video.retrospect\resources\lib\streams\npostream.py", line 65, in add_mpd_stream_from_npo
20230131 21:19:39 - [CRITICAL] - videoaction.py       - 108  - |     token = JsonHelper(data).get_value("token")
20230131 21:19:39 - [CRITICAL] - videoaction.py       - 108  - |   File "C:\Users\Kodi\AppData\Roaming\Kodi\addons\plugin.video.retrospect\resources\lib\helpers\jsonhelper.py", line 124, in get_value
20230131 21:19:39 - [CRITICAL] - videoaction.py       - 108  - |     data = data[arg]
20230131 21:19:39 - [CRITICAL] - videoaction.py       - 108  - + TypeError: list indices must be integers or slices, not str
landgenoot commented 1 year ago

The token URL responds with an empty array indeed. image

diekshouse commented 1 year ago

Same here. Tried several widevine versions. No result.

tschoonen commented 1 year ago

Can confirm it doesn't work on my Ubuntu server either. It's definitely something to do with the fetching of the token.

It does give a proper 200 response and a valid JSON response, but it happens to be an empty one. So any one have an idea of what they might have changed this time?

curl -D - -H 'X-Requested-With: XMLHttpRequest' https://www.npostart.nl/api/token

HTTP/2 200 
date: Tue, 31 Jan 2023 21:04:58 GMT
content-type: application/json
content-length: 2
cf-ray: 7925671b2eb50e84-AMS
accept-ranges: bytes
cache-control: no-cache, no-store, private
set-cookie: XSRF-TOKEN=eyJpdiI6IlwvUmNpSkJ1OGY4MVA3czQrcUJ3TW5RPT0iLCJ2YWx1ZSI6ImRFYVI1UGNEY0prTTQ2dmRIaStcL0N2NDB0Z3NJQVdOYnFMY1JoYU5vcVJuOUllQUVSd1JOTnJrN3gyYTdwZmFGIiwibWFjIjoiN2YyYTU1N2I2ODM3MDk0MjBjNWY3YzEzNzg3OGVjYWJmYTgzNzExYmE4Mzc4NjU3Mzk3MjEzNGY1OTE5MWVkMSJ9; expires=Fri, 03-Mar-2023 07:04:58 GMT; Max-Age=2628000; path=/; secure; samesite=lax
strict-transport-security: max-age=15552000
vary: Accept-Encoding
cf-cache-status: BYPASS
set-cookie: npo_session=eyJpdiI6IlUwXC9yVVwvS0R2b0RoQmxCaklzWTY5dz09IiwidmFsdWUiOiI1STRLcGJcLzdCNU41QmRzb3ZlSWQ0N2RlQUhkS2hqMHVoRFVlTkdPTEtaNEZiUUNnWElqQzYxVXpHWkVKbDZZXC8iLCJtYWMiOiIyZGZkOTAzYTI5NDgzYjRhMDhiMGJjYTg2MjcwZWU4M2QxMTg0OTZmYzYwMDYxMjhmMmNjZmEyZWExYzkzMWNjIn0%3D; expires=Fri, 03-Mar-2023 07:04:58 GMT; Max-Age=2628000; path=/; secure; httponly; samesite=lax
x-content-type-options: nosniff
x-frame-options: DENY
x-npo-version: a47451f3132c008be555ffd372934c2729646920
x-xss-protection: 1; mode=block
server-timing: cf-q-config;dur=6.9999999823267e-06
server: cloudflare
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400

[]
landgenoot commented 1 year ago

Alternatively, you can get a token by querying a random video URL with a valid XSRF-token and npo_session, this results in a JSON response instead of the player.

curl --location --request POST 'https://www.npostart.nl/player/VPWON_1348922' \
--header 'x-xsrf-token: eyJpdiI6IlB3cm5lMm1NUTYySTgzbHJjeEZha...' \
--header 'Cookie: XSRF-TOKEN=eyJpdiI6IlA3REpTTUlxeUI4UlRzWlVWQ3JwQ0E9...%3D%3D; npo_session=eyJpdiI6IjJweXZiV1o2SU9L...%3D%3D' \
{"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1.....

I confirmed the workaround above by hardcoding the token that cURL gave me. The token is not attached to the video that is being used to request it.

basrieter commented 1 year ago

I will see what I can do to fix this.

PhyxionNL commented 1 year ago

Super, als je hulp nodig hebt met testen moet je het maar even laten weten 😊

create-issue-branch[bot] commented 1 year ago

Branch bug-1672 was created for issue: "NPO live and replay not playing (31-01)"

basrieter commented 1 year ago

Please install https://github.com/retrospect-addon/plugin.video.retrospect/archive/refs/heads/bug-1672.zip via "Install from zip" and see if that works. This zip is Kodi Matrix/Nexus only.

ErikBrown2 commented 1 year ago

Het werkt inderdaad weer. Bedankt voor de snelle fix.

lauris-nl commented 1 year ago

Thanks again Bas I can confirm bug-1672.zip solves the problem. And you made my wife happy!

PhyxionNL commented 1 year ago

Super, werkt weer 👍

landgenoot commented 1 year ago

Great work, thanks for the quick solution!

The same /api/token is also requested here, It fails when changing profiles. NPO Start -> Favourites -> Choose profile.

But that one will be harder to fix I guess, as we don't have a video at that point.

20230201 13:29:33 - [INFO    ] - plugin.py            - 34   - *********** Starting Retrospect add-on version 5.5.12 ***********                                                                    
20230201 13:29:33 - [INFO    ] - chn_class.py         - 45   - Initializing channel (__init__): NPO Start (uzgjson) [channel.nos.nos2010.uzgjson=True, nl=True, National, ED8FDB9C-3870-11E2-B1C2-19
20230201 13:29:33 - [INFO    ] - chn_nos2010.py       - 1428 - Setting the Cookie-Consent cookie for www.uitzendinggemist.nl                                                                        
20230201 13:29:33 - [INFO    ] - plugin.py            - 103  - Loaded: NPO Start                                                                                                                    
20230201 13:29:33 - [INFO    ] - folderaction.py      - 43   - Plugin::process_folder_list Doing process_folder_list                                                                                
20230201 13:29:33 - [INFO    ] - chn_class.py         - 187  - One or more dataparsers require logging in.                                                                                          
20230201 13:29:33 - [INFO    ] - chn_nos2010.py       - 233  - Found existing valid NPO token (valid until: 2023-03-03 22:29:29)                                                                    
20230201 13:29:33 - [INFO    ] - urihandler.py        - 554  - Performing a GET for https://www.npostart.nl/api/token                                                                               
20230201 13:29:34 - [INFO    ] - urihandler.py        - 559  - GET resulted in '200 OK' (0:00:00.265856) for https://www.npostart.nl/api/token                                                      
20230201 13:29:34 - [ERROR   ] - folderaction.py      - 133  - Plugin::Error Processing FolderList                                                                                                  
20230201 13:29:34 - [ERROR   ] - folderaction.py      - 133  - | Traceback (most recent call last):                                                                                                 
20230201 13:29:34 - [ERROR   ] - folderaction.py      - 133  - |   File "/storage/.kodi/addons/plugin.video.retrospect/resources/lib/actions/folderaction.py", line 55, in execute                  
20230201 13:29:34 - [ERROR   ] - folderaction.py      - 133  - |     media_items = self.__channel.process_folder_list(selected_item)                                                                
20230201 13:29:34 - [ERROR   ] - folderaction.py      - 133  - |   File "/storage/.kodi/addons/plugin.video.retrospect/resources/lib/chn_class.py", line 230, in process_folder_list                
20230201 13:29:34 - [ERROR   ] - folderaction.py      - 133  - |     (data, pre_items) = data_parser.PreProcessor(data)                                                                             
20230201 13:29:34 - [ERROR   ] - folderaction.py      - 133  - |   File "/storage/.kodi/addons/plugin.video.retrospect/channels/channel.nos/nos2010/chn_nos2010.py", line 620, in switch_profile    
20230201 13:29:34 - [ERROR   ] - folderaction.py      - 133  - |     xsrf_token = self.__get_xsrf_token()[0]                                                                                        
20230201 13:29:34 - [ERROR   ] - folderaction.py      - 133  - |   File "/storage/.kodi/addons/plugin.video.retrospect/channels/channel.nos/nos2010/chn_nos2010.py", line 1525, in __get_xsrf_token 
20230201 13:29:34 - [ERROR   ] - folderaction.py      - 133  - |     token = json_token.get_value("token")                                                                                          
20230201 13:29:34 - [ERROR   ] - folderaction.py      - 133  - |   File "/storage/.kodi/addons/plugin.video.retrospect/resources/lib/helpers/jsonhelper.py", line 124, in get_value                 
20230201 13:29:34 - [ERROR   ] - folderaction.py      - 133  - |     data = data[arg]                                                                                                               
20230201 13:29:34 - [ERROR   ] - folderaction.py      - 133  - + TypeError: list indices must be integers or slices, not str                                                                        
20230201 13:29:34 - [INFO    ] - addon.py             - 65   - Retrospect :: Flushing and closing logfile.  
diekshouse commented 1 year ago

Update lukt nog even niet: De afhankelijkheid van xbmc.python versie 3.0.0 kan niet worden voldaan. Unable to look up host: "

chakubie commented 1 year ago

In my case everything functions again, thanks for the fix!

chakubie commented 1 year ago

Sorry, not everything functions: under favorites my profile is empty, so favorite shows do not appear..

basrieter commented 1 year ago

Sorry, not everything functions: under favorites my profile is empty, so favorite shows do not appear..

That is something else. Did you try clearning the cache and cookies of Retrospect? It can be done via the Retrospect settings.

chakubie commented 1 year ago

Unfortunately this didn't help, not even after several attempts and reboots..

BrodjagaRatnik commented 1 year ago

bug-1672.zip heeft het opgelost bedankt

chakubie commented 1 year ago

bug-1672.zip heeft het opgelost bedankt

Ook de favorieten??

BrodjagaRatnik commented 1 year ago

bug-1672.zip heeft het opgelost bedankt

Ook de favorieten??

Kan de links in de favorieten gebruiken en de NPO live en replay werken zoals het was

basrieter commented 1 year ago

Unfortunately this didn't help, not even after several attempts and reboots..

Post dan even een link naar een DEBUG retrospect.log file waarin je probeert naar je favorieten te navigeren. En laat na het aanzetten van de debug logging, Retrospect ook zijn cache even opschonen. Dan staat dat ook in de log.

evetion commented 1 year ago

I have the same, can play videos, but can't retrieve favourites when running the zip file above:

Cleaning cache shows nothing special

knip

Retrieving favourites hits the empty list at https://www.npostart.nl/api/token as well

knip

basrieter commented 1 year ago

I have the same, can play videos, but can't retrieve favourites when running the zip file above:

Cleaning cache shows nothing special

knip

Retrieving favourites hits the empty list at https://www.npostart.nl/api/token as well

knip

I really really need a FULL debug retrospect.log with all the info. Post on one pastebin and link it here.

chakubie commented 1 year ago

https://paste.kodi.tv/aroyajehar

basrieter commented 1 year ago

Made some more changes.

Please install https://github.com/retrospect-addon/plugin.video.retrospect/archive/refs/heads/bug-1672.zip again via "Install from zip" and see if that works. This zip is Kodi Matrix/Nexus only.

evetion commented 1 year ago

I really really need a FULL debug retrospect.log with all the info. Post one on pastebin and link it here.

http://paste.kodi.tv/doledajidu.kodi

evetion commented 1 year ago

Please install refs/heads/bug-1672.zip again via "Install from zip" and see if that works. This zip is Kodi Matrix/Nexus only.

This does indeed fix the favourites 🎉

chakubie commented 1 year ago

Same here, completely fixed now, thanks!

basrieter commented 1 year ago

PR inbound: https://github.com/xbmc/repo-plugins/pull/4227

didamsko commented 1 year ago

Thanks, i also got it working again on my older Leia box by copying the updated npostream.py from your Matrix/Nexus only bug-1672.zip fix (found in plugin.video.retrospect-bug-1672\resources\lib\streams) to /storage/.kodi/addons/plugin.video.retrospect/resources/lib/streams/ on my ODROID-C2 running legacy CoreELEC 9.2.8 followed by a reboot of the ODROID-C2.

I noticed that the npostream.py of the 5.5.12 Leia and Matrix versions were identical and assumed it probably would not hurt to also use the updated npostream.py for Leia.

pschoond commented 1 year ago

@bas Thank you again for the quick fix. I also replaced npostream.py on my rPi running Leia and it's working again :1st_place_medal:

SolosoftNL commented 1 year ago

I've still problems with playing NPO on my Philips smart tv.

qistoph commented 1 year ago

I've still problems with playing NPO on my Philips smart tv.

The fix is not yet available in the plugin. Checkout the status on https://github.com/xbmc/repo-plugins/pull/4227.

Or are you using the zip provided as described above?

SolosoftNL commented 1 year ago

I've still problems with playing NPO on my Philips smart tv.

I've still problems with playing NPO on my Philips smart tv.

The fix is not yet available in the plugin. Checkout the status on xbmc/repo-plugins#4227.

Or are you using the zip provided as described above? Not yet. Will try this weekend. Don't know how to push this file to tv. I'm at work now.

SolosoftNL commented 1 year ago

I've still problems with playing NPO on my Philips smart tv.

I've still problems with playing NPO on my Philips smart tv.

The fix is not yet available in the plugin. Checkout the status on xbmc/repo-plugins#4227.

Or are you using the zip provided as described above? Not yet. Will try this weekend. Don't know how to push this file to tv. I'm at work now.

basrieter commented 1 year ago

They will come automatically as soon as they are reviewed. But my Team Kodi colleagues as a bit busy and I cannot merge my own PR's.

tschoonen commented 1 year ago

I just got the update and was able to watch Nieuwsuur as I ate breakfast. Thanks for the quick patch!

SolosoftNL commented 1 year ago

Yes it's working again! Thanks very much 🥰