Skip to content

Commit

Permalink
feat: support for descriptive and transcribed titles
Browse files Browse the repository at this point in the history
  • Loading branch information
phette23 committed Aug 14, 2024
1 parent 2eedf27 commit 380aac1
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions migrate/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,20 @@ def addl_titles(self) -> list[dict[str, str]]:
# titles other than the first
for title in mklist(titleinfo.get("title")):
if idx > 0:
atype = titleinfo.get("@type")
if atype == "alternative":
ttype = titleinfo.get("@type")
if ttype == "alternative":
atitles.append(
{"title": title, "type": {"id": "alternative-title"}}
)
elif atype == "translated":
elif ttype == "descriptive":
atitles.append(
{"title": title, "type": {"id": "descriptive-title"}}
)
elif ttype == "transcribed":
atitles.append(
{"title": title, "type": {"id": "transcribed-title"}}
)
elif ttype == "translated":
atitles.append(
{"title": title, "type": {"id": "translated-title"}}
)
Expand Down

0 comments on commit 380aac1

Please sign in to comment.