It strips out technical junk (like "BR1080p") so you can search for just the film title.
It makes the film instantly recognizable in a file explorer or media player. 14143-BR1080p-SUBS-RETURNOFTHELIVINGDEAD-2-1988...
You can use the year 1988 to auto-sort into "80s Horror" folders. It strips out technical junk (like "BR1080p") so
import re def clean_movie_title(filename): # Remove the starting ID and common tags raw_title = filename.split('-')[-3] + " " + filename.split('-')[-2] year = filename.split('-')[-1] # Humanize the title clean_name = raw_title.replace("RETURNOFTHELIVINGDEAD", "Return of the Living Dead").title() clean_name = clean_name.replace(" 2", " Part II") return f"{clean_name} ({year})" # Example Usage file_string = "14143-BR1080p-SUBS-RETURNOFTHELIVINGDEAD-2-1988" print(f"Original: {file_string}") print(f"Cleaned: {clean_movie_title(file_string)}") Use code with caution. Copied to clipboard Why this is useful: 14143-BR1080p-SUBS-RETURNOFTHELIVINGDEAD-2-1988...