PlexApi: Pass session property for MyPlexAccount
MODIFY
plextraktsync/plex/PlexApi.py
plextraktsync/plex/PlexApi.py
@@ -234,13 +234,13 @@ def _plex_account(self):
plex_username = CONFIG.get("PLEX_USERNAME")
if plex_owner_token:
try:
- plex_owner_account = MyPlexAccount(token=plex_owner_token)
+ plex_owner_account = MyPlexAccount(token=plex_owner_token, session=factory.session)
return plex_owner_account.switchHomeUser(plex_username)
except BadRequest as e:
logger.error(f"Error during {plex_username} account access: {e}")
elif plex_account_token:
try:
- return MyPlexAccount(token=plex_account_token)
+ return MyPlexAccount(token=plex_account_token, session=factory.session)
except BadRequest as e:
logger.error(f"Error during {plex_username} account access: {e}")
else:

PlexApi: Pass session property for MyPlexAccount