Fixed response encoding

This commit is contained in:
Fabio Manganiello 2018-10-04 10:22:17 +02:00
parent fbce006772
commit 1404d59865

View file

@ -487,13 +487,17 @@ class VideoOmxplayerPlugin(Plugin):
})
)
response = request.read()
if isinstance(response, bytes):
response = response.decode('utf-8')
results = [
{
'url': _['items'][0]['torrent_magnet'],
'title': _['title'],
}
for _ in json.loads(request.read())['MovieList']
for _ in json.loads(response).get('MovieList', [])
]
return results