fix: resolve compatibility issues from upstream rebase

- Fix f-string quote syntax in ereolen.py for Python < 3.12
- Fix Storytel login signature to match new url parameter
- Fix Nextory API field names (identifier vs isbn confusion)
This commit is contained in:
^_^ 2026-01-15 10:59:17 +01:00
parent 476d460846
commit ed8fe9eafa
3 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@ class Ereolen(Source):
.read_text("utf8") \
.split("\n")
match: list[str] = [
rf"https://(www.)?({"|".join(library_domains)})/reader\?orderid=.+$",
rf"https://(www.)?({'|'.join(library_domains)})/reader\?orderid=.+$",
]
_authentication_methods = [ "login" ]

View File

@ -37,7 +37,7 @@ class Nextory(Source):
session_response = await self._client.post(
"https://api.nextory.com/user/v1/sessions",
json = {
"isbn": username,
"identifier": username,
"password": password
},
)
@ -144,7 +144,7 @@ class Nextory(Source):
for format_type in ("epub", "pdf"):
for fmt in product_data["formats"]:
if fmt["type"] == format_type:
return (format_type, fmt["isbn"])
return (format_type, fmt["identifier"])
raise InvalidUrl

View File

@ -21,7 +21,7 @@ class Storytel(Source):
# Authentication methods
async def login(self, username: str, password: str, **kwargs) -> None:
async def login(self, url: str, username: str, password: str) -> None:
self.__username = username
self.__password = self.encrypt_password(password)
self._client.headers.update({"User-Agent": "Storytel/23.49 (Android 13; Pixel 6) Release/2288481"})