Add option to default to Last Captions State #1183
Open
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.
This change adds a new configuration option for mythfrontend closed captioning. Setup -> Video -> Playback OSD -> Always display Closed Captioning or Subtitles is switched to Default to display Closed Captioning or Subtitles and the user is able to pick a new configuration option.
A LastCaptions entry is added into the Settings database. This boolean gets updated each time a user toggles captions on or off, and indicates whether captions were enabled or disabled the last time it changed. The m_captionsEnabledbyDefault variable is switched from a boolean to an unsigned int so that it can hold 0, 1, or 2. It's set to 2 when the Last Captions State configuration is selected. When starting up viewing of a video recording or Live TV, by default, captions are either disabled (0), enabled (1), or set to match the last caption state (2).
When a user picks Last Captions State, mythfrontend will remember whether captions were enabled or disabled the last time something was watched, and will carry over that state for the next thing to be watched. Turn on captions, and they will continue to appear until you explicitly turn them off. Turn off captions and they will not appear until you explicitly turn them on.
Resolves: #1154
Checklist