This script will set all movies and shows in your local Plex library to English non forced subtitles by default.
Project description
PlexPreferNonForcedSubs
Short Description
This Python script sets all movies and shows in your local Plex library to English non-forced subtitles by default. 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 the 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 code periodically on my home server along with some other Plex scripts, such as Plex Auto Delete. Special thanks to everyone who provided assistance! If you encounter any bugs while using this script, please open an issue. Cheers!
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
- Install Python (v3.5 or later).
- Install the script by executing the following in the command line:
python -m pip install PlexPreferNonForcedSubs
. - Ensure that your Plex media server is running, then run the script using
PlexPreferNonForcedSubs
in the command line. - 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
. - 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.
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):
- Install Python (v3.5 or later).
- Download the latest
.py
script from the releases page and move it to the desired directory. - Execute the script by running
PlexPreferNonForcedSubs.py
, or open the terminal and navigate to the folder wherePlexPreferNonForcedSubs.py
is located, then runPlexPreferNonForcedSubs.py
in the terminal. - 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
. - Done.
See the section above for instructions on how to run, update, and uninstall the script.
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:
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 ↗
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
Built Distribution
File details
Details for the file PlexPreferNonForcedSubs-2.1.8.tar.gz
.
File metadata
- Download URL: PlexPreferNonForcedSubs-2.1.8.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 187dcdcef4d09e18596d05beae4fbab39c5eea491b2247759134755a08a8b8c0 |
|
MD5 | 41dd46fcfa5b88199aba5b5ebca3256d |
|
BLAKE2b-256 | 6633bd3393932ca4d17af64321987d3671efd5671d1c1566c9944f1fa0a66e7b |
File details
Details for the file PlexPreferNonForcedSubs-2.1.8-py3-none-any.whl
.
File metadata
- Download URL: PlexPreferNonForcedSubs-2.1.8-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 085fc84be687a2f46c052c0e7513f4590828876bf199e73cfbe1f310456269c2 |
|
MD5 | 5bf34a4b87832c8ce436752003161741 |
|
BLAKE2b-256 | 1884fdb72232d03c69f859ed598338afc71d208e96e5ede4c9abf4c7cf4b144d |