Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Audionut committed Sep 4, 2024
1 parent f55284d commit 97eafcd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/trackers/AITHER.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ async def upload(self, meta):

async def edit_name(self, meta):
aither_name = meta['name']

# Helper function to check if English audio is present
def has_english_audio(tracks, is_bdmv=False):
for track in tracks:
Expand All @@ -115,7 +115,7 @@ def has_english_audio(tracks, is_bdmv=False):
if isinstance(track.get('Language'), str) and track.get('Language').startswith('en'):
return True
return False

# Helper function to get audio language
def get_audio_lang(tracks, is_bdmv=False):
if is_bdmv:
Expand All @@ -126,7 +126,7 @@ def get_audio_lang(tracks, is_bdmv=False):
try:
with open(f"{meta.get('base_dir')}/tmp/{meta.get('uuid')}/MediaInfo.json", 'r', encoding='utf-8') as f:
mi = json.load(f)

audio_tracks = mi['media']['track']
has_eng_audio = has_english_audio(audio_tracks)
if not has_eng_audio:
Expand Down

0 comments on commit 97eafcd

Please sign in to comment.