mirror of
https://github.com/jo1gi/grawlix.git
synced 2026-07-10 18:04:51 -06:00
Fix Nextory: bump X-App-Version and handle null series
The Nextory API now rejects the old X-App-Version "5.4.1" with an
AppDeprecateError. Bump it to "2026.05.4" (current Android app version).
Also, the product API can return {"series": null} for standalone books
(not just omit the key entirely). The previous `"series" in product_info`
check passed in that case and we crashed on a NoneType subscript.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
3267398929
commit
d231418a57
@ -30,7 +30,7 @@ class Nextory(Source):
|
||||
self._client.headers.update(
|
||||
{
|
||||
"X-Application-Id": "200",
|
||||
"X-App-Version": "5.4.1",
|
||||
"X-App-Version": "2026.05.4",
|
||||
"X-Locale": LOCALE,
|
||||
"X-Model": "Personal Computer",
|
||||
"X-Device-Id": device_id,
|
||||
@ -139,9 +139,10 @@ class Nextory(Source):
|
||||
|
||||
@staticmethod
|
||||
def _extract_series_name(product_info: dict) -> Optional[str]:
|
||||
if not "series" in product_info:
|
||||
series = product_info.get("series")
|
||||
if not series:
|
||||
return None
|
||||
return product_info["series"]["name"]
|
||||
return series["name"]
|
||||
|
||||
|
||||
async def _get_book_id_from_url_id(self, url_id: str) -> str:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user