Add new Plex python script to change subtitle settings for all movies and shows in library to "prefer non-forced subtitles" - #369
Closed
RileyXX wants to merge 1 commit into
Closed
Add new Plex python script to change subtitle settings for all movies and shows in library to "prefer non-forced subtitles"#369RileyXX wants to merge 1 commit into
RileyXX wants to merge 1 commit into
Conversation
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.
blacktwin
reviewed
Mar 17, 2023
blacktwin
reviewed
Mar 17, 2023
blacktwin
reviewed
Mar 17, 2023
blacktwin
reviewed
Mar 17, 2023
Owner
|
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. |
blacktwin
reviewed
Mar 17, 2023
blacktwin
reviewed
Mar 17, 2023
This was referenced Apr 25, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: