Skip to content

Commit

Permalink
Merge pull request #56 from seasidesparrow/subtitle_fix.20240228
Browse files Browse the repository at this point in the history
correctly captures subtitles
  • Loading branch information
seasidesparrow authored Feb 28, 2024
2 parents 2fc718b + 03bfa4a commit 61f793c
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions adsmanparse/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,17 @@ def _get_title(self):
title_ln = title.get('langNative', None)
if title_en:
self.output['title'] = title_en
else:
if title_tn:
self.output['title'] = title_tn
self.output['language'] = title_ln
elif title_tn:
self.output['title'] = title_tn
self.output['language'] = title_ln
if subtitle:
self.output['title'] += ": " + subtitle
subtitle_en = subtitle.get('textEnglish', None)
subtitle_tn = subtitle.get('textNative', None)
subtitle_ln = subtitle.get('langNative', None)
if subtitle_en:
self.output['title'] += ": " + subtitle_en
elif subtitle_tn:
self.output['title'] += ": " + subtitle_tn


# INDIVIDUAL NAME
Expand Down

0 comments on commit 61f793c

Please sign in to comment.