cast date and remainder parts as strings
This commit is contained in:
parent
29e6068db2
commit
d3b11d6361
@ -62,6 +62,7 @@ class ComicFilenameSerializer:
|
||||
# noop if only day.
|
||||
break
|
||||
if parts:
|
||||
parts = (str(part) for part in parts)
|
||||
date = "-".join(parts)
|
||||
self._log("After date", date)
|
||||
self.metadata = MappingProxyType({**self.metadata, "date": date})
|
||||
@ -79,6 +80,7 @@ class ComicFilenameSerializer:
|
||||
"""Add the remainders specially."""
|
||||
if remainders := self.metadata.get("remainders"):
|
||||
if isinstance(remainders, Sequence):
|
||||
remainders = (str(remainder) for remainder in remainders)
|
||||
remainder = " ".join(remainders)
|
||||
else:
|
||||
remainder = str(remainders)
|
||||
|
@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
||||
|
||||
[tool.poetry]
|
||||
name = "comicfn2dict"
|
||||
version = "0.2.0a1"
|
||||
version = "0.2.0a2"
|
||||
description = "Parse common comic filenames and return a dict of metadata attributes. Includes a cli."
|
||||
license = "GPL-3.0-only"
|
||||
authors = ["AJ Slater <aj@slater.net>"]
|
||||
|
Loading…
Reference in New Issue
Block a user