ukdtom / WebTools.bundle

WebTools is a collection of tools for Plex Media Server. Like the Unsupported AppStore (UAS)
https://forums.plex.tv/discussion/288191
Mozilla Public License 2.0
1.3k stars 170 forks source link

[subs] add 'forced' flag and the 'title' of the sub stream to the listing #407

Closed OttoKerner closed 5 years ago

OttoKerner commented 7 years ago

In the 'Subtitle' module, it'd help tremendously if one could also see if a subtitle has been marked as 'forced'.

Additionally, the MKV container supports 'title' tags on all stream types. If the MKV was authored with care, one can glean important information abotu the subtitle from there.

Plex is already importing this into the database, but doesn't expose it in the GUI, except in the mediainfo:

<Stream id="184614" streamType="3" default="1" forced="1" codec="srt" index="4" language="Deutsch" languageCode="ger" codecID="S_TEXT/UTF8" format="srt" title="Forced Subs"/>
<Stream id="184615" streamType="3" codec="srt" index="5" language="Deutsch" languageCode="ger" codecID="S_TEXT/UTF8" format="srt" title="full subs"/>
<Stream id="184616" streamType="3" codec="vobsub" index="6" language="Deutsch" languageCode="ger" codecID="S_VOBSUB" format="vobsub" title="full subs"/>
<Stream id="184617" streamType="3" codec="srt" index="7" language="Deutsch" languageCode="ger" codecID="S_TEXT/UTF8" format="srt" title="Songtexte"/>
<Stream id="184618" streamType="3" codec="vobsub" index="8" language="Deutsch" languageCode="ger" codecID="S_VOBSUB" format="vobsub" title="Songtexte"/>
<Stream id="184619" streamType="3" selected="1" codec="srt" index="9" language="English" languageCode="eng" codecID="S_TEXT/UTF8" format="srt" title="full subs"/>
<Stream id="184620" streamType="3" codec="vobsub" index="10" language="English" languageCode="eng" codecID="S_VOBSUB" format="vobsub" title="full subs"/>
<Stream id="184621" streamType="3" codec="srt" index="11" language="English" languageCode="eng" codecID="S_TEXT/UTF8" format="srt" title="song texts"/>
<Stream id="184622" streamType="3" codec="vobsub" index="12" language="English" languageCode="eng" codecID="S_VOBSUB" format="vobsub" title="song texts"/>
ukdtom commented 6 years ago

Added Forced and Title

Backend call /api/v3/pms/getSubtitles/<key> now returns like:

[
    {
        "languageCode": "eng",
        "title": "English-Forced",
        "url": null,
        "selected": null,
        "forced": "1",
        "codec": "srt",
        "location": "Embedded",
        "key": "226628"
    },
    {
        "languageCode": "dan",
        "title": null,
        "url": "file:///share/CACHEDEV1_DATA/video/new/movies/jan/AAA (2017)/AAA.da.srt",
        "selected": "1",
        "forced": null,
        "codec": "srt",
        "location": "Sidecar",
        "key": "226300"
    },
    {
        "languageCode": "por",
        "title": null,
        "url": "file:///share/CACHEDEV1_DATA/video/new/movies/jan/AAA (2017)/AAA.pt-br.srt",
        "selected": null,
        "forced": null,
        "codec": "srt",
        "location": "Sidecar",
        "key": "226917"
    }
]
OttoKerner commented 6 years ago

Don't forget that sidecar subtitles can also be 'forced'. "url": "file:///share/CACHEDEV1_DATA/video/new/movies/jan/AAA (2017)/AAA.da.forced.srt"

SvenErik1968 commented 6 years ago

I have also seen the forced flag used before the language flag

AAA.forced.da.srt

ukdtom commented 6 years ago

Forced is in the xml returned by PMS, so simply relaying it to the frontend

ukdtom commented 5 years ago

Sadly, dev work has been put on hold, due to plugins been discontinued by Plex

Ref: https://www.plex.tv/blog/subtitles-and-sunsets-big-improvements-little-housekeeping/

No new versions will be release, and this project has been put on hold

UAS will still be maintained for as long as it lasts