From ab50d4b75c9e6d8f59986567a6e9ddb56448ab84 Mon Sep 17 00:00:00 2001 From: Peter Stransky Date: Thu, 25 Oct 2018 19:22:22 +0200 Subject: [PATCH] Fix HTTP Error 403: Forbidden ['Failed to store subtitles!'] --- addon.xml | 2 +- changelog.txt | 2 ++ lib/xbmcutil.py | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/addon.xml b/addon.xml index 1acc438..97ff7e5 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/changelog.txt b/changelog.txt index 0cfb38d..249fc00 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,5 @@ +[B]1.6.59:[/B] +- Fix HTTP Error 403: Forbidden ['Failed to store subtitles!'] [B]1.6.58:[/B] - preserve compatibility with older kodi versions [B]1.6.57:[/B] diff --git a/lib/xbmcutil.py b/lib/xbmcutil.py index 2e9b5b2..721eaac 100644 --- a/lib/xbmcutil.py +++ b/lib/xbmcutil.py @@ -57,6 +57,7 @@ def request(url, headers=None): headers = {} debug('request: %s' % url) req = urllib2.Request(url, headers=headers) + req.add_header('User-Agent', UA) response = urllib2.urlopen(req) data = response.read() response.close()