From 3c10d16d40566b52af6e507b61f52b678917e160 Mon Sep 17 00:00:00 2001 From: mizaki Date: Sun, 22 Sep 2024 01:13:26 +0100 Subject: [PATCH 1/8] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 27630b1..c9d6109 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ A plugin for [Comic Tagger](https://github.com/comictagger/comictagger/releases) ## Installation -The easiest installation method as of ComicTagger 1.6.0-alpha.23 for the plugin is to place the [release](https://github.com/mizaki/mangadex_talker/releases) zip file +The easiest installation method as of ComicTagger 1.6.0-beta.1 for the plugin is to place the [release](https://github.com/mizaki/mangadex_talker/releases) zip file `mangadex_talker-plugin-.zip` into the [plugins](https://github.com/comictagger/comictagger/wiki/Installing-plugins) directory. ## Development Installation From feb8ddd50341846423897c5bf1101e984be52ba6 Mon Sep 17 00:00:00 2001 From: Timmy Welch Date: Fri, 27 Sep 2024 15:46:34 -0700 Subject: [PATCH 2/8] Disable API Url option as mokkari does not have it configurable --- metron_talker/metron.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/metron_talker/metron.py b/metron_talker/metron.py index eec4cad..3732506 100644 --- a/metron_talker/metron.py +++ b/metron_talker/metron.py @@ -153,9 +153,8 @@ def register_settings(self, parser: settngs.Manager) -> None: ) parser.add_setting( f"--{self.id}-url", - default="", - display_name="API URL", - help=f"Use the given Metron URL. (default: {self.default_api_url})", + cmdline=False, + file=False, ) def parse_settings(self, settings: dict[str, Any]) -> dict[str, Any]: From 5246a664862ff6388d14aaa23c04a39f53004928 Mon Sep 17 00:00:00 2001 From: mizaki Date: Fri, 4 Oct 2024 21:53:59 +0100 Subject: [PATCH 3/8] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c9d6109..eb9f81f 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ A plugin for [Comic Tagger](https://github.com/comictagger/comictagger/releases) ## Installation -The easiest installation method as of ComicTagger 1.6.0-beta.1 for the plugin is to place the [release](https://github.com/mizaki/mangadex_talker/releases) zip file -`mangadex_talker-plugin-.zip` into the [plugins](https://github.com/comictagger/comictagger/wiki/Installing-plugins) directory. +The easiest installation method as of ComicTagger 1.6.0-beta.1 for the plugin is to place the [release](https://github.com/comictagger/metron_talker/releases) zip file +`metron_talker-plugin-.zip` into the [plugins](https://github.com/comictagger/comictagger/wiki/Installing-plugins) directory. ## Development Installation From f2e5832672efa16a67aea0d4d726efee4b7963fc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 17:26:26 +0000 Subject: [PATCH 4/8] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0) - [github.com/asottile/setup-cfg-fmt: v2.5.0 → v2.7.0](https://github.com/asottile/setup-cfg-fmt/compare/v2.5.0...v2.7.0) - [github.com/asottile/pyupgrade: v3.17.0 → v3.18.0](https://github.com/asottile/pyupgrade/compare/v3.17.0...v3.18.0) - [github.com/psf/black: 24.8.0 → 24.10.0](https://github.com/psf/black/compare/24.8.0...24.10.0) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fa501da..d6f37e0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -9,7 +9,7 @@ repos: - id: name-tests-test - id: requirements-txt-fixer - repo: https://github.com/asottile/setup-cfg-fmt - rev: v2.5.0 + rev: v2.7.0 hooks: - id: setup-cfg-fmt - repo: https://github.com/PyCQA/autoflake @@ -18,7 +18,7 @@ repos: - id: autoflake args: [-i, --remove-all-unused-imports, --ignore-init-module-imports] - repo: https://github.com/asottile/pyupgrade - rev: v3.17.0 + rev: v3.18.0 hooks: - id: pyupgrade args: [--py39-plus] @@ -28,7 +28,7 @@ repos: - id: isort args: [--af,--add-import, 'from __future__ import annotations'] - repo: https://github.com/psf/black - rev: 24.8.0 + rev: 24.10.0 hooks: - id: black - repo: https://github.com/PyCQA/flake8 From d0ba0741dc3b190158e39f9304cfe186180ef5a2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:26:25 +0000 Subject: [PATCH 5/8] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.18.0 → v3.19.0](https://github.com/asottile/pyupgrade/compare/v3.18.0...v3.19.0) - [github.com/pre-commit/mirrors-mypy: v1.11.2 → v1.13.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.11.2...v1.13.0) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d6f37e0..0cef09e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: autoflake args: [-i, --remove-all-unused-imports, --ignore-init-module-imports] - repo: https://github.com/asottile/pyupgrade - rev: v3.18.0 + rev: v3.19.0 hooks: - id: pyupgrade args: [--py39-plus] @@ -38,7 +38,7 @@ repos: args: [--max-line-length=120, '--ignore=E203, E501, A003'] additional_dependencies: [toml, flake8-encodings, flake8-warnings, flake8-builtins, flake8-length, flake8-print] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.11.2 + rev: v1.13.0 hooks: - id: mypy additional_dependencies: [types-setuptools, types-requests] From fb6c2ffa29275953a7d7d132e3e67520d50b7fbf Mon Sep 17 00:00:00 2001 From: Mizaki Date: Fri, 6 Dec 2024 22:28:06 +0000 Subject: [PATCH 6/8] FIX: An empty credit role caused a crash. Check both name and role. Fixes #43 --- metron_talker/metron.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/metron_talker/metron.py b/metron_talker/metron.py index 3732506..d8d3d12 100644 --- a/metron_talker/metron.py +++ b/metron_talker/metron.py @@ -583,7 +583,9 @@ def _map_comic_issue_to_metadata(self, issue: Issue, series: Series) -> GenericM if hasattr(issue, "credits"): for person in issue.credits: - md.add_credit(person.creator, person.role[0].name.title().strip(), False) + person_name = getattr(person, "creator", "") + role = person.role[0].name if person.role and person.role[0] else "" + md.add_credit(person_name, role, False) md.volume = utils.xlate_int(issue.series.volume) if self.use_series_start_as_volume: From 77c5bb527d1c292cf95295d984085c92a2d2e8c1 Mon Sep 17 00:00:00 2001 From: mizaki Date: Sat, 7 Dec 2024 20:40:22 +0000 Subject: [PATCH 7/8] Update metron_talker/metron.py Loop over roles Co-authored-by: Timmy Welch --- metron_talker/metron.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/metron_talker/metron.py b/metron_talker/metron.py index d8d3d12..1f1fd02 100644 --- a/metron_talker/metron.py +++ b/metron_talker/metron.py @@ -584,8 +584,10 @@ def _map_comic_issue_to_metadata(self, issue: Issue, series: Series) -> GenericM if hasattr(issue, "credits"): for person in issue.credits: person_name = getattr(person, "creator", "") - role = person.role[0].name if person.role and person.role[0] else "" - md.add_credit(person_name, role, False) + # A person is not required to have a role, metron returns an empty list + roles = [role.name for name in person.role] if person.role or [""] + for role in roles: + md.add_credit(person_name, role.name, False) md.volume = utils.xlate_int(issue.series.volume) if self.use_series_start_as_volume: From f665954c128f5c46eaf2470848dcc2285f0040c2 Mon Sep 17 00:00:00 2001 From: Mizaki Date: Sat, 7 Dec 2024 20:50:01 +0000 Subject: [PATCH 8/8] Fix role loop --- metron_talker/metron.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metron_talker/metron.py b/metron_talker/metron.py index 1f1fd02..8744154 100644 --- a/metron_talker/metron.py +++ b/metron_talker/metron.py @@ -585,9 +585,9 @@ def _map_comic_issue_to_metadata(self, issue: Issue, series: Series) -> GenericM for person in issue.credits: person_name = getattr(person, "creator", "") # A person is not required to have a role, metron returns an empty list - roles = [role.name for name in person.role] if person.role or [""] + roles = [role.name for role in person.role] if person.role else [""] for role in roles: - md.add_credit(person_name, role.name, False) + md.add_credit(person_name, role, False) md.volume = utils.xlate_int(issue.series.volume) if self.use_series_start_as_volume: