From 43d511e17e17782066b29e58fdc7ab6f4637d4e4 Mon Sep 17 00:00:00 2001 From: xenofem Date: Wed, 17 Jul 2024 16:26:16 -0400 Subject: [PATCH] fetch unmasked titles from dlsite metadata --- dlibrary/dlibrary.py | 2 +- flake.nix | 1 + patches/dlsite-async.patch | 13 +++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 patches/dlsite-async.patch diff --git a/dlibrary/dlibrary.py b/dlibrary/dlibrary.py index ec8ca26..c78deac 100755 --- a/dlibrary/dlibrary.py +++ b/dlibrary/dlibrary.py @@ -282,7 +282,7 @@ async def fetch_async(args): "circle": dlsite_metadata.circle, "date": dlsite_metadata.regist_date.date().isoformat(), "description": dlsite_metadata.description, - "series": dlsite_metadata.series, + "series": dlsite_metadata.title_name, } authors = dlsite_metadata.author or [] tags = dlsite_metadata.genre or [] diff --git a/flake.nix b/flake.nix index c4d3f8d..0f24b68 100644 --- a/flake.nix +++ b/flake.nix @@ -36,6 +36,7 @@ inherit pname version; sha256 = "sha256-cUhH7eNIoQUKt0nUl+wSGFGbZpKmtwPWyVR2PTJI1co="; }; + patches = [ ./patches/dlsite-async.patch ]; pyproject = true; nativeBuildInputs = [ pkgs.pdm ]; propagatedBuildInputs = [ diff --git a/patches/dlsite-async.patch b/patches/dlsite-async.patch new file mode 100644 index 0000000..6d313f5 --- /dev/null +++ b/patches/dlsite-async.patch @@ -0,0 +1,13 @@ +diff --git a/src/dlsite_async/work.py b/src/dlsite_async/work.py +index 46ae0d1..81d0bc5 100644 +--- a/src/dlsite_async/work.py ++++ b/src/dlsite_async/work.py +@@ -86,6 +86,8 @@ class Work: + page_count: Optional[int] = None + description: Optional[str] = None + sample_images: Optional[list[str]] = None ++ title_name: Optional[str] = None ++ title_id: Optional[str] = None + + @classmethod + def from_dict(cls, d: Mapping[str, Any]) -> "Work":