diff --git a/plextraktsync/commands/plex_login.py b/plextraktsync/commands/plex_login.py index 0e5d9823ab..4d5918a8d3 100644 --- a/plextraktsync/commands/plex_login.py +++ b/plextraktsync/commands/plex_login.py @@ -65,7 +65,7 @@ def myplex_login(username: str, password: str, token=None, code=None): password = Prompt.ask(PROMPT_PLEX_PASSWORD, password=True, default=password, show_default=False) code = Prompt.ask(PROMPT_PLEX_CODE) try: - return MyPlexAccount(username=username, password=password, code=code, token=token) + return MyPlexAccount(username=username, password=password, code=code, token=token, session=factory.session) except Unauthorized as e: if token: raise e diff --git a/plextraktsync/config/HttpCacheConfig.py b/plextraktsync/config/HttpCacheConfig.py index 07a73c74b1..6629543a03 100644 --- a/plextraktsync/config/HttpCacheConfig.py +++ b/plextraktsync/config/HttpCacheConfig.py @@ -74,6 +74,8 @@ class HttpCacheConfig: # Cache for some time, this activates 304 responses "plex.tv/users/account": "1m", "plex.tv/api/v2/user": "15m", + # plex-login command + "plex.tv/api/v2/resources?includeHttps=1&includeRelay=1": "1m", # Plex patterns # Ratings search "*/library/sections/*/all?*userRating*=-1*": "10s",