pymedusa/medusa

By pymedusa

Updated 5 days ago

Automatic Video Library Manager for TV Shows.

Image
36

5M+

pymedusa/medusa repository overview

Average time to resolve an issue Percentage of issues still open
codebeat badge XO code style codecov

Automatic Video Library Manager for TV Shows. It watches for new episodes of your favorite shows, and when they are posted it does its magic.
Exclusive features
  • Supports TVMaze and TMDB indexers
  • Manual search episodes (you choose what to snatch based on all kind of info: provider, seeds, release group)
  • Manual search for subtitles (useful when subtitle has low score because of typo in filename or alternative title)
  • Support for Python 3
  • Uses 'guessit' library to parse and enrich existing info (more precise than regexes)
  • Improved Anime shows support
  • Faster DailySearcher|Backlog|Find propers as we only process new items. Already processed items are discarded.
  • Option to clean Kodi library when replacing existing files
  • Better quality explanations and consistent quality code in all threads
  • See on the fly if your backlogged episodes will be increased/reduced while changing qualities
  • Postpone Post Processing until Medusa downloads wanted subtitle (useful to only show media if subtitle available)
  • Clean up any leftover files/folders if media file is deleted
  • Nightly showupdater updates only the season of the show, which has been updated by the indexer, for tvdb and tmdb.
Features
  • Kodi/XBMC library updates, poster/banner/fanart downloads, and NFO/TBN generation
  • Sync your shows with Trakt. Keep shows/episode updated in Trakt watchlist
  • Configurable automatic episode renaming, sorting, and other processing
  • Easily see what episodes you're missing, are airing soon, and more
  • Automatic torrent/nzb searching, downloading, and processing at the qualities you want
  • Largest list of supported torrent and nzb providers, both public and private
  • Can notify Kodi, XBMC, Growl, Trakt, Twitter, and more when new episodes are available
  • Searches TheTVDB.com and AniDB.net for shows, seasons, episodes, and metadata
  • Episode status management allows for mass failing seasons/episodes to force retrying
  • DVD Order numbering for returning the results in DVD order instead of Air-By-Date order
  • Allows you to choose which indexer to have Medusa search its show info from when importing
  • Automatic XEM Scene Numbering/Naming for seasons/episodes
  • Available for any platform, uses a simple HTTP interface
  • Specials and multi-episode torrent/nzb support
  • Automatic subtitles matching and downloading
  • Improved failed download handling
  • DupeKey/DupeScore for NZBGet 12+
  • Real SSL certificate validation
Dependencies

To run Medusa from source you will need one of these Python versions:

  • Python 3 – 3.6.0 and newer
Installation - direct

Start here to read the installation guides for different setups.

Installation - Docker

There's a direct build available on Dockerhub which is updated directly from this repo on every commit to master and the develop branch. Use the tag master for the master branch (releases) and develop for the develop branch.

Images are available for the three main architectures amd64, arm and arm64.

Usage

Here are some example snippets to help you get started creating a container.

docker-compose (recommended, click here for more info)

---
version: "2.1"
services:
  medusa:
    image: pymedusa/medusa
    container_name: medusa
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
    volumes:
      - <path to data>:/config
      - <path to downloads>:/downloads
      - <path to tv shows>:/tv
    ports:
      - 8081:8081
    restart: unless-stopped

docker cli (click here for more info)

docker run -d \
  --name=medusa \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Europe/London \
  -p 8081:8081 \
  -v <path to data>:/config \
  -v <path to downloads>:/downloads \
  -v <path to tv shows>:/tv \
  --restart unless-stopped \
  pymedusa/medusa
Parameters

Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate : respectively. For example, -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080 outside the container.

ParameterFunction
-p 8081The port for the Medusa webui
-e PUID=1000for UserID - see below for explanation
-e PGID=1000for GroupID - see below for explanation
-e TZ=Europe/LondonSpecify a timezone to use e.g. Europe/London
-v /configMedusa config
-v /downloadsDownload location
-v /tvTV Shows location
User / Group Identifiers

When using volumes (-v flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user PUID and group PGID.

Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.

In this instance PUID=1000 and PGID=1000, to find yours use id user as below:

  $ id username
    uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
Supported Architectures

Our images support multiple architectures such as x86-64, arm64 and armhf.

Simply pulling pymedusa/medusa should retrieve the correct image for your arch, but you can also pull specific arch images via tags.

The architectures supported by this image are:

ArchitectureTag
x86-64amd64-latest
arm64arm64v8-latest
armhfarm32v7-latest
Application Setup

Web interface is at <your ip>:8081.

Set paths for downloads, tv-shows to match docker mappings via the webui, for more information check out Medusa.

Updating Info

We do not recommend or support updating apps inside the container. For each Medusa update pull a new docker image.

Below are the instructions for updating containers:

Via Docker Compose
  • Update all images: docker-compose pull

    • or update a single image: docker-compose pull medusa
  • Let compose update all containers as necessary: docker-compose up -d

    • or update a single container: docker-compose up -d medusa
  • You can also remove the old dangling images: docker image prune

Via Docker Run
  • Update the image: docker pull pymedusa/medusa
  • Stop the running container: docker stop medusa
  • Delete the container: docker rm medusa
  • Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your /config folder and settings will be preserved)
  • You can also remove the old dangling images: docker image prune
Via Watchtower auto-updater (only use if you don't remember the original parameters)
  • Pull the latest image at its tag and replace it with the same env variables in one run:
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
containrrr/watchtower \
--run-once medusa
  • You can also remove the old dangling images: docker image prune

Note: We do not endorse the use of Watchtower as a solution to automated updates of existing Docker containers. In fact we generally discourage automated updates. However, this is a useful tool for one-time manual updates of containers where you have forgotten the original parameters. In the long term, we highly recommend using Docker Compose.

Feature Requests
Medusa Issue Tracker
FAQ
Wiki
Discord
Important

Before using this with your existing database (sickbeard.db) please make a backup copy of it and delete any other database files such as cache.db and failed.db if present
We HIGHLY recommend starting out with no database files at all to make this a fresh start but the choice is at your own risk.

Supported providers

A partial list can be found here. Jackett is supported, however it must be configured as follows.

Special Thanks to:

RARBG RARBG  ·  NZB.cat NZB.cat  ·  NZBGeek NZBGeek  ·  DOGnzb DOGnzb  ·  DanishBits DanishBits  ·  linuxserver

Browsers support made by godban
IE / Edge
IE / Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
Edgelast 2 versionslast 2 versionslast 2 versions
News and Changelog

news.md has moved to a separate repo, click here

The changelog can be found here The changelog for versions prior to v0.2.7 can be found here

External dependencies

This product uses MediaInfo library, Copyright (c) 2002-2016 MediaArea.net SARL

Binaries for Windows and MacOS are included. Linux distributions need to manually install MediaInfo. MediaInfo is optional, but highly recommended since it increases the number of supported formats for video metadata extraction. Basic MKV metadata is supported when MediaInfo is not installed.

Tag summary

Content type

Image

Digest

sha256:db7af901d

Size

94.1 MB

Last updated

5 days ago

Requires Docker Desktop 4.37.1 or later.