Skip to content

Commit b056e9d

Browse files
authored
Fix: Inherit session when creating internal PlexServer objects (#1069)
* Make myPlexAccount inherit session * Pass session to _toOnlineMetadata PlexServer
1 parent 73f8a8b commit b056e9d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

plexapi/myplex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ def _toOnlineMetadata(self, objs):
10121012
""" Convert a list of media objects to online metadata objects. """
10131013
# TODO: Add proper support for metadata.provider.plex.tv
10141014
# Temporary workaround to allow reloading and browsing of online media objects
1015-
server = PlexServer(self.METADATA, self._token)
1015+
server = PlexServer(self.METADATA, self._token, session=self._session)
10161016

10171017
if not isinstance(objs, list):
10181018
objs = [objs]

plexapi/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def myPlexAccount(self):
311311
"""
312312
if self._myPlexAccount is None:
313313
from plexapi.myplex import MyPlexAccount
314-
self._myPlexAccount = MyPlexAccount(token=self._token)
314+
self._myPlexAccount = MyPlexAccount(token=self._token, session=self._session)
315315
return self._myPlexAccount
316316

317317
def _myPlexClientPorts(self):

0 commit comments

Comments
 (0)