Skip to main content

The MKV Episode Matcher is a tool for identifying TV series episodes from MKV files and renaming the files accordingly.

Project description

Documentation Status pypi

The MKV Episode Matcher is a tool for identifying TV series episodes from MKV files and renaming the files accordingly.

Quick start

To use the MKV Episode Matcher, follow these steps:

  1. Install pip install mkv-episode-matcher

  2. Obtain an API key from TMDb (https://developers.themoviedb.org/authentication/getting-a-apikey).

  3. (Optional) - Obtain an API key from Opensubtitles.com by creating an API consumer (https://www.opensubtitles.com/en/consumers)

  4. Alternatively, add the .srt files to the cache directory. On Windows: C:\Users\YOUR_USER_NAME\.mkv-episode-matcher\cache\data\SHOW_NAME. The files need to be named with the season and episode, e.g. Show Name - S01E01.srt.

  5. Provide a filepath to your show directory. This is the main directory that contains all of the episodes for a specific show.

The directory and subfolders must be arranged in the following structure:

  • Show name - Season 1 - Season 2 - … - Season n

  1. Call mkv-match with the TMDB_API_KEY and SHOW_DIR as arguments or in environment variables from your command line:

python mkv-match --tmdb-api-key your-api-key --show-dir /path/to/show

Once TMDB_API_KEY is set, there’s no need to enter it again, as it gets stored in the config.ini file.

To get subtitles from opensubtitles.com, ensure that the appropriate credentials have been set, either via the CLI or in config.ini (On Windows: C:\Users\YOUR_USER_NAME\.mkv-episode-matcher\config.ini). Then add the --get-subs True flag to the CLI call

python mkv-match --show-dir /path/to/show --get-subs True

How it works

MKV Episode Matcher extracts the subtitle text from each MKV file, then cross-references the text against .srt subtitle files that are either user-provided or downloaded from Opensubtitles.com.

License

MIT License

Copyright (c) 2024 Jonathan Sakkos

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Acknowledgments

This product uses the TMDB API but is not endorsed or certified by TMDB.

The Movie Database

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

mkv_episode_matcher-0.1.12.tar.gz (4.9 MB view details)

Uploaded Source

Built Distribution

mkv_episode_matcher-0.1.12-py3-none-any.whl (227.5 kB view details)

Uploaded Python 3

File details

Details for the file mkv_episode_matcher-0.1.12.tar.gz.

File metadata

  • Download URL: mkv_episode_matcher-0.1.12.tar.gz
  • Upload date:
  • Size: 4.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for mkv_episode_matcher-0.1.12.tar.gz
Algorithm Hash digest
SHA256 414dc04f855392ac5f3c14e261699841f3e88afd9cac436c14a043a63dcc2899
MD5 aefc7d81d0a5fdbb9b24e1f4e6687ab3
BLAKE2b-256 517e47d5725b58c62e3b3d8c9a82b2737c99d0b0f2682abd176af5fe58ebb488

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkv_episode_matcher-0.1.12.tar.gz:

Publisher: python-publish.yml on Jsakkos/mkv-episode-matcher

Attestations:

File details

Details for the file mkv_episode_matcher-0.1.12-py3-none-any.whl.

File metadata

File hashes

Hashes for mkv_episode_matcher-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 9e03f78a89626e7cdbee564f8284a5278c81065d1b46655026b4bf75473a75e0
MD5 5daaaa966836bf6b915d243451c7cec8
BLAKE2b-256 3ceec77de1d1cf1970399672043eb76dcf64fda2ea5b86af6648b5ec2b0a697b

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkv_episode_matcher-0.1.12-py3-none-any.whl:

Publisher: python-publish.yml on Jsakkos/mkv-episode-matcher

Attestations:

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