mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-10 14:14:19 +00:00
Add SubtitleStream attributes for on-demand subtitles (#1190)
This commit is contained in:
parent
c5108b1115
commit
01f7ee5a40
1 changed files with 8 additions and 0 deletions
|
@ -415,7 +415,11 @@ class SubtitleStream(MediaPartStream):
|
|||
forced (bool): True if this is a forced subtitle.
|
||||
format (str): The format of the subtitle stream (ex: srt).
|
||||
headerCompression (str): The header compression of the subtitle stream.
|
||||
providerTitle (str): The provider title where the on-demand subtitle is downloaded from.
|
||||
score (int): The match score of the on-demand subtitle.
|
||||
sourceKey (str): The source key of the on-demand subtitle.
|
||||
transient (str): Unknown.
|
||||
userID (int): The user id of the user that downloaded the on-demand subtitle.
|
||||
"""
|
||||
TAG = 'Stream'
|
||||
STREAMTYPE = 3
|
||||
|
@ -427,7 +431,11 @@ class SubtitleStream(MediaPartStream):
|
|||
self.forced = utils.cast(bool, data.attrib.get('forced', '0'))
|
||||
self.format = data.attrib.get('format')
|
||||
self.headerCompression = data.attrib.get('headerCompression')
|
||||
self.providerTitle = data.attrib.get('providerTitle')
|
||||
self.score = utils.cast(int, data.attrib.get('score'))
|
||||
self.sourceKey = data.attrib.get('sourceKey')
|
||||
self.transient = data.attrib.get('transient')
|
||||
self.userID = utils.cast(int, data.attrib.get('userID'))
|
||||
|
||||
def setDefault(self):
|
||||
""" Sets this subtitle stream as the default subtitle stream. """
|
||||
|
|
Loading…
Reference in a new issue