[Video][Actions] new action: PreviousSubtitle #24943
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.
Background
When advancing through the available subtitle tracks, it's easy to accidentally overshoot the desired one, and end up having to either navigate menus to go back a step (obscuring the video) or keep advancing through the entire list to wrap around to the beginning and finally reach the desired one again (an annoyingly circuitous approach).
Also, there are times when switching back and forth between two adjacent subtitle tracks makes sense. For example, when watching a bilingual film with a few bits of muddled dialogue, the viewer might want the normal subtitles for most of the film but switch to SDH subtitles for the muddled parts, and then switch back again. Again, this is cumbersome when the only options are to navigate menus or advance forward through the subtitle track list.
In both these cases, the problem is especially bad when subtitles for dozens of languages are present.
What does this change?
This patch adds the PreviousSubtitle action, for symmetry with NextSubtitle, and to handle situations like those described above with a single button press.
How has this been tested?
Tested on (and originally written for) Leia, on a Raspberry Pi 2 running OpenELEC. (Because that's what I have available for testing.) I mapped a button to the PreviousSubtitle action and verified that it behaves like NextSubtitle, but in the other direction.
Porting to the master branch was straightforward, since the affected code has had no structural changes since Leia.
What is the effect on users?
No effect on users unless they (or their distribution) map a button to this new action. In that case, they get a quality-of-life improvement.
Types of change
Checklist: