Repository navigation
Closed
Labels
Description
Describe the issue
Metadata for subtitle streams are almost always missing.
Code snipppet
movies = plex.library.section('Movies')
for video in movies.search():
print("[%s]" % video.title)
video = video.reload()
for subtitle in video.subtitleStreams():
print("\t%s - %s | %s | %s | %s" % (subtitle, subtitle.title, subtitle.key, subtitle.format, subtitle.forced))
print("done!")Code snipppet output:
[#RealityHigh]
<SubtitleStream:42643> - None | None | None | False
<SubtitleStream:42644> - None | None | None | False
<SubtitleStream:42645> - None | None | None | False
<SubtitleStream:42646> - None | None | None | False
<SubtitleStream:42647> - None | None | None | False
[The 'Burbs]
<SubtitleStream:194791> - None | None | None | False
[0.0MHz]
<SubtitleStream:216274:Simplified> - Simplified | None | None | False
<SubtitleStream:216275:Traditional> - Traditional | None | None | False
<SubtitleStream:/library/streams/146> - None | /library/streams/146237 | srt | False
[2 Fast 2 Furious]
<SubtitleStream:210926> - None | None | None | False
<SubtitleStream:210927> - None | None | None | False
[2 Guns]
<SubtitleStream:270997> - None | None | None | False
[3 from Hell]
<SubtitleStream:/library/streams/228> - None | /library/streams/228323 | srt | False
...
...
...
done!
Expected behavior
For example, looking at #RealityHigh via Plex site, I see English, Dutch, French, Spanish, and German non-forced SRT subtitles. I expected to see these information here alongside their key. That should be true for every movie and be mostly consistent.
subtitle.title, subtitle.key, subtitle.format, subtitle.forced shouldn't be nearly always 'None'
Enviroment:
- OS: Ubuntu; Plex is running in a docker container
- Plex version: 4.38.2
- Python Version: 3.8.2
- PlexAPI version: 3.5.0
Activity
blacktwin commentedon Jul 27, 2020
Here is the content of a SubtitleStream
You are not pulling out the language information into your string. There is more information available than what you are outputting to you string. Also these are the attributes found in the XML so you can confirm that this information is accurate.
Well looks like the
SubtitleStreamclass needs an update.requiredBandwidths,streamIdentifier,displayTitle,extendedDisplayTitlewill need to be added.blacktwin commentedon Jul 27, 2020
updating the
media.SubtitleStreamclass to the following should give you what you need.Feel free to create a PR for this and please reference this Issue if you do. If not, I'll get around to it eventually.
Also you can always check the items XML to see what information is available and cross ref this project. If something is missing create an issue or a PR to fix it.
JonnyWong16 commentedon Feb 3, 2021
All subtitle attributes have been added in #590.