Skip to main content

Normalize media files for use with Plex Media Server

Project description

Plexer

Normalize media files for use with Plex Media Server.

GitHub License Supported Python Versions

OpenSSF Scorecard Codacy Badge Run Full Suite of Checks and Tests

GitHub Issues or Pull Requests GitHub Downloads (all assets, all releases)

Hatch project Ruff

Requirements

Software Dependencies

Start by creating a virtual environment and installing the required packages. Typically that looks something like:

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Media Metadata

The biggest requirement before running plexer is to ensure that you've created a .plexer file in each of your target directories.

This is a JSON-formatted file that includes the movie metadata required by Plexer to perform its jobs.

Plexer File Generator

To easily create the .plexer file, you can use the one-liner below while in the movie's directory:

echo -n "Media Name: ";read MEDIA_NAME;echo -n "Release Year (YYYY): ";read RELEASE_YEAR;echo "{\"name\": \"${MEDIA_NAME}\", \"release_year\": \"${RELEASE_YEAR}\"}" > .plexer

It can be modified to support different types of media as well.

Usage

The source directory is the directory containing the raw media. The destination is where you'd like to save the processed media to.

usage: plexer.py [-h] [-v] [--version] -s SOURCE_DIR -d DESTINATION_DIR

options:
  -h, --help            show this help message and exit
  -v, --verbose         Verbosity (-v, -vv, etc)
  --version             show program's version number and exit
  -s SOURCE_DIR, --source-dir SOURCE_DIR
  -d DESTINATION_DIR, --destination-dir DESTINATION_DIR

Development

Software Stack

For developing with Plexer, there are several tools that are in use:

  1. Build Backend, Packaging, and Dependency Management:
    1. Hatch
  2. Analysis Tools:
    1. Ruff
    2. Codacy
  3. Testing:
    1. Pytest
    2. Tox

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plexer_cli-0.0.1a0.tar.gz (14.0 kB view hashes)

Uploaded Source

Built Distribution

plexer_cli-0.0.1a0-py3-none-any.whl (6.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page