Skip to main content

TV Series Renamer

Simple script in python3 that download and organize subtitles from OpenSubtitles. The purpose of the program is to make easier for user to get every subtitle associated with its related video.

How does it work

This program works in ~/Downloads (default) or in a directory passed as argument.

  1. It takes every subdirectory, video, archive and subtitle file in folder that looks like it’s a tv-series related file.

  2. After that it move archives in the corrisponding folder or extracts their contents if the video file is in the same directory of the archive.

  3. If a video file and a subtitle file are related (same tv-shows name and same season and episode) the program renames the subtitle the same as the video.

Configure OpenSubtitle account

Configure opensubtitles.json file as show in opensubtitles.json.example and put it into ~/.opensubtitles_downloader. If you want to use it anonymously don’t insert any username, otherwise use your account on OpenSubtitles.

– opensubtitles.json.example –

{
    "username": "username",
    "password": "password",
    "language": ["eng"],
    "useragent": "mistalbo"
}

Install package from pip

pip install --user opensubtitles-downloader

How to use it

Launch it with ~/Downloads directory as target:

$ opensubtitles_downloader

Launch it with user input directory as target:

$ opensubtitles_downloader -d <directory>

Launch it with user input file as target:

$ opensubtitles_downloader -f <filename>

Launch it with forced language:

$ opensubtitles_downloader -l fr -f <filename>

Launch it with clean option:

$ opensubtitles_downloader -c

When this option is activated, the script looks for all subtitles for which there is no video file related and for all empty directories, then it put them in trash. Using the clean option doesn’t prevent the program from downloading subtitles, it’s intended as an extra action and not as an alternative to regular actions.

Contribute

Read CONTRIBUTING.md.

News

0.2.1

Release date: 19-Nov-2020

  • Removed ‘guessit’ library (it was causing verbose output)

0.2.0

Release date: 18-Nov-2020

  • Added ‘guessit’ library

  • Opensubtitles download doesn’t fully trust hash, check that subtitle filename is correct.

0.1.5

Release date: 07-Feb-2019

  • Fix logging to stdout

0.1.4

Release date: 07-Feb-2019

  • Improved

Metadata

Release files for opensubtitles-downloader 1.0.6

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

Source distribution (sdist)

Source distribution for opensubtitles-downloader 1.0.6
File Size Uploaded Provenance
opensubtitles_downloader-1.0.6.tar.gz 14.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for opensubtitles-downloader 1.0.6
File Interpreter ABI Platform
opensubtitles_downloader-1.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 42.7 kB

Release files / opensubtitles_downloader-1.0.6.tar.gz

Download URL opensubtitles_downloader-1.0.6.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
61603a1deb297dac04caee01541151f05c16d32a64869060278c2cee7179c598
BLAKE2b-256 checksum
How to use checksums
b1c33fc68c54ad3e16a0329a416d72e0d38655e1da7dce89169ec60acfdf832d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.4.2 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

Release files / opensubtitles_downloader-1.0.6-py3-none-any.whl

Download URL opensubtitles_downloader-1.0.6-py3-none-any.whl
Size 28.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9bc77c51b3abdfe95d9cce373bf565cae04b1c89da0e65fd0a9eee1a814cf10d
BLAKE2b-256 checksum
How to use checksums
1da6424351fb89efcd9acb800cbbb89a8e0abeac6fdcbca89fb9f72714fd48ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.4.2 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

Security for opensubtitles-downloader 1.0.6

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.

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