Skip to content

Commit 6a2e220

Browse files
committed
Change
Tried to fix the issue with letsencrypt response problem (probably)
1 parent 835f940 commit 6a2e220

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

custom_components/plex_recently_added/plex_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def update(self):
5252
info_res = requests.get(info_url + "/", headers={
5353
"X-Plex-Token": self._token
5454
}, timeout=10)
55-
root = ElementTree.fromstring(info_res.content)
55+
root = ElementTree.fromstring(info_res.text)
5656
identifier = root.get("machineIdentifier")
5757
except OSError as e:
5858
raise FailedToLogin
@@ -69,7 +69,7 @@ def update(self):
6969
libraries = requests.get(all_libraries, headers={
7070
"X-Plex-Token": self._token
7171
}, timeout=10)
72-
root = ElementTree.fromstring(libraries.content)
72+
root = ElementTree.fromstring(libraries.text)
7373
for lib in root.findall("Directory"):
7474
libs.append(lib.get("title"))
7575
if lib.get("type") in self._section_types and (len(self._section_libraries) == 0 or lib.get("title") in self._section_libraries):
@@ -84,7 +84,7 @@ def update(self):
8484
sub_sec = requests.get(recent_or_deck.format(library, self._max * 2), headers={
8585
"X-Plex-Token": self._token
8686
}, timeout=10)
87-
root = ElementTree.fromstring(sub_sec.content)
87+
root = ElementTree.fromstring(sub_sec.text)
8888
data += parse_library(root)
8989

9090
return {

0 commit comments

Comments
 (0)