Skip to content

Commit

Permalink
v1.3.2
Browse files Browse the repository at this point in the history
Fixed issue #23: fixed crash on Android and Mac when performing first network operation, on Kodi 18.
  • Loading branch information
gdomenici-insidesecure committed Nov 26, 2019
1 parent b8c9255 commit 7025f97
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.pcloud-video-streaming" name="PCloud Video Streaming" version="1.3.1" provider-name="Guido Domenici">
<addon id="plugin.video.pcloud-video-streaming" name="PCloud Video Streaming" version="1.3.2" provider-name="Guido Domenici">
<requires>
<import addon="xbmc.python" version="2.19.0"/>
</requires>
Expand Down
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v1.3.2 -- 26-Nov-2019
- Fixed issue #23: fixed crash on Android and Mac when performing first network operation, on Kodi 18.

v1.3.1 -- 24-Nov-2019
- Removed superfluous files.

Expand Down
16 changes: 12 additions & 4 deletions resources/lib/pcloudapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,18 @@ def ExecuteRequest(self, api, data = None):
if data is not None:
requestData = data.encode('utf-8')
method = 'POST'
httpRequest = Request(
url,
data=requestData,
method=method)
if sys.version_info.major >= 3:
# Python 3 stuff
httpRequest = Request(
url,
data=requestData,
method=method)
else:
# Python 2 stuff. Request for Python 2 (at least on Android) does not
# support the "method" keyword.
httpRequest = Request(
url,
data=requestData)
response = self.HttpHandler.open(httpRequest)
responseStr = response.read().decode('utf-8')
self.HttpHandler.close()
Expand Down

0 comments on commit 7025f97

Please sign in to comment.