Skip to content

Commit

Permalink
OE - NOGRP tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Audionut committed Nov 26, 2024
1 parent 43bfafc commit 022a7f0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/trackers/OE.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 022a7f0

Please sign in to comment.