mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-24 09:55:12 +00:00
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:
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user