Closed RileyXX closed 1 year ago
The Movie and Show library loops share a lot of the same code. You can simplify this by having a separate method to grab the library items and another method for setting the subtitles for the library items that were grabbed.
PlexPreferNonForcedSubs.py
Short description:
This python script will set all movies and shows in your local Plex library to English non forced subtitles by default. The subtitle selections will apply to your Plex profile and be remembered on other devices.
Long description:
This script was created with the help of ChatGPT Open AI and further edited and completed by me. It uses Plex Python Api. It will set all movies and shows in your local Plex library to English non forced subtitles by default. The subtitle selections will apply to your Plex profile and be remembered on other devices. Assuming your Plex subtitles settings are setup in your server settings Plex will default to Forced Subtitles by default when they are available for a given item. Plex will not allow you to prefer non forced subtitles natively hence why this script was created.
This script is confirmed tested and working. Feel free to use this code for your own purposes. Thanks to all who helped! If you use this script and run into any bugs feel free to open an issue. Cheers!
Known issues/future outlook:
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.
Instructions:
Windows:
To use this script on Windows. Simply install latest version of Python.
Note:
This script should work fine on any other operating system. No need to make any changes.
Also posted on:
Screenshots:
Plex subtitle dropdown after script is done running:
PlexPreferNonForcedSubs.py script in action: