mirror of
https://github.com/morpheus65535/bazarr
synced 2025-03-11 22:52:49 +00:00
Merge remote-tracking branch 'origin/development' into development
This commit is contained in:
commit
516df9d410
2 changed files with 32 additions and 2 deletions
13
.github/dependabot.yml
vendored
13
.github/dependabot.yml
vendored
|
@ -8,6 +8,19 @@ updates:
|
||||||
prefix: "[bot]"
|
prefix: "[bot]"
|
||||||
open-pull-requests-limit: 1
|
open-pull-requests-limit: 1
|
||||||
target-branch: "development"
|
target-branch: "development"
|
||||||
|
groups:
|
||||||
|
fortawesome:
|
||||||
|
patterns:
|
||||||
|
- "@fortawesome*"
|
||||||
|
mantine:
|
||||||
|
patterns:
|
||||||
|
- "@mantine*"
|
||||||
|
react:
|
||||||
|
patterns:
|
||||||
|
- "react"
|
||||||
|
- "react-dom"
|
||||||
|
- "@types/react"
|
||||||
|
- "@types/react-dom"
|
||||||
- package-ecosystem: 'github-actions'
|
- package-ecosystem: 'github-actions'
|
||||||
directory: '/'
|
directory: '/'
|
||||||
schedule:
|
schedule:
|
||||||
|
|
|
@ -25,10 +25,20 @@ except ImportError:
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
# TODO: Test and Support Other Languages
|
|
||||||
supported_languages = [
|
supported_languages = [
|
||||||
|
"ara", # Arabic
|
||||||
"eng", # English
|
"eng", # English
|
||||||
|
"fin", # Finnish
|
||||||
|
"fra", # French
|
||||||
|
"heb", # Hebrew
|
||||||
"ita", # Italian
|
"ita", # Italian
|
||||||
|
"jpn", # Japanese
|
||||||
|
"por", # Portuguese
|
||||||
|
"pol", # Polish
|
||||||
|
"spa", # Spanish
|
||||||
|
"swe", # Swedish
|
||||||
|
"tha", # Thai
|
||||||
|
"tur", # Turkish
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -128,8 +138,15 @@ class AnimeToshoProvider(Provider, ProviderSubtitleArchiveMixin):
|
||||||
for subtitle_file in subtitle_files:
|
for subtitle_file in subtitle_files:
|
||||||
hex_id = format(subtitle_file['id'], '08x')
|
hex_id = format(subtitle_file['id'], '08x')
|
||||||
|
|
||||||
|
lang = Language.fromalpha3b(subtitle_file['info']['lang'])
|
||||||
|
|
||||||
|
# For Portuguese and Portuguese Brazilian they both share the same code, the name is the only
|
||||||
|
# identifier AnimeTosho provides.
|
||||||
|
if lang.alpha3 == 'por' and subtitle_file['info']['name'].lower().find('brazil'):
|
||||||
|
lang = Language('por', 'BR')
|
||||||
|
|
||||||
subtitle = self.subtitle_class(
|
subtitle = self.subtitle_class(
|
||||||
Language.fromalpha3b(subtitle_file['info']['lang']),
|
lang,
|
||||||
storage_download_url + '{}/{}.xz'.format(hex_id, subtitle_file['id']),
|
storage_download_url + '{}/{}.xz'.format(hex_id, subtitle_file['id']),
|
||||||
meta=file,
|
meta=file,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue