Skip to main content

(Multi)mediasorter

Inspired by https://github.com/joshuaboniface/mediasorter, rewritten from scratch with asyncio, enhanced pattern matching and packaged for easier installation/usage.

"mediasorter is a tool to automatically "sort" media files from a source naming format into something nicer for humans to read/organize, and for tools like Jellyfin to parse and collect metadata for. It uses The Movie DB for movie metadata and TVMaze for TV metadata to obtain additional information, then performs the "sort" via a user-selectable mechanism. In this aspect it seeks to be a replacement for FileBot and other similar tools."_

Installation

  1. Install from PyPI.

    pip install multimediasorter
    
  2. Bootstrap a default configuration file, you will be prompted for your TMDB api key.

    mediasorter setup
    
  3. Edit the configuration file with your TMDB API key (otherwise only TV shows searches will work).

  4. See --help for more details.

    mediasorter --help
    

Usage

CLI args

You can specify a folder-to-be-sorted manually with the first positional argument. By default, mediasorter tries to figure out the media type (auto), it then sorts TV show and movies to their respective folders (if both arguments are used) or into a one single common folder (if only single destination folder is specified).

mediasorter sort -m auto ./tests/test_data/ ~/Media/Series ~/Media/Movies

Configuration

You can preconfigure folders to be sorted in your configuration YAML. See the info command to find out what is configured and where to find your configuration file.

mediasorter info

Then simply append entries to the scan_sources section

# Use this to configure what directories should be sorted instead of the CLI argument(s).
scan_sources:

  - src_path: ~/Downloads-01
    media_type: auto  # force only a specific media type tv/movie/auto
    tv_shows_output: ~/Media/TV  # where to put recognized TV shows
    movies_output: ~/Media/Movies
    action: copy

  - src_path: ~/Downloads-02
    media_type: auto
    tv_shows_output: ~/Media/TV
    movies_output: ~/Media/Movies
    action: move

Search Overrides

Sometimes, the name of a piece of media, as extracted from the file, will not return proper results from the upstream metadata providers. If this happens, mediasorter includes an option in the configuration file to specify search overrides. For example, the TV show "S.W.A.T." does not return sensible results, so it can be overridden like so:

search_overrides:
   "s w a t": "swat"
   # ...

There's also a public .yaml with already discovered overrides in the root of this repository. mediasorter uses it in conjunction with all the entries in the local configuration file. PRs are welcomed!

Metadata

Release files for multimediasorter 2.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for multimediasorter 2.1.9
File Size Uploaded Provenance Actions
multimediasorter-2.1.9.tar.gz 23.0 kB Without provenance Details for multimediasorter-2.1.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for multimediasorter 2.1.9
File Interpreter ABI Platform Actions
multimediasorter-2.1.9-py3-none-any.whl Python 3 none any Details for multimediasorter-2.1.9-py3-none-any.whl

Total release size: 50.9 kB

Release files / multimediasorter-2.1.9.tar.gz

Download URL multimediasorter-2.1.9.tar.gz
Size 23.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1be67d0cc6b017b1896ce69fd9f0d70dbdafa18ae39ef6c633aaf5db3bbbef0c
BLAKE2b-256 checksum
How to use checksums
122d21a0e0049a9e433d67317890443d277f74355f322b46b401bb28b543127a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / multimediasorter-2.1.9-py3-none-any.whl

Download URL multimediasorter-2.1.9-py3-none-any.whl
Size 27.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
517c6d708d9936370f2fcaf87f68f59174c04cdcd6b951b775e6345c0c3a9143
BLAKE2b-256 checksum
How to use checksums
ea1df806ba63768a48b98f1b3713d58aef474e7895cb162dd5532603d996a5bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for multimediasorter 2.1.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page