The Pitt S01e11 720p Web-dl __link__ May 2026
return new_path if name == " main ": test_file = "the pitt s01e11 720p web-dl.mkv" parsed = parse_tv_filename(test_file) print("Parsed:", parsed)
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) the pitt s01e11 720p web-dl
new_name = f"{info['show']} - S{info['season']:02d}E{info['episode']:02d} - {info['quality']} {info['source'].upper()}{info['extension']}" new_path = (output_dir or old_path.parent) / new_name return new_path if name == " main ":
It sounds like you're looking for a that can process or identify a file named exactly like: parsed) return { "show": show
if dry_run: print(f"[DRY RUN] Would rename:\n {old_path.name}\n→ {new_name}\n") else: shutil.move(str(old_path), str(new_path)) print(f"✓ Renamed to: {new_name}")
: