Skip to content

Commit

Permalink
Add SubtitleStream attributes for on-demand subtitles
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyWong16 committed Jul 21, 2023
1 parent a9be59e commit 36ac810
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions plexapi/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -427,7 +431,11 @@ def _loadData(self, data):
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. """
Expand Down

0 comments on commit 36ac810

Please sign in to comment.