Skip to main content

No project description provided

Project description

(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."

See the mediasorter-server project for a simple (yet useful) web app frontend.

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

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

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!

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

multimediasorter-2.0.3.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

multimediasorter-2.0.3-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

Details for the file multimediasorter-2.0.3.tar.gz.

File metadata

  • Download URL: multimediasorter-2.0.3.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.4 Linux/6.10.3-100.fc39.x86_64

File hashes

Hashes for multimediasorter-2.0.3.tar.gz
Algorithm Hash digest
SHA256 c7aca6b26946931027df484cbb03a26c7381f408fba98123b3decf300fc20e8a
MD5 305b77e234d425afddd3b67f72488b39
BLAKE2b-256 1e362c9388c4d8afb4dc6aabd91322128f0bece72afac5a9efcdde6f981cc3ff

See more details on using hashes here.

File details

Details for the file multimediasorter-2.0.3-py3-none-any.whl.

File metadata

  • Download URL: multimediasorter-2.0.3-py3-none-any.whl
  • Upload date:
  • Size: 25.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.4 Linux/6.10.3-100.fc39.x86_64

File hashes

Hashes for multimediasorter-2.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1bc630b138741e36769e86991150e30636878dde296b739e215ca52d3cf77d7c
MD5 6cd62839850c07efa7c54ff3559f0b59
BLAKE2b-256 02a9eb447f8e72db7c9b986f56faf44905adfd5b4161e72da5b76827725c590c

See more details on using hashes here.

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