Compare commits

..

No commits in common. "4b082e0930eb74dd53607a23739057484348bea4" and "5ecaf89d154e1b0d550554f6f469e60b26487fc0" have entirely different histories.

4 changed files with 19 additions and 47 deletions

View File

@ -82,6 +82,13 @@ choco install comictagger
<sub><b>davide-romanini</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/fcanc">
<img src="https://avatars.githubusercontent.com/u/4999486?v=4" width="100;" alt="fcanc"/>
<br />
<sub><b>fcanc</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/lordwelch">
<img src="https://avatars.githubusercontent.com/u/7547075?v=4" width="100;" alt="lordwelch"/>
@ -102,13 +109,6 @@ choco install comictagger
<br />
<sub><b>MichaelFitzurka</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/fcanc">
<img src="https://avatars.githubusercontent.com/u/4999486?v=4" width="100;" alt="fcanc"/>
<br />
<sub><b>fcanc</b></sub>
</a>
</td></tr>
<tr>
<td align="center">

View File

@ -46,12 +46,6 @@ def identifier(parser: settngs.Manager) -> None:
action=AppendAction,
help="When enabled filters the listed publishers from all search results",
)
parser.add_setting(
"--tpb-detection",
default=False,
action=argparse.BooleanOptionalAction,
help="Enables TPB detection. May stop comics not marked as a TPB in ComicVine from being found.",
)
def dialog(parser: settngs.Manager) -> None:

View File

@ -48,7 +48,6 @@ class SearchKeys(TypedDict):
month: int | None
year: int | None
issue_count: int | None
page_count: int | None
class Score(TypedDict):
@ -102,8 +101,6 @@ class IssueIdentifier:
# used to eliminate unlikely publishers
self.publisher_filter = [s.strip().casefold() for s in config.identifier_publisher_filter]
self.tpb_detection = config.identifier_tpb_detection
self.additional_metadata = GenericMetadata()
self.output_function: Callable[[str], None] = IssueIdentifier.default_write_output
self.callback: Callable[[int, int], None] | None = None
@ -227,7 +224,6 @@ class IssueIdentifier:
year=self.additional_metadata.year,
month=self.additional_metadata.month,
issue_count=self.additional_metadata.issue_count,
page_count=None,
)
return search_keys
@ -264,7 +260,6 @@ class IssueIdentifier:
year=working_md.year,
month=working_md.month,
issue_count=working_md.issue_count,
page_count=len(working_md.pages),
)
return search_keys
@ -650,33 +645,19 @@ class IssueIdentifier:
self.match_list.remove(match_item)
# One more test for the case choosing limited series first issue vs a trade with the same cover:
# if we have an issue count == 1 or a page count > 100, we only include TPBs
if len(self.match_list) >= 2 and (keys["issue_count"] is not None or keys["page_count"] is not None):
issue_count = keys["issue_count"] or 0
page_count = keys["page_count"] or 0
if issue_count == 1:
if self.tpb_detection and page_count > 100:
new_list = []
for match in self.match_list:
if "tpb" in match["issue_title"].casefold():
new_list.append(match)
else:
self.log_msg(
f"Removing series {match['series']} [{match['series_id']}] from consideration (not a tpb)"
)
# if we have a given issue count > 1 and the series from CV has count==1, remove it from match list
else:
new_list = []
for match in self.match_list:
if match["cv_issue_count"] == 1:
self.log_msg(
f"Removing series {match['series']} [{match['series_id']}] from consideration (only 1 issue)"
)
else:
new_list.append(match)
# if we have a given issue count > 1 and the series from CV has count==1, remove it from match list
if len(self.match_list) >= 2 and keys["issue_count"] is not None and keys["issue_count"] != 1:
new_list = []
for match in self.match_list:
if match["cv_issue_count"] != 1:
new_list.append(match)
else:
self.log_msg(
f"Removing series {match['series']} [{match['series_id']}] from consideration (only 1 issue)"
)
if len(new_list) > 0:
self.match_list = new_list
if len(new_list) > 0:
self.match_list = new_list
if len(self.match_list) == 1:
self.log_msg("--------------------------------------------------------------------------")

View File

@ -72,7 +72,6 @@ metadata_keys = [
"issue_count": 6,
"issue_number": "1",
"month": 10,
"page_count": 24,
"series": "Cory Doctorow's Futuristic Tales of the Here and Now",
"year": 2007,
},
@ -83,7 +82,6 @@ metadata_keys = [
"issue_count": 6,
"issue_number": "1",
"month": 10,
"page_count": 24,
"series": "test",
"year": 2007,
},
@ -94,7 +92,6 @@ metadata_keys = [
"issue_count": 6,
"issue_number": "3",
"month": 10,
"page_count": 24,
"series": "test",
"year": 2007,
},