Skip to content

dasunpamod/Movie-Manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎬 Movie Manager Pro

Transform your chaotic media library into a beautifully organized collection

PowerShell Windows TMDb License

Features β€’ Installation β€’ Quick Start β€’ Usage β€’ How It Works β€’ Configuration β€’ FAQ



πŸ€” The Problem

Your movie folder looks like this:

πŸ“ Movies/
β”œβ”€β”€ πŸ“ The.Dark.Knight.2008.1080p.BluRay.x265.HEVC.AAC.5.1-BONE
β”œβ”€β”€ πŸ“ Inception.2010.2160p.4K.UHD.BluRay.REMUX.HDR.HEVC.Atmos-TiGER
β”œβ”€β”€ πŸ“ Interstellar.2014.REMASTERED.1080p.BluRay.x264.DTS-HD.MA.5.1-FGT
β”œβ”€β”€ 🎬 Parasite.2019.1080p.BluRay.mkv        ← loose file, no folder!
└── πŸ“ Caspers.First.Christmas.1979.1080p.WEB.UPSCALE.MULTI.AAC.2.0.H.265-OldT

Ugly. Unreadable. A mess.

✨ The Solution

After running Movie Manager Pro:

πŸ“ Movies/
β”œβ”€β”€ 🎬 The Dark Knight 2008/          ← with poster icon!
β”œβ”€β”€ 🎬 Inception 2010/                ← with poster icon!
β”œβ”€β”€ 🎬 Interstellar 2014/             ← with poster icon!
β”œβ”€β”€ 🎬 Parasite 2019/                 ← auto-created folder + poster icon!
└── 🎬 Caspers First Christmas 1979/  ← with poster icon!

Clean. Beautiful. Every folder has its movie poster as the icon. 🍿



πŸš€ Features

πŸ“‚ Smart Folder Renamer

  • Strips technical junk (codec, quality, release group)
  • Converts Dots.And_Underscores to proper spaces
  • Extracts and preserves the year
  • Moves loose video files into their own named folders
  • Removes website watermarks (YTS, RARBG, MkvDrama, etc.)
  • Handles TV series tags (S01E01, Season 1, etc.)

πŸ–ΌοΈ Poster Icon Setter

  • Fetches high-quality posters from TMDb
  • Converts posters to 256Γ—256 ICO format
  • Sets custom folder icons via desktop.ini
  • Supports both Movies and TV Series search
  • Progress bar with real-time status
  • Skips folders that already have icons

⚑ Full Auto Mode

  • Run both tools in sequence with a single command
  • Point it at a folder and walk away
  • Perfect for bulk-organizing new downloads

πŸ’Ύ Persistent Config

  • API token saved locally β€” enter it once, use forever
  • Config stored as JSON next to the script
  • Supports drag & drop folder paths


πŸ“¦ Installation

Prerequisites

Requirement Details
OS Windows 10 / 11
PowerShell 5.1+ (pre-installed on Windows)
TMDb Account Free API key from themoviedb.org

Steps

1. Clone this repository (or download the script):

git clone https://github.com/yourusername/movie-manager-pro.git
cd movie-manager-pro

2. Get your free TMDb API key:

  1. Create a free account at themoviedb.org
  2. Go to Settings β†’ API β†’ Create β†’ Request an API key
  3. Copy your API Read Access Token (the long one starting with eyJ...)

That's it. No other dependencies required. πŸŽ‰



⚑ Quick Start

# Run the script
powershell -ExecutionPolicy Bypass -File movie_manager.ps1

Or right-click movie_manager.ps1 β†’ Run with PowerShell



πŸ“– Usage

Interactive Menu

When you launch the script, you'll see a beautiful interactive menu:

  .----------------------------------------------------------.
  |                                                          |
  |   [1]  Folder Renamer                                   |
  |        Clean up messy folder names to Title Year         |
  |        Move loose files into their own folders           |
  |        Works for Movies & TV Series                      |
  |                                                          |
  |   [2]  Poster Icon Setter                                |
  |        Fetch posters from TMDb (Movies & TV)             |
  |        Set them as custom folder icons                   |
  |                                                          |
  |   [3]  Full Auto (Rename + Set Icons)                    |
  |        Run both tools in sequence                        |
  |                                                          |
  |   [0]  Exit                                              |
  |                                                          |
  '----------------------------------------------------------'

Option 1 β€” Folder Renamer

Cleans up messy folder names and organizes loose files.

Enter your choice: 1

Enter the folder path (or drag & drop a folder here):
> E:\Movies

What type of content is in this folder?
  [1] Movies
  [2] TV Series
> 1

Before & After Examples:

Before After
The.Dark.Knight.2008.1080p.BluRay.x265-BONE The Dark Knight 2008
Inception.2010.2160p.4K.UHD.BluRay.REMUX Inception 2010
My Mister - MkvDrama.net My Mister
Sherlock.S01-S04 Sherlock
Sisyphus.The.Myth.S01E01.720p.10bit.WEBDL Sisyphus The Myth

Note: Only folder names are changed β€” file names inside are never touched.

Option 2 β€” Poster Icon Setter

Fetches movie/TV posters from TMDb and sets them as folder icons.

Enter your choice: 2

Enter the folder path (or drag & drop a folder here):
> E:\Movies

What type of content is in this folder?
  [1] Movies
  [2] TV Series
> 1

Saved API token found: eyJhbGciOiJIUzI1...
Use saved token? [Y/n]: Y

  [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘] 90% (27/30)
    Interstellar 2014
      Searching: 'Interstellar' (2014)
      Found: Interstellar (2014-11-05)
      Icon set! βœ“

Option 3 β€” Full Auto

Runs the Folder Renamer first, then the Poster Icon Setter β€” one command does everything.

Enter your choice: 3

Enter the folder path (or drag & drop a folder here):
> E:\TV Series

What type of content is in this folder?
  [1] Movies
  [2] TV Series
> 2

// Renaming happens first...
// Then icons are fetched and applied...
// Done! πŸŽ‰


πŸ”§ How It Works

Folder Renamer β€” Cleaning Logic

graph LR
    A["Raw Name:<br/>The.Dark.Knight.2008.1080p.BluRay.x265-BONE"] --> B["Replace . _ with spaces"]
    B --> C["Strip website names"]
    C --> D["Find year (2008)"]
    D --> E["Cut everything after year"]
    E --> F["Clean Result:<br/>The Dark Knight 2008"]
Loading

The script uses a curated list of 60+ technical keywords to identify where the title ends and the junk begins:

  • Quality: 1080p, 2160p, 720p, 4K
  • Source: BluRay, WEBRip, WEB-DL, HDRip, DVDRip
  • Codec: x264, x265, HEVC, AVC, H.265
  • Audio: AAC, DTS, Atmos, FLAC, AC3
  • Tags: REMASTERED, EXTENDED, UNRATED, HDR
  • Groups: BONE, YTS, RARBG, Tigole, TiGER
  • Sites: MkvDrama.net, YTS.MX, pahe.in

Poster Icon Setter β€” Pipeline

graph TD
    A["πŸ“ Folder Name"] --> B["Parse title & year"]
    B --> C{"Search TMDb API"}
    C -->|Movie| D["GET /3/search/movie"]
    C -->|TV| E["GET /3/search/tv"]
    D --> F["Download poster (500px)"]
    E --> F
    F --> G["Convert to 256Γ—256 ICO"]
    G --> H["Save as folder.ico"]
    H --> I["Create desktop.ini"]
    I --> J["Set folder attributes"]
    J --> K["πŸ–ΌοΈ Custom icon visible!"]
Loading


βš™οΈ Configuration

Config File

On first run, the script saves your TMDb token to movie_manager_config.json in the same directory:

{
  "TMDbToken": "eyJhbGciOiJIUzI1NiJ9..."
}

Security Note: This file contains your API token. Add it to .gitignore if you're pushing to a public repo.

Supported Video Extensions

The following file types are recognized as media files when organizing loose files:

.mkv  .mp4  .avi  .mov  .wmv  .flv  .webm  .m4v  .ts  .mpg  .mpeg

Archive files (.zip, .rar, .7z) are also organized.



πŸ›‘οΈ Safety

  • βœ… Only renames folders β€” files inside are never modified
  • βœ… Non-destructive β€” no data is deleted, just reorganized
  • βœ… Idempotent β€” safe to re-run; skips already-clean folders and existing icons
  • βœ… No admin required β€” runs with standard user permissions


❓ FAQ

Icons aren't showing up in Explorer?

Press F5 to refresh, or restart Windows Explorer:

Stop-Process -Name explorer -Force; Start-Process explorer

Windows caches folder icons aggressively. A restart of Explorer will force it to reload.

Can I undo the renaming?

The script doesn't create a log of old names (yet). If you want to preview changes first, you can add a -WhatIf dry run mode. For now, make sure you're happy with a small test before running on your entire library.

A movie/show wasn't found on TMDb?

This usually happens when:

  • The folder name has a typo (e.g., sillicon valley β†’ Silicon Valley)
  • The title is too obscure or it's a bonus feature / documentary
  • The folder was already named incorrectly before renaming

Fix the folder name manually and re-run β€” the script will pick up any folders without icons.

Does it handle non-English titles?

Yes! TMDb has excellent international coverage. Titles in Korean (ν•œκ΅­μ–΄), Turkish, Japanese, etc. are fully supported. The script preserves Unicode characters in folder names.

Can I use this on a NAS or external drive?

Yes, as long as the drive is mounted as a Windows drive letter (e.g., E:\). Just provide the path when prompted. Note that folder icons using desktop.ini are a Windows feature and may not be visible from other OS clients accessing the NAS.



πŸ—ΊοΈ Roadmap

  • Dry-run / preview mode
  • Undo / rollback with rename log
  • Anime support (AniList/MyAnimeList integration)
  • Batch processing multiple directories
  • GUI version (WPF/WinForms)

This product uses the TMDb API but is not endorsed or certified by TMDb.



If this saved you hours of manual organizing, give it a ⭐!

Made with 🍿 by a fellow movie hoarder

About

Rename and set custom icons automatically for Your Movies And TV shows

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages