The Pitt S01e11 720p Web-dl __full__ -

It sounds like you're looking for a that can process or identify a file named exactly like:

return new_path if name == " main ": test_file = "the pitt s01e11 720p web-dl.mkv" parsed = parse_tv_filename(test_file) print("Parsed:", parsed) the pitt s01e11 720p web-dl

return { "show": show, "season": season, "episode": episode, "quality": quality, "source": source.lower(), "extension": ext } def clean_rename(old_path: Path, output_dir: Path = None, dry_run=True): """ Rename a messy TV file to 'Show Name - S01E11 - Quality Source.ext' """ old_path = Path(old_path) info = parse_tv_filename(old_path.name) It sounds like you're looking for a that

# Dry run rename clean_rename(Path(test_file), dry_run=True) parsed) return { "show": show

# Pattern: show name + sXXeYY + optional quality + optional source pattern = r'^(.*?)\s+s(\d+)e(\d+)\s+(\d+p)?\s*-?\s*(\w+)?$' match = re.search(pattern, name, re.IGNORECASE)