From 022a7f0c3b9747d040c7bfaa8e6823679791bcb1 Mon Sep 17 00:00:00 2001 From: Audionut Date: Tue, 26 Nov 2024 21:43:15 +1000 Subject: [PATCH] OE - NOGRP tag --- src/trackers/OE.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/trackers/OE.py b/src/trackers/OE.py index d71d7b26..84ddb61f 100644 --- a/src/trackers/OE.py +++ b/src/trackers/OE.py @@ -138,6 +138,8 @@ async def edit_name(self, meta): resolution = meta.get('resolution') video_encode = meta.get('video_encode') name_type = meta.get('type', "") + tag_lower = meta['tag'].lower() + invalid_tags = ["nogrp", "nogroup", "unknown", "-unk-"] if name_type == "DVDRIP": if meta.get('category') == "MOVIE": @@ -176,6 +178,11 @@ def get_audio_lang(media_info_text=None): except (FileNotFoundError, KeyError) as e: print(f"Error processing MEDIAINFO.txt: {e}") + if meta['tag'] == "" or any(invalid_tag in tag_lower for invalid_tag in invalid_tags): + for invalid_tag in invalid_tags: + oe_name = re.sub(f"-{invalid_tag}", "", oe_name, flags=re.IGNORECASE) + oe_name = f"{oe_name}-NOGRP" + return oe_name async def get_cat_id(self, category_name):