feat(import): include cover-art attachments in --export/--import

Export URL-backed attachments per title and rebuild them on import so they ride along into the muxed output. Local font attachments are skipped (not portable).
This commit is contained in:
imSp4rky
2026-05-26 17:37:44 -06:00
parent 1cb0e4b766
commit 96fd971af0
3 changed files with 25 additions and 0 deletions
+4
View File
@@ -125,6 +125,10 @@ class Attachment:
def __str__(self) -> str:
return " | ".join(filter(bool, ["ATT", self.name, self.mime_type, self.description]))
def to_dict(self) -> dict[str, Optional[str]]:
"""Serialise a URL-backed attachment for export/import."""
return {"url": self.url, "name": self.name, "mime_type": self.mime_type, "description": self.description}
@property
def id(self) -> str:
"""Compute an ID from the attachment data."""