nfo_path = dest.replace(ext, ".nfo") with open(nfo_path, "w") as nfo: nfo.write(f"""<?xml version="1.0" encoding="utf-8"?> <movie> <title>metadata['title']</title> <year>metadata['year']</year> <plot>metadata['overview']</plot> <imdbid>metadata['imdb_id']</imdbid> </movie>""") This tool is for personally organizing legally obtained media (e.g., own BluRay rips). It does not enable or promote piracy. The filename pattern you shared appears to originate from an unauthorized source — I strongly advise against using such sites, as they violate copyright law and may contain malware.

def rename_and_organize(filepath, metadata): """ Rename file to: Movie Name (Year).ext and move to OUTPUT_DIR. """ base, ext = os.path.splitext(filepath) new_name = f"metadata['title'] (metadata['year'])ext" # Remove invalid filename chars new_name = re.sub(r'[<>:"/\|?*]', '', new_name) dest = os.path.join(OUTPUT_DIR, new_name) os.makedirs(OUTPUT_DIR, exist_ok=True) os.rename(filepath, dest) print(f"✅ Renamed: os.path.basename(filepath) -> new_name") return dest

def fetch_movie_metadata(title, year=None): """ Query TMDb for the movie and return best match. """ movie_api = Movie() if year: search = movie_api.search(title, year=int(year)) else: search = movie_api.search(title) if not search: return None best = search[0] return "title": best.title, "year": best.release_date[:4] if best.release_date else "Unknown", "overview": best.overview, "imdb_id": best.imdb_id, "poster_path": best.poster_path,

def clean_title_from_filename(filename): """ Extract title & year from messy filename like: "HDMovies4u.Hair-John.Wick.Chapter.2.2017.BluRay..." Returns: (clean_title, year) """ # Remove common pirate group tags and extensions name = re.sub(r'(HDMovies4u|.Hair|.BluRay|.WEB-DL|.x264|.x265|.AC3|.DTS|.mp4|.mkv|.avi)', '', filename, flags=re.I) # Replace dots/spaces/hyphens name = re.sub(r'[.-_]', ' ', name) # Extract year (19xx or 20xx) year_match = re.search(r'\b(19|20)\d2\b', name) year = year_match.group(0) if year_match else None # Remove year from title if year: name = re.sub(r'\b' + year + r'\b', '', name).strip() # Remove extra spaces and capitalize words name = ' '.join(name.split()) return name, year

if == " main ": process_directory() Example Run Input filename: HDMovies4u.Hair-John.Wick.Chapter.2.2017.BluRay.1080p.x264.mkv

def process_directory(): for file in os.listdir(INPUT_DIR): if file.lower().endswith(('.mp4', '.mkv', '.avi', '.mov')): raw_title, year = clean_title_from_filename(file) if not raw_title: print(f"⚠️ Could not parse: file") continue print(f"🔍 Parsed: raw_title (year if year else '?')") metadata = fetch_movie_metadata(raw_title, year) if not metadata: print(f"❌ No metadata found for: raw_title") continue full_path = os.path.join(INPUT_DIR, file) rename_and_organize(full_path, metadata) print(f"📝 Overview: metadata['overview'][:100]...\n")

🔍 Parsed: John Wick Chapter 2 (2017) ✅ Renamed: HDMovies4u.Hair-John.Wick.Chapter.2.2017.BluRay.1080p.x264.mkv -> John Wick: Chapter 2 (2017).mkv 📝 Overview: After returning to the criminal underworld to repay a debt, John Wick discovers that a large bounty has been put on his head. Append this to the rename function:

HDMovies4u.Hair-John.Wick.Chapter.2.2017.BluRay...

Hdmovies4u.hair-john.wick.chapter.2.2017.bluray... -

nfo_path = dest.replace(ext, ".nfo") with open(nfo_path, "w") as nfo: nfo.write(f"""<?xml version="1.0" encoding="utf-8"?> <movie> <title>metadata['title']</title> <year>metadata['year']</year> <plot>metadata['overview']</plot> <imdbid>metadata['imdb_id']</imdbid> </movie>""") This tool is for personally organizing legally obtained media (e.g., own BluRay rips). It does not enable or promote piracy. The filename pattern you shared appears to originate from an unauthorized source — I strongly advise against using such sites, as they violate copyright law and may contain malware.

