Skip to main content

Normalize media files for use with Plex Media Server

Project description

Plexer

PyPI - Version

GitHub License Supported Python Versions

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

OpenSSF Scorecard Codacy Badge

Run Full Suite of Checks and Tests Release

Summary

A CLI tool made to make organizing your media for Plex Media Server easy. Normalize names of media files and directories to match the hierarchial requirements that Plex requires.

Features

Support

Currently, Plexer only supports organizing movies and other individual video files.

Roadmap

  • Support for TV Shows (#28)
  • Docker implementations (#29)
  • MacOS support (#30)
  • Windows support (#31)
  • Metadata inference using file/directory info (i.e. analyze the video files to "guess" what the name, year, etc is) (#32)

Install

To install Plexer, there are a few options available.

Docker

The most portable way to install and run Plexer is by using Docker.

Via Container Registry

The easiest way to run Plexer in Docker is by using the public containers hosted on container registries. Plexer images are available on both Docker Hub and GitHub Container Registry. See the commands below for how to run Plexer using each registry.

Docker Hub
docker run --rm -it magneticstain/plexer-cli
Github Container Registry
docker run --rm -it ghcr.io/magneticstain/plexer-cli

Via Local Build

In the case that container registries are unavailable, there's also the option to build the image locally. To do that, check out the main branch of this repo, build the Plexer image, and run it.

git clone https://github.com/magneticstain/plexer-cli.git
docker build -t plexer_cli .
docker run --rm -it plexer_cli

Requirements

Media Metadata

The most important 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

Support & Feedback

If you run into issues while using Plexer, think you know a way to make it better, or just need help using it, create a new issue within this project and they will triaged when possible.

Development

Software Stack

Hatch project Ruff

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.3.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plexer_cli-0.0.3-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file plexer_cli-0.0.3.tar.gz.

File metadata

  • Download URL: plexer_cli-0.0.3.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for plexer_cli-0.0.3.tar.gz
Algorithm Hash digest
SHA256 74b163ea673ac3fa3245fafec4ee65e80fb4db67159ace9d12c86d785a22dbfa
MD5 d179d5d40094293372df1685a5122324
BLAKE2b-256 bf2fd739663867e404ef78f8da6a439a868640a7ddf216e1c3605e9057d8b1f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for plexer_cli-0.0.3.tar.gz:

Publisher: release.yml on magneticstain/plexer-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file plexer_cli-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: plexer_cli-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for plexer_cli-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a030dfb8b01b0728f1d49611eb979c6be866d992f7d397a61e2317a7301a41f4
MD5 43230312c54be7b87e565ddf0861a1f0
BLAKE2b-256 091563f8018da4b34a4c57068458b241809db704c331bf037fe45a1271fefa93

See more details on using hashes here.

Provenance

The following attestation bundles were made for plexer_cli-0.0.3-py3-none-any.whl:

Publisher: release.yml on magneticstain/plexer-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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