-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Aither] Foreign language not being added to name #300
Comments
Did you happen to have partial data in the tmp directory by chance? Can you delete everything from the associated tmp directory and try again if that was the case. Else, please make sure you are using a recentish version, and advise if you can modify some source code files. This section can have some console prints added: Upload-Assistant/src/trackers/AITHER.py Line 146 in 5d81cf1
if not meta['is_disc']:
def has_english_audio(tracks=None, media_info_text=None):
if media_info_text:
audio_section = re.findall(r'Audio[\s\S]+?Language\s+:\s+(\w+)', media_info_text)
for i, language in enumerate(audio_section):
language = language.lower().strip()
console.print(f"Language: {language}")
if language.lower().startswith('en'): # Check if it's English
return True
return False
def get_audio_lang(tracks=None, is_bdmv=False, media_info_text=None):
if media_info_text:
match = re.search(r'Audio[\s\S]+?Language\s+:\s+(\w+)', media_info_text)
if match:
console.print(f"Match: {match.group(1)}")
return match.group(1).upper()
return ""
try:
media_info_path = f"{meta['base_dir']}/tmp/{meta['uuid']}/MEDIAINFO.txt"
with open(media_info_path, 'r', encoding='utf-8') as f:
media_info_text = f.read()
if not has_english_audio(media_info_text=media_info_text):
audio_lang = get_audio_lang(media_info_text=media_info_text)
console.print(f"Audio Language: {audio_lang}")
if audio_lang:
if (name_type == "REMUX" and source in ("PAL DVD", "NTSC DVD", "DVD")):
aither_name = aither_name.replace(str(meta['year']), f"{meta['year']} {audio_lang}", 1)
else:
aither_name = aither_name.replace(meta['resolution'], f"{audio_lang} {meta['resolution']}", 1)
except (FileNotFoundError, KeyError) as e:
print(f"Error processing MEDIAINFO.txt: {e}") It seems fine here:
|
Thanks for your quick response :) I first deleted my tmp directory and retried without any changes. I used "git pull", checked for any updated requirements, and then added the 3 console.print lines to my AITHER.py file, but still not seeing the language added in the name. Here's what I'm seeing in my terminal:
|
Use The Once you actually proceed to upload, the name will be modified to each sites individual standards as necessary. I'm going to close this off, as the mediainfo block you posted is valid for the aither code to work, and I'm certain it's just your caution be overly cautious. Feel free to open if I'm wrong. Cheers. |
Attempting to upload a season pack of a foreign TV Show to Aither which requires language in the name due to no English audio track present, but it's not being detected for either the entire season folder or for individual episode mkvs.
MediaInfo:
UA is pulling up the name as "Love in the Big City AKA Daedosiui Sarangbeob S01 1080p VIKI WEB-DL AAC 2.0 H.264" instead of "Love in the Big City AKA Daedosiui Sarangbeob S01 KOREAN 1080p VIKI WEB-DL AAC 2.0 H.264" per Aither naming requirements.
The text was updated successfully, but these errors were encountered: