Skip to content

Commit 14fdc51

Browse files
Add 'forced' var to subtitleStream
1 parent d227437 commit 14fdc51

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

plexapi/media.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ class SubtitleStream(MediaPartStream):
256256
Attributes:
257257
TAG (str): 'Stream'
258258
STREAMTYPE (int): 3
259+
forced (bool): True if this is a forced subtitle
259260
format (str): Subtitle format (ex: srt).
260261
key (str): Key of this subtitle stream (ex: /library/streams/212284).
261262
title (str): Title of this subtitle stream.
@@ -266,6 +267,7 @@ class SubtitleStream(MediaPartStream):
266267
def _loadData(self, data):
267268
""" Load attribute values from Plex XML response. """
268269
super(SubtitleStream, self)._loadData(data)
270+
self.forced = cast(bool, data.attrib.get('forced', '0'))
269271
self.format = data.attrib.get('format')
270272
self.key = data.attrib.get('key')
271273
self.title = data.attrib.get('title')

0 commit comments

Comments
 (0)