plugin.audio.radio_de icon indicating copy to clipboard operation
plugin.audio.radio_de copied to clipboard

Radio Caprice (radcap.ru) stations cause an exception

Open cezary-zemis opened this issue 4 years ago • 0 comments

Some (probably all I had configured) Radio Caprice streams cause an error:

2020-03-21 23:31:50.597 T:1279259360  NOTICE: [xbmcswift2] Request for "/station/103830" matches rule for function "get_stream_url"
2020-03-21 23:31:50.598 T:1279259360  NOTICE: [plugin.audio.radio_de] get_station_by_station_id started with station_id=103830
2020-03-21 23:31:50.598 T:1279259360  NOTICE: [plugin.audio.radio_de] __api_call started with path=v2/search/station, param={'station': '103830'}
2020-03-21 23:31:50.598 T:1279259360  NOTICE: [plugin.audio.radio_de] __urlopen opening url=http://api.rad.io/info/v2/search/station?station=103830
2020-03-21 23:31:50.899 T:1279259360  NOTICE: [plugin.audio.radio_de] __resolve_playlist started with station=103830
2020-03-21 23:31:50.902 T:1279259360   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.KeyError'>
                                            Error Contents: 'streamURL'
                                            Traceback (most recent call last):
                                              File "/home/osmc/.kodi/addons/plugin.audio.radio_de/addon.py", line 5, in <module>
                                                plugin.run()
                                              File "/home/osmc/.kodi/addons/plugin.audio.radio_de/resources/lib/plugin.py", line 613, in run
                                                plugin.run()
                                              File "/home/osmc/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/plugin.py", line 345, in run
                                                items = self._dispatch(self.request.path)
                                              File "/home/osmc/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/plugin.py", line 319, in _dispatch
                                                listitems = view_func(**items)
                                              File "/home/osmc/.kodi/addons/plugin.audio.radio_de/resources/lib/plugin.py", line 484, in get_stream_url
                                                force_http=plugin.get_setting('prefer-http', bool)
                                              File "/home/osmc/.kodi/addons/plugin.audio.radio_de/resources/lib/api.py", line 137, in get_station_by_station_id
                                                station['streamUrl'] = self.__resolve_playlist(station)
                                              File "/home/osmc/.kodi/addons/plugin.audio.radio_de/resources/lib/api.py", line 261, in __resolve_playlist
                                                stream_url = station['streamURL']
                                            KeyError: 'streamURL'
                                            -->End of Python script error report<--

The issue has occured a few months ago. JSON entries look like this:

    "103830": [
        {
            "rating": 0,
            "name": "Radio Caprice - Opera",
            "thumbnail": "http://static.rad.io/images/broadcasts/18/91/103830/t175.png",
            "stream_url": "http://79.120.39.202:8000/opera",
            "current_track": "",
            "genre": "Classical",
            "bitrate": 48,
            "id": 103830,
            "description": ""
        },
        1544944950.077554
    ],

The stream at http://79.120.39.202:8000/opera seems to be valid.

cezary-zemis avatar Mar 21 '20 22:03 cezary-zemis