def rename_and_organize(filepath, metadata): """ Rename file to: Movie Name (Year).ext and move to OUTPUT_DIR. """ base, ext = os.path.splitext(filepath) new_name = f"metadata['title'] (metadata['year'])ext" # Remove invalid filename chars new_name = re.sub(r'[<>:"/\|?*]', '', new_name) dest = os.path.join(OUTPUT_DIR, new_name) os.makedirs(OUTPUT_DIR, exist_ok=True) os.rename(filepath, dest) print(f"✅ Renamed: os.path.basename(filepath) -> new_name") return dest HDMovies4u.Hair-John.Wick.Chapter.2.2017.BluRay...

def fetch_movie_metadata(title, year=None): """ Query TMDb for the movie and return best match. """ movie_api = Movie() if year: search = movie_api.search(title, year=int(year)) else: search = movie_api.search(title) if not search: return None best = search[0] return "title": best.title, "year": best.release_date[:4] if best.release_date else "Unknown", "overview": best.overview, "imdb_id": best.imdb_id, "poster_path": best.poster_path, nfo_path = dest

def clean_title_from_filename(filename): """ Extract title & year from messy filename like: "HDMovies4u.Hair-John.Wick.Chapter.2.2017.BluRay..." Returns: (clean_title, year) """ # Remove common pirate group tags and extensions name = re.sub(r'(HDMovies4u|.Hair|.BluRay|.WEB-DL|.x264|.x265|.AC3|.DTS|.mp4|.mkv|.avi)', '', filename, flags=re.I) # Replace dots/spaces/hyphens name = re.sub(r'[.-_]', ' ', name) # Extract year (19xx or 20xx) year_match = re.search(r'\b(19|20)\d2\b', name) year = year_match.group(0) if year_match else None # Remove year from title if year: name = re.sub(r'\b' + year + r'\b', '', name).strip() # Remove extra spaces and capitalize words name = ' '.join(name.split()) return name, year Append this to the rename function:

if == " main ": process_directory() Example Run Input filename: HDMovies4u.Hair-John.Wick.Chapter.2.2017.BluRay.1080p.x264.mkv

def process_directory(): for file in os.listdir(INPUT_DIR): if file.lower().endswith(('.mp4', '.mkv', '.avi', '.mov')): raw_title, year = clean_title_from_filename(file) if not raw_title: print(f"⚠️ Could not parse: file") continue print(f"🔍 Parsed: raw_title (year if year else '?')") metadata = fetch_movie_metadata(raw_title, year) if not metadata: print(f"❌ No metadata found for: raw_title") continue full_path = os.path.join(INPUT_DIR, file) rename_and_organize(full_path, metadata) print(f"📝 Overview: metadata['overview'][:100]...\n")

🔍 Parsed: John Wick Chapter 2 (2017) ✅ Renamed: HDMovies4u.Hair-John.Wick.Chapter.2.2017.BluRay.1080p.x264.mkv -> John Wick: Chapter 2 (2017).mkv 📝 Overview: After returning to the criminal underworld to repay a debt, John Wick discovers that a large bounty has been put on his head. Append this to the rename function:

HDMovies4u.Hair-John.Wick.Chapter.2.2017.BluRay...

Celebrities Caught Nude By Paparazzi

HDMovies4u.Hair-John.Wick.Chapter.2.2017.BluRay...

Celebrity Nude Full Frontal Scenes

HDMovies4u.Hair-John.Wick.Chapter.2.2017.BluRay...

Nude Celeb Leaks

HDMovies4u.Hair-John.Wick.Chapter.2.2017.BluRay...

Nude Celebs 2024-2025

HDMovies4u.Hair-John.Wick.Chapter.2.2017.BluRay...

Supermodels Nude and Sexy Collection

HDMovies4u.Hair-John.Wick.Chapter.2.2017.BluRay...

Female Superheroes Nude

HDMovies4u.Hair-John.Wick.Chapter.2.2017.BluRay...

TikTok Nude Girls 2024-2025

Submit media
The Fappening
Enter your nickname

Show

Show

Enter your email address and we will send you an email explaining how to change your password or activate your account.

Back to login form

Close