Skip to main content

Subtitle Download Web Service for Sonarr

Project description

Build Status Docker Automated buil Pyup Coveralls Pypi package PyPI MIT licensed

Subtitle Download Web Service for Sonarr or Radarr. It uses Subliminal to search automatically for missing subtitles on download notification.

  • Free software: MIT

  • Source: https://github.com/Stibbons/dopplerr

  • Python 3. Python 2 is tested by Travis but local installation is not provided.

  • Docker image based on Alpine Linux and S6-Overlay is provided (based on Linuxserver’s images)

Usage

The best usage is through the docker image.

Use with Docker

Use my docker image:

docker create \
    --name dopplerr \
    -p 8000:8000 \
    -e PUID=<UID> \
    -e PGID=<GID> \
    -v <path/to/animes>:/animes \
    -v <path/to/movies>:/movies \
    -v <path/to/tvseries>:/tv \
    stibbons31/dopplerr

Mount your media directory in /media. This directory exists in the docker image, so if you have several media directory (/series, /tv, /animes), mount them all in /media and set the following environment variable: SUBDLSRC_BASEDIR=/media.

It is a good practive to run Sonarr and Radarr in their own container, so they also “see” their media in path such as /series, /tv, /animes. Mount these volume with the same name in the dopplerr container. They will all communicate with the same path.

Base directory (SUBDLSRC_BASEDIR environment variable) can be used to put all these folder in same directory. If SUBDLSRC_BASEDIR is not defined, dopplerr will assume the path communicated by Sonarr or Radarr also exists locally. So mouth your series folder to /series, TV show folder to /tv, and animes to /animes and so on.

Parameters

The parameters are split into two halves, separated by a colon, the left hand side representing the host and the right the container side. For example with a port -p external:internal - what this shows is the port mapping from internal to external of the container. So -p 8080:80 would expose port 80 from inside the container to be accessible from the host’s IP on port 8080 http://192.168.x.x:8080 would show you what’s running INSIDE the container on port 80.

  • -p 8086:8086 - the port webinterface

  • -v /path/to/anime:/anime - location of Anime library on disk

  • -v /path/to/movies:/movies - location of Movies library on disk

  • -v /path/to/tv:/tv - location of TV library on disk

  • -e PGID=1000 - for for GroupID. See below for explanation

  • -e PUID=100 - for for UserID. See below for explanation

  • -e SUBDLSRC_LANGUAGES=fra,eng - set wanted subtitles languages (mandatory)

  • -e SUBDLSRC_BASEDIR=/app - set media base directory (optional)

  • -e SUBDLSRC_VERBOSE=1 - set verbosity. 1=verbose, 0=silent (optional)

User / Group Identifiers

Sometimes when using data 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 the data volume directory on the host is owned by the same user you specify and it will “just work” TM.

In this instance PUID=1001 and PGID=1001. To find yours use id user as below:

$ id <dockeruser>
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)

Wanted subtitle languages

Use a comma-separated list of 3-letter language descriptors you want Subliminal to try to download them.

Example:

SUBDLSRC_LANGUAGES=fra,eng

Descriptors are ISO-639-3 names of the language. See the official Babelfish table to find your prefered languages.

Local installation:

Create a dedicated virtual environment and install it properly with the following commands:

sudo ./bootstrap-system.sh
make install-local

This will install dopplerr in a local virtual environment will all its dependencies without messing with your system’s Python environment.

Installing in your system

Do NOT install a Python application in your system. Always use a Virtualenv. Or let it be handled by your distribution’s maintainer.

This method is used when building the docker image (and the travis build):

sudo ./bootstrap-system.sh
sudo make install-system

Radarr/Sonarr Configuration

Go in Settings to configure a “Connect” webhook:

  • Settings > Connect > add Webhook notification

  • Select On Download and On Upgrade

  • URL: http://<ip address>:8086/notify

  • Method: POST

Two READMEs ?

If you look at the source code, you would have seen that there are TWO readme files: README.md and README.rst. This has been done on purpose because:

  • Docker Hub does not render README written in restructuredText

  • Pypi does not render README written in Markdown

So, I have put both. Simple. GitHub will render the MarkDown readme preferably, so upon upload, do not forget to run make readme.

README.md is automatically generated from README.rst by make build if pandoc is installed on your system.

Contributing

Bootstrap your system with

sudo ./bootstrap-system.sh

Setup your environment with

make dev

Test with:

make test-local

or run it live with

make run-local

Activate the environment (to start your editor from, for example):

$ make shell

Publishing

(This part should be automatically done by Travis)

Build Wheel package:

make wheels

Register and publish your package to Pypi:

make pypi-publish

Create a release: create a tag with a semver syntax. Optionally you can tag code locally and push to GitHub.

git tag 1.2.3
git push --tags

On successful travis build on the Tag branch, your Pypi package will be automatically updated.

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

dopplerr-0.2.2.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

dopplerr-0.2.2-py2.py3-none-any.whl (15.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file dopplerr-0.2.2.tar.gz.

File metadata

  • Download URL: dopplerr-0.2.2.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for dopplerr-0.2.2.tar.gz
Algorithm Hash digest
SHA256 852f73a906efb74c18d3dbe2692ab66fc5abba6065092dc8bd9e038e866e0d3a
MD5 5696f03f0633f72c72f7a0bf11210978
BLAKE2b-256 2be91124e9105ba3ff5fded6a1c13f3df352465929e03464394a1bbedb94fa2f

See more details on using hashes here.

File details

Details for the file dopplerr-0.2.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for dopplerr-0.2.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 cfc86ec9d496483b0cfd17bf5ca4601d892f814d8e3a80d99c458472717b685e
MD5 cb7a12749785dd4384612993910dc48f
BLAKE2b-256 d8e3ea273d0716447b3ffb8c2d9bf8aa85f8057d73f54ad6db58a035f19dd3de

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