enhancement(plex): support internal subtitles#809
enhancement(plex): support internal subtitles#809killergerbah merged 1 commit intokillergerbah:mainfrom
Conversation
e1884b6 to
79a5348
Compare
79a5348 to
616dcd1
Compare
|
Hey @ShanaryS thanks for this. It looks like really meticulous work. I tested it out and looks like it's working.
|
|
@killergerbah Thanks for the quick merge!
There is no way around this unfortunately. Plex doesn't allow us to choose what internal subtitle gets transcoded, we just tell it which playback session to transcode for so the user has to select it. The information for all the subtitles and everything we could need is in the responses or even more endpoints. But even if we were to display all the internal subtitles, it's an illusion of choice as they all would transcode the one selected in the Plex player so I opted not to show them.
You can select it before hitting play. It also can default to a specific language from the settings in your account.
Plex always burns in image formats which means this command would fail (it actually just hangs indefinitely). The only way to get the internal subtitles is for Plex to transcode them for which they have a lot of baked in logic for. If I find anything else I'll be sure to add it, but these are the limitations we have the work with for now. |
|
Got it, thanks for the explanations. |
fixes #580
This is a follow to my PR last year #533 which added external subtitle support to Plex. Plex finally added documentation to their api last month. This made it much easier to tackle this problem though I probably gave up too early last time.
The roadblock from before was that while I had the right endpoint, I needed the right arguments to have Plex deliver the entire subtitle. Now with the docs and a lot of testing, I was able to get this working along with a few other improvements.
basenametoShow SXXEYY · Episode Titleinstead of justEpisode Title, movies are nowTitle · Yearinstead ofTitle.Chinese · Mandarin / Traditional (SRT External)instead ofChinese (SRT External).languageinstead of name (2 letter codes also available).This generally works well but it can fail if there is too much going on. Plex has to transcode the media for this which I assume has some internal limits. This generally should not be a problem unless the user keeps interrupting the transcodes.
One thing I would like to see that's kinda out of scope for this PR is some indication that the subtitle is loading, specifically being fetched. Since it can take a few minutes for Plex to extract the subtitles, it leaves for a poor UX since the dialog closes immediately. I think a spinner replacing the
OKbutton and keeping the dialog up until it's fully loaded would go a long way. This is especially painful if the user has auto load on for the the subtitles.