Skip to content

Commit

Permalink
Use English as fallback for overwrite_anime_original_title when Romaj…
Browse files Browse the repository at this point in the history
…i is not avaialble (#404)
  • Loading branch information
antonsoroko authored Apr 29, 2024
1 parent 34e791a commit 4e3ed2f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion burst/filtering.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,14 @@ def use_anime(self, provider, payload):
self.max_size = get_float(get_setting('max_size_episodes'))
self.check_sizes()
self.info = payload
# Overwrite anime's original title if needed
if 'titles' in self.info and self.info['titles']:
if overwrite_anime_original_title == 'jp' or overwrite_anime_original_title == '1':
if 'jp' in self.info['titles'] and self.info['titles']['jp']:
self.info['titles']['original'] = self.info['titles']['jp']
elif overwrite_anime_original_title == 'en' or overwrite_anime_original_title == '2':
else:
overwrite_anime_original_title = 'en' # fallback to English if Romaji is not available
if overwrite_anime_original_title == 'en' or overwrite_anime_original_title == '2':
if 'en' in self.info['titles'] and self.info['titles']['en']:
self.info['titles']['original'] = self.info['titles']['en']
self.url = u"%s%s" % (definition['base_url'], anime_query)
Expand Down

0 comments on commit 4e3ed2f

Please sign in to comment.