Plex NFO Exporter is a script that extracts metadata, posters, and background art from Plex and generates compatible files for use with other media servers like Jellyfin.
- Extract media metadata from Plex into
.nfo
files. - Export active poster images as
poster.jpg
. - Export active background art as
fanart.jpg
. - Save files in the media directory for easy use with other media servers.
- Does not refresh Plex library metadata during the export process.
- Flexible options:
- Choose what metadata to export (e.g., title, tagline, plot, year, etc.).
- Select specific libraries to process.
- Export all metadata from Plex if needed.
- Support for path mapping between separate Plex and library servers.
- Compatible with movies, TV shows, and music libraries.
- Supports Plex's latest movie and TV agents, as well as Hama agent.
-
Download and Prepare the Script
Clone or download the repository, ensuring the following files are included:config.yml
(will create if not exists).env
(will create if not exists)main.py
requirements.txt
-
Configure the Script
Editconfig.yml
and.env
to include your desired settings and credentials. -
Install Python
Install Python (tested with Python 3.9–3.11). -
Set Up the Environment
Open a terminal and navigate to the script directory:cd /your_directory/plex_nfo_exporter
(Optional) Create and activate a virtual environment:
python -m venv env env\Scripts\activate # Windows source env/bin/activate # macOS/Linux
-
Install Dependencies Install the required Python packages:
pip install -r requirements.txt
-
Run the Script Execute the script:
python main.py
-
Supported Plex Agents
- Compatible with Plex's new TV and movie agents.
- Detects Hama agent and other agents to set metadata source IDs accordingly.
-
Metadata Export Options
- Choose specific metadata fields to export.
- Defaults include title, tagline, plot, year, and metadata agent IDs.
-
File Organization
- Saves .nfo files as movie.nfo, tvshow.nfo, artist.nfo, album.nfo.
- Exports active poster and fanart images as poster.jpg and fanart.jpg.
-
Sync Across Servers
- Ensures that Plex and Jellyfin display the same library metadata, images, and media names.
-
Docker Image
- Docker integration with cron jobs is planned but not yet fully implemented.
-
About Me: I'm not a developer by trade, but I manage Plex and Jellyfin to enjoy both convenience and flexibility. My primary library is anime in Plex using the Hama agent with romaji names.
-
Why This Script? I needed a tool to sync Plex and Jellyfin libraries, especially for anime with custom posters and art. Existing tools either require a full library refresh (e.g., Lambda) or work in reverse (e.g., XBMC Importer).
-
Kometa Integration: I use Kometa to beautify posters, which works perfectly with this script.
- Add Docker support with cron job automation.
- Enhance compatibility with more media servers.
Feel free to open an issue or submit a pull request for improvements or feature requests.