Skip to content

Commit 724e669

Browse files
authored
Merge pull request #664 from JonnyWong16/feature/media_attributes
Add originalTitle attribute to show
2 parents f66624f + c585ec6 commit 724e669

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

plexapi/video.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ class Show(Video, ArtMixin, PosterMixin, SplitMergeMixin, UnmatchMatchMixin,
407407
leafCount (int): Number of items in the show view.
408408
locations (List<str>): List of folder paths where the show is found on disk.
409409
originallyAvailableAt (datetime): Datetime the show was released.
410+
originalTitle (str): The original title of the show.
410411
rating (float): Show rating (7.9; 9.8; 8.1).
411412
roles (List<:class:`~plexapi.media.Role`>): List of role objects.
412413
similar (List<:class:`~plexapi.media.Similar`>): List of Similar objects.
@@ -434,6 +435,7 @@ def _loadData(self, data):
434435
self.leafCount = utils.cast(int, data.attrib.get('leafCount'))
435436
self.locations = self.listAttrs(data, 'path', etag='Location')
436437
self.originallyAvailableAt = utils.toDatetime(data.attrib.get('originallyAvailableAt'), '%Y-%m-%d')
438+
self.originalTitle = data.attrib.get('originalTitle')
437439
self.rating = utils.cast(float, data.attrib.get('rating'))
438440
self.roles = self.findItems(data, media.Role)
439441
self.similar = self.findItems(data, media.Similar)

tests/test_video.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,7 @@ def test_video_Show_attrs(show):
610610
assert len(show.locations) == 1
611611
assert len(show.locations[0]) >= 10
612612
assert utils.is_datetime(show.originallyAvailableAt)
613+
assert show.originalTitle is None
613614
assert show.rating >= 8.0
614615
assert utils.is_int(show.ratingKey)
615616
assert sorted([i.tag for i in show.roles])[:4] == [

0 commit comments

Comments
 (0)