# 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](https://github.com/Casvt/Plex-scripts/blob/main/changing_settings/plex_auto_delete.py). 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
1. Install [Python](https://www.python.org/downloads/) (v3.5 or later).
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](https://www.plexopedia.com/plex-media-server/general/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.
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](https://github.com/RileyXX/PlexPreferNonForcedSubs/releases) (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](https://www.python.org/downloads/) (v3.5 or later).
2. Download the latest `.py` script from the [releases page](https://github.com/RileyXX/PlexPreferNonForcedSubs/releases) 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](https://www.plexopedia.com/plex-media-server/general/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.
## Known Issues/Future Outlook
- Some lines of redundant code can be shortened and/or removed. Refer to [this issue](https://github.com/RileyXX/PlexPreferNonForcedSubs/issues/4) for more details.
## Also Posted On
- [PyPi](https://pypi.org/project/PlexPreferNonForcedSubs/)
- [Reddit](https://www.reddit.com/r/PleX/comments/105gdh7/python_code_to_set_all_movies_and_shows_in_plex/)
- [Stack Overflow](https://stackoverflow.com/q/75027919/9196825)
- [Plex Forums](https://forums.plex.tv/t/python-script-to-set-all-movies-and-shows-in-plex-to-use-english-non-forced-subtitles/825871)
## Screenshots:
##### Plex subtitle dropdown after script is done running:
![Plex Subtitle Dropdown](https://i.imgur.com/BNOlwtL.png)
##### PlexPreferNonForcedSubs.py script in action:
![PlexPreferNonForcedSubs.py Script in Action](https://github.com/RileyXX/PlexPreferNonForcedSubs/raw/main/demo.gif)
## Sponsorships, Donations, and Custom Projects
If you find my scripts helpful, you can become a [sponsor](https://github.com/sponsors/RileyXX) 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](https://twitter.com/RileyxBell).
#### More Donation Options:
- Cashapp: `$rileyxx`
- Venmo: `@rileyxx`
- Bitcoin: `bc1qrjevwqv49z8y77len3azqfghxrjmrjvhy5zqau`
- Amazon Wishlist: [Link ↗](https://www.amazon.com/hz/wishlist/ls/WURF5NWZ843U)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
Raw data
{
"_id": null,
"home_page": "https://github.com/RileyXX/PlexPreferNonForcedSubs",
"name": "PlexPreferNonForcedSubs",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.5",
"maintainer_email": "",
"keywords": "python,video,plex,subtitles,subs",
"author": "RileyXX",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/66/33/bd3393932ca4d17af64321987d3671efd5671d1c1566c9944f1fa0a66e7b/PlexPreferNonForcedSubs-2.1.8.tar.gz",
"platform": null,
"description": "\r\n# PlexPreferNonForcedSubs\r\n\r\n## Short Description\r\nThis 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).\r\n\r\n## Long Description\r\nThis 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.\r\n\r\nThe 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](https://github.com/Casvt/Plex-scripts/blob/main/changing_settings/plex_auto_delete.py). Special thanks to everyone who provided assistance! If you encounter any bugs while using this script, please open an issue. Cheers!\r\n\r\n## What are \"non-forced\" subtitles?\r\nNon-forced subtitles provide subtitles everytime a characters speaks.\r\n\r\n## What are \"forced\" subtitles?\r\nForced subtitles only provide subtitles when the characters speak a foreign or alien language.\r\n\r\n## Installation Instructions\r\n1. Install [Python](https://www.python.org/downloads/) (v3.5 or later).\r\n2. Install the script by executing the following in the command line: `python -m pip install PlexPreferNonForcedSubs`.\r\n3. Ensure that your Plex media server is running, then run the script using `PlexPreferNonForcedSubs` in the command line.\r\n4. On the first run, the script will prompt you to enter your [Plex token](https://www.plexopedia.com/plex-media-server/general/plex-token/). The token will be saved locally in the same folder as `token.txt`.\r\n5. 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.\r\n\r\nSee the section below for instructions on how to run, update, and uninstall the script.\r\n\r\n## Installing the Script:\r\n```\r\npython -m pip install PlexPreferNonForcedSubs\r\n```\r\n_Execute in your operating system's native command line._\r\n## Running the Script:\r\n```\r\nPlexPreferNonForcedSubs\r\n```\r\n_Execute in your operating system's native command line._\r\n## Updating the Script:\r\n```\r\npython -m pip install PlexPreferNonForcedSubs --upgrade\r\n```\r\n_Execute in your operating system's native command line._\r\n## Uninstalling the Script:\r\n```\r\npython -m pip uninstall PlexPreferNonForcedSubs\r\n```\r\n_Execute in your operating system's native command line._\r\n\r\n## Installing a Specific Version:\r\n```\r\npython -m pip install PlexPreferNonForcedSubs==VERSION_NUMBER\r\n```\r\n_Replace `VERSION_NUMBER` with your [desired version](https://github.com/RileyXX/PlexPreferNonForcedSubs/releases) (e.g. 2.1.4) and execute in your operating system's native command line._\r\n\r\n## Alternative Manual Installation Method (without pip install):\r\n1. Install [Python](https://www.python.org/downloads/) (v3.5 or later).\r\n2. Download the latest `.py` script from the [releases page](https://github.com/RileyXX/PlexPreferNonForcedSubs/releases) and move it to the desired directory.\r\n3. 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.\r\n4. On the first run, the script will prompt you to enter your [Plex token](https://www.plexopedia.com/plex-media-server/general/plex-token/). The token will be saved locally in the same folder as `token.txt`.\r\n5. Done.\r\n\r\nSee the section above for instructions on how to run, update, and uninstall the script.\r\n\r\n## Known Issues/Future Outlook\r\n- Some lines of redundant code can be shortened and/or removed. Refer to [this issue](https://github.com/RileyXX/PlexPreferNonForcedSubs/issues/4) for more details.\r\n\r\n## Also Posted On\r\n- [PyPi](https://pypi.org/project/PlexPreferNonForcedSubs/)\r\n- [Reddit](https://www.reddit.com/r/PleX/comments/105gdh7/python_code_to_set_all_movies_and_shows_in_plex/)\r\n- [Stack Overflow](https://stackoverflow.com/q/75027919/9196825)\r\n- [Plex Forums](https://forums.plex.tv/t/python-script-to-set-all-movies-and-shows-in-plex-to-use-english-non-forced-subtitles/825871)\r\n\r\n## Screenshots:\r\n##### Plex subtitle dropdown after script is done running:\r\n![Plex Subtitle Dropdown](https://i.imgur.com/BNOlwtL.png)\r\n##### PlexPreferNonForcedSubs.py script in action:\r\n![PlexPreferNonForcedSubs.py Script in Action](https://github.com/RileyXX/PlexPreferNonForcedSubs/raw/main/demo.gif)\r\n\r\n## Sponsorships, Donations, and Custom Projects\r\nIf you find my scripts helpful, you can become a [sponsor](https://github.com/sponsors/RileyXX) 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](https://twitter.com/RileyxBell).\r\n\r\n#### More Donation Options:\r\n- Cashapp: `$rileyxx`\r\n- Venmo: `@rileyxx`\r\n- Bitcoin: `bc1qrjevwqv49z8y77len3azqfghxrjmrjvhy5zqau`\r\n- Amazon Wishlist: [Link \u2197](https://www.amazon.com/hz/wishlist/ls/WURF5NWZ843U)\r\n\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\r\n",
"bugtrack_url": null,
"license": "",
"summary": "This script will set all movies and shows in your local Plex library to English non forced subtitles by default.",
"version": "2.1.8",
"project_urls": {
"Homepage": "https://github.com/RileyXX/PlexPreferNonForcedSubs"
},
"split_keywords": [
"python",
"video",
"plex",
"subtitles",
"subs"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1884fdb72232d03c69f859ed598338afc71d208e96e5ede4c9abf4c7cf4b144d",
"md5": "5bf34a4b87832c8ce436752003161741",
"sha256": "085fc84be687a2f46c052c0e7513f4590828876bf199e73cfbe1f310456269c2"
},
"downloads": -1,
"filename": "PlexPreferNonForcedSubs-2.1.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5bf34a4b87832c8ce436752003161741",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.5",
"size": 6492,
"upload_time": "2023-05-27T20:27:26",
"upload_time_iso_8601": "2023-05-27T20:27:26.147900Z",
"url": "https://files.pythonhosted.org/packages/18/84/fdb72232d03c69f859ed598338afc71d208e96e5ede4c9abf4c7cf4b144d/PlexPreferNonForcedSubs-2.1.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6633bd3393932ca4d17af64321987d3671efd5671d1c1566c9944f1fa0a66e7b",
"md5": "41dd46fcfa5b88199aba5b5ebca3256d",
"sha256": "187dcdcef4d09e18596d05beae4fbab39c5eea491b2247759134755a08a8b8c0"
},
"downloads": -1,
"filename": "PlexPreferNonForcedSubs-2.1.8.tar.gz",
"has_sig": false,
"md5_digest": "41dd46fcfa5b88199aba5b5ebca3256d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 6134,
"upload_time": "2023-05-27T20:27:27",
"upload_time_iso_8601": "2023-05-27T20:27:27.935875Z",
"url": "https://files.pythonhosted.org/packages/66/33/bd3393932ca4d17af64321987d3671efd5671d1c1566c9944f1fa0a66e7b/PlexPreferNonForcedSubs-2.1.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-27 20:27:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "RileyXX",
"github_project": "PlexPreferNonForcedSubs",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "plexprefernonforcedsubs"
}