Skip to content

A python script that sets all movies and shows in your local Plex library to English non-forced subtitles by default.

License

Notifications You must be signed in to change notification settings

RileyXX/PlexPreferNonForcedSubs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlexPreferNonForcedSubs

Short Description

This Python script sets all movies and shows in your local Plex library to English non-forced subtitles by default. Please note, this script does not download subtitles, it simply changes the default track for existing subs in your library. It designed to work on Python 3.5 or later and compatible on any operating system where Python is installed (Windows, macOS, Linux, etc).

Long Description

This script utilizes Plex Python API and sets all movies and shows in your local Plex library to English non-forced subtitles by default. The subtitle preferences will be applied to your Plex profile and remembered on other devices. By default, Plex prefers forced subtitles when available for a given item. However, Plex does not natively allow you to prefer non-forced subtitles, which is why this script was created.

The script has been thoroughly tested and confirmed to be working. Feel free to use the code for your own purposes. I will be running this script periodically on my home server along with some other cool scripts. If you're interested, see below for my other recommended projects.

If you encounter any bugs while using this script, please open an issue so it can be properly investigated.

What are "non-forced" subtitles?

Non-forced subtitles provide subtitles everytime a characters speaks.

What are "forced" subtitles?

Forced subtitles only provide subtitles when the characters speak a foreign or alien language.

Installation Instructions

  1. Install Python (v3.5 or later). During installation, tick the box for adding Python to your PATH variable.
  2. Install the script by executing the following in the command line: python -m pip install PlexPreferNonForcedSubs.
  3. Ensure that your Plex media server is running, then run the script using PlexPreferNonForcedSubs in the command line.
  4. On the first run, the script will prompt you to enter your Plex token. The token will be saved locally in the same folder as token.txt.
  5. Done, setup complete. The script will continue to run and set all movies and shows in your local Plex library to use English non-forced subtitles.
  6. (Optional) If you have not yet setup your preferred subtitle settings in Plex, it is recommended to do so if you want English subs always enabled when available. To avoid overriding manual subtitle selection, the script will not set subtitle tracks to English when the subtitle tracks are set to Off or None. To change your default subtitle settings in Plex, navigate to Plex Settings > Account > Audio & Subtitle Settings > Set your preferred subtitle language to "English" and "Always Enabled". See screenshot.

See the section below for instructions on how to run, update, and uninstall the script.

Installing the Script:

python -m pip install PlexPreferNonForcedSubs

Execute in your operating system's native command line.

Running the Script:

PlexPreferNonForcedSubs

Execute in your operating system's native command line.

Updating the Script:

python -m pip install PlexPreferNonForcedSubs --upgrade

Execute in your operating system's native command line.

Uninstalling the Script:

python -m pip uninstall PlexPreferNonForcedSubs

Execute in your operating system's native command line.

Installing a Specific Version:

python -m pip install PlexPreferNonForcedSubs==VERSION_NUMBER

Replace VERSION_NUMBER with your desired version (e.g. 2.1.4) and execute in your operating system's native command line.

Alternative Manual Installation Method (without pip install):

  1. Install Python (v3.5 or later). During installation, tick the box for adding Python to your PATH variable.
  2. Download the latest .py script from the releases page and move it to the desired directory.
  3. Execute the script by running PlexPreferNonForcedSubs.py, or open the terminal and navigate to the folder where PlexPreferNonForcedSubs.py is located, then run PlexPreferNonForcedSubs.py in the terminal.
  4. On the first run, the script will prompt you to enter your Plex token. The token will be saved locally in the same folder as token.txt.
  5. Done.

See the section above for instructions on how to run, update, and uninstall the script.

Preferring Non-Forced English SDH Subtitles (for the Deaf or Hard-of-Hearing):

Known Issues/Future Outlook

  • Some lines of redundant code can be shortened and/or removed. Refer to this issue for more details.

Also Posted On:

Screenshots:

Plex subtitle dropdown after script is done running:

Plex Subtitle Dropdown

PlexPreferNonForcedSubs.py script in action:

PlexPreferNonForcedSubs.py Script in Action

Sponsorships, Donations, and Custom Projects

If you find my scripts helpful, you can become a sponsor and support my projects! If you need help with a project, open an issue, and I'll do my best to assist you. For other inquiries and custom projects, you can contact me on Twitter.

More Donation Options:

  • Cashapp: $rileyxx
  • Venmo: @rileyxx
  • Bitcoin: bc1qrjevwqv49z8y77len3azqfghxrjmrjvhy5zqau
  • Amazon Wishlist: Link ↗

License: MIT

Other Recommended Projects:

Project Name Description
PlexTraktSync A script that syncs user watch history and ratings between Trakt and Plex (without needing a PlexPass or Trakt VIP subscription).
IMDB-Trakt-Syncer A script that syncs user watchlist, ratings, and reviews both ways between Trakt and IMDB.
TMDB-Trakt-Syncer A script that syncs user watchlist and ratings both ways between Trakt and TMDB.
PlexPreferNonForcedSubs A script that sets all movies and shows in your local Plex library to English non-forced subtitles by default.
Casvt / AudioSubChanger A script with advanced options for changing audio & subtitle tracks in Plex.
Casvt / PlexAutoDelete A script for automatically deleting watched content from Plex.
Netflix-to-Trakt-Import A tool to import your Netflix viewing history into Trakt.
trakt-tv-backup A command-line tool for backing up your Trakt.tv data.
blacktwin / JBOPS A collection of scripts and tools for enhancing and automating tasks in Plex.
Casvt / Plex-scripts A collection of useful scripts for Plex automation and management.
trakt---letterboxd-import A tool to import your Letterboxd ratings and watchlist into Trakt.
TraktRater A tool to help users transfer user episode, show, and movie user ratings and watchlists from multiple media database sites around the web.
TvTimeToTrakt A tool to sync your TV Time watch history with Trakt.tv.
Plex Media Server A media server software to organize and stream your personal media collection.
Radarr A movie collection manager and downloader for various platforms.
Sonarr A TV show collection manager and downloader for various platforms.
Jackett A proxy server that provides API support for various torrent trackers commonly used with Radarr and Sonarr.
qBittorrent A free and open-source BitTorrent client.
AirVPN A VPN client with port forwarding support. Great VPN for torrents.
Overseerr A request management and media discovery tool for your home media server.
FlareSolverr A reverse proxy solution to bypass Cloudflare protection and access websites commonly used with Jackett.
youtube-dl A command-line program to download videos from YouTube and other sites.