plex-edition-manager
plex-edition-manager is a Python script for managing Plex movie edition information. It automatically detects the edition of a movie (such as REMUX, BD, WEB-DL, etc.) based on its filename and updates the edition information in Plex.
Demo
Editions
- REMUX: Extracts audio and video data from Blu-ray discs, losslessly repackages them into another format, maintaining original quality.
- BD: Directly copies content from Blu-ray discs, providing high-quality audio and video.
- BDRIP: Compresses content from Blu-ray discs to achieve smaller file sizes while preserving good quality.
- WEB-DL: Downloads high-quality videos from online streaming services, slightly lower quality than Blu-ray.
- WEBRIP: Obtained by recording streaming content online, slightly lower quality than WEB-DL.
- HR-HDTV: Recorded from high-resolution HDTV broadcasts, offers high-quality visuals.
- HDTV: Recorded from HDTV broadcasts, provides good quality visuals.
- HDRIP: Compressed version of high-definition movies, may have slightly reduced quality.
- DVDRIP: Compressed version of DVD content, moderate reduction in quality.
- DVDSCR: Intended for awards promotion, may have watermarks or other identifiers, good quality.
- DVD: Directly copies content from DVDs, moderate quality.
- HDTC: Digitized from film using a Telecine machine, offers higher quality.
- TC: Similar to HDTC, moderate quality.
- HQCAM: Recorded in theaters using high-quality cameras, lower quality.
- CAM: Recorded in theaters using cameras, even lower quality.
- TS: Recorded in theaters using professional equipment, lowest quality.
- DV: Refers to Dolby Vision, an HDR format that offers enhanced colors, contrast, and detail, providing a more immersive viewing experience.
Matching Rules
As the script identifies editions based on file names, it only applies when your file name contains any of the following: BD-REMUX, BDREMUX, REMUX, BLU-RAY, BLURAY, BD, BDRIP, WEB-DL, WEBDL, WEBRIP, HR-HDTV, HRHDTV, HDTV, HDRIP, DVDRIP, DVDSCR, DVD, HDTC, TC, HQ-CAM, HQCAM, CAM, TS (case-insensitive). For example:
Sing.2016.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos.mkv > REMUX
Baby.Driver.2017.BluRay.1080p.DTS-HDMA5.1.2Audio.x264.mkv > BD
Isle.of.Dogs.2018.2160p.WEB-DL.x265.10bit.SDR.DTS-HD.MA.5.1.mkv > WEB-DL
Pacific.Rim.2013.2160p.UHD.BDRemux.TrueHD.Atmos.7.1.DoVi.mkv > REMUX · DV
Requirements
- Python 3.0 or higher installed.
- Required third-party library: plexapi.
- A valid Plex Pass account with a configured Plex server.
Usage
- Clone or download the repository to a directory on your computer.
- Modify the path in
start.command (Mac)orstart.bat (Win)to point to the directory where you store theplex-edition-manager.pyscript. - Double-click
start.commandorstart.batto execute theplex-edition-manager.pyscript. - On first run, you will need to enter your Plex username, password, and server name in the console. This information will be saved in the
config.jsonfile in the same directory as the script for future use. - The script will connect to your Plex server and retrieve all movies from your library.
- For each movie, the script will determine its edition based on its filename and update the corresponding edition information in Plex. The script will display the update status of each movie in the console.
- Once the script completes, you will see the total number of movies updated.
Notes
- Make sure you provide correct Plex account information and server name.
- Make sure the device running the script is connected to your Plex server.
- The script relies on filenames to identify movie editions, so make sure that filenames contain edition-related information. If no recognizable edition information is included in the filename, no edition will be updated.
- The script only updates movies that do not have an edition set in Plex.
- The script only supports movie-type libraries and does not support other types of libraries (e.g., TV shows).
- When a movie has multiple versions, the script uses the filename of the first file to identify and update edition information.
Known Issues
- Due to the diversity of movie edition naming, the script may not accurately identify certain specific editions.
- In some cases, manual correction of movie edition information may be required.
