fix(title-cache): key a cookie-only login by its cookie file path

This commit is contained in:
imSp4rky
2026-12-02 15:24:00 -07:00
parent 3868928d98
commit 2c305c475f
5 changed files with 79 additions and 6 deletions
+3 -1
View File
@@ -111,6 +111,7 @@ class TitleSource(metaclass=ABCMeta):
log: logging.Logger
session: requests.Session
credential: Credential | None = None
cookie_file: str | None = None
current_region: str | None = None
title_cache: TitleCacher | None = None
@@ -140,7 +141,8 @@ class TitleSource(metaclass=ABCMeta):
title_id = self.title_id
else:
title_id = None
return CacheIdentity(self.title_cache, title_id, self.current_region, get_account_hash(self.credential))
account = get_account_hash(self.credential, self.cookie_file)
return CacheIdentity(self.title_cache, title_id, self.current_region, account)
@abstractmethod
def authenticate(self, cookies: CookieJar | None = None, credential: Credential | None = None) -> None: