Merge pull request #521 from mcarlton00/websockets-are-awful

Fix playback crashes
This commit is contained in:
Odd Stråbø 2021-05-28 15:19:51 +02:00 committed by GitHub
commit 2371dfd1fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -173,6 +173,9 @@ class HTTP(object):
return clean_none_dict_values(response)
except ValueError:
return
except TypeError:
# Empty json
return
def _request(self, data):

View file

@ -10,7 +10,11 @@ from kodi_six import xbmc
from helper import LazyLogger
import websocket
# If numpy is installed, the websockets library tries to use it, and then
# kodi hard crashes for reasons I don't even want to pretend to understand
import sys # noqa: E402,I100
sys.modules['numpy'] = None
import websocket # noqa: E402,I201
##################################################################################################