known-as-bmf / plugin.video.arteplussept

Plugin Kodi (ex XBMC) permettant de voir les vidéos disponibles sur Arte +7
GNU General Public License v2.0
44 stars 23 forks source link

Error on live stream #65

Closed ymasson closed 1 year ago

ymasson commented 4 years ago

Hello,

I have an error when i open Arte Concerts / Ne pas manquer / Hellfest From Home. This is a live stream.

In a web browser the url is : https://www.arte.tv/player/v5/index.php?json_url=https%3A%2F%2Fapi.arte.tv%2Fapi%2Fplayer%2Fv2%2Fconfig%2Ffr%2F097913-002-A&lang=fr&autoplay=true

Traces:

2020-06-19 21:34:46.064 T:1679786720   DEBUG: CAddonSettings[plugin.video.arteplussept]: loading setting definitions
2020-06-19 21:34:46.064 T:1679786720   DEBUG: CAddonSettings[plugin.video.arteplussept]: trying to load setting definitions from old format...
2020-06-19 21:34:46.066 T:1679786720   DEBUG: [xbmcswift2] Adding url rule "/" named "index" pointing to function "index"
2020-06-19 21:34:46.068 T:1679786720   DEBUG: [xbmcswift2] Adding url rule "/category/<category_code>" named "category" pointing to function "category"
2020-06-19 21:34:46.069 T:1679786720   DEBUG: [xbmcswift2] Adding url rule "/creative" named "creative" pointing to function "creative"
2020-06-19 21:34:46.071 T:1679786720   DEBUG: [xbmcswift2] Adding url rule "/magazines" named "magazines" pointing to function "magazines"
2020-06-19 21:34:46.073 T:1679786720   DEBUG: [xbmcswift2] Adding url rule "/sub_category/<sub_category_code>" named "sub_category_by_code" pointing to function "sub_category_by_code"
2020-06-19 21:34:46.075 T:1679786720   DEBUG: [xbmcswift2] Adding url rule "/sub_category/<category_code>/<sub_category_title>" named "sub_category_by_title" pointing to function "sub_catego
ry_by_title"
2020-06-19 21:34:46.078 T:1679786720   DEBUG: [xbmcswift2] Adding url rule "/collection/<kind>/<collection_id>" named "collection" pointing to function "collection"
2020-06-19 21:34:46.080 T:1679786720   DEBUG: [xbmcswift2] Adding url rule "/play/<kind>/<program_id>" named "play" pointing to function "play"
2020-06-19 21:34:46.081 T:1679786720   DEBUG: [xbmcswift2] Adding url rule "/weekly" named "weekly" pointing to function "weekly"
2020-06-19 21:34:46.138 T:1679786720   DEBUG: [xbmcswift2] Adding url rule "/" named "index" pointing to function "index"
2020-06-19 21:34:46.139 T:1679786720   DEBUG: [xbmcswift2] Adding url rule "/category/<category_code>" named "category" pointing to function "category"
2020-06-19 21:34:46.139 T:1679786720   DEBUG: [xbmcswift2] Adding url rule "/creative" named "creative" pointing to function "creative"
2020-06-19 21:34:46.139 T:1679786720   DEBUG: [xbmcswift2] Adding url rule "/magazines" named "magazines" pointing to function "magazines"
2020-06-19 21:34:46.139 T:1679786720   DEBUG: [xbmcswift2] Adding url rule "/sub_category/<sub_category_code>" named "sub_category_by_code" pointing to function "sub_category_by_code"
2020-06-19 21:34:46.140 T:1679786720   DEBUG: [xbmcswift2] Adding url rule "/sub_category/<category_code>/<sub_category_title>" named "sub_category_by_title" pointing to function "sub_catego
ry_by_title"
2020-06-19 21:34:46.140 T:1679786720   DEBUG: [xbmcswift2] Adding url rule "/collection/<kind>/<collection_id>" named "collection" pointing to function "collection"
2020-06-19 21:34:46.140 T:1679786720   DEBUG: [xbmcswift2] Adding url rule "/play/<kind>/<program_id>" named "play" pointing to function "play"
2020-06-19 21:34:46.141 T:1679786720   DEBUG: [xbmcswift2] Adding url rule "/weekly" named "weekly" pointing to function "weekly"
2020-06-19 21:34:46.142 T:1679786720   DEBUG: [xbmcswift2] Handling incoming request for /play/SHOW/097913-002-A
2020-06-19 21:34:46.142 T:1679786720  NOTICE: [xbmcswift2] Request for "/play/SHOW/097913-002-A" matches rule for function "play"
2020-06-19 21:34:46.239 T:1679786720   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.AttributeError'>
                                            Error Contents: 'NoneType' object has no attribute 'get'
                                            Traceback (most recent call last):
                                              File "/home/osmc/.kodi/addons/plugin.video.arteplussept/resources/lib/addon.py", line 111, in <module>
                                                plugin.run()
                                              File "/home/osmc/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/plugin.py", line 342, in run
                                                items = self._dispatch(self.request.path)
                                              File "/home/osmc/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/plugin.py", line 316, in _dispatch
                                                listitems = view_func(**items)
                                              File "/home/osmc/.kodi/addons/plugin.video.arteplussept/resources/lib/addon.py", line 89, in play
                                                return plugin.set_resolved_url(view.build_stream_url(kind, program_id, language, quality))
                                              File "/home/osmc/.kodi/addons/plugin.video.arteplussept/resources/lib/view.py", line 46, in build_stream_url
                                                return mapper.map_playable(api.streams(kind, program_id, lang), quality)
                                              File "/home/osmc/.kodi/addons/plugin.video.arteplussept/resources/lib/mapper.py", line 117, in map_playable
                                                'path': stream.get('url')
                                            AttributeError: 'NoneType' object has no attribute 'get'
                                            -->End of Python script error report<--
2020-06-19 21:34:46.239 T:1679786720   DEBUG: onExecutionDone(35, /home/osmc/.kodi/addons/plugin.video.arteplussept/resources/lib/addon.py)
2020-06-19 21:34:46.427 T:1915893296   ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.arteplussept/play/SHOW/097913-002-A]

Regards

thomas-ernest commented 1 year ago

Hello @ymasson,

Live stream support has been requested in https://github.com/known-as-bmf/plugin.video.arteplussept/issues/67. I added it in the new implementation of the plugin from v1.1.5. Nevertheless, I am not sure it is about the same request here. Do you have a new example of the use case please ? If no, I will clode the ticket as implemented.

Notes : live stream availability depends from geolocation and can be restricted. Got an error case from a user in Belgium, while it was working for me.

Thank you