From cc62f5093c30b26b0faeadd4e8acb3fca5f6f529 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Wed, 10 Feb 2021 21:05:21 -0800 Subject: [PATCH 1/3] Add originalTitle attribute to show --- plexapi/video.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plexapi/video.py b/plexapi/video.py index c2957b1e5..6524f3392 100644 --- a/plexapi/video.py +++ b/plexapi/video.py @@ -407,6 +407,7 @@ class Show(Video, SplitMergeMixin, UnmatchMatchMixin, leafCount (int): Number of items in the show view. locations (List): List of folder paths where the show is found on disk. originallyAvailableAt (datetime): Datetime the show was released. + originalTitle (str): The original title of the show. rating (float): Show rating (7.9; 9.8; 8.1). roles (List<:class:`~plexapi.media.Role`>): List of role objects. similar (List<:class:`~plexapi.media.Similar`>): List of Similar objects. @@ -434,6 +435,7 @@ def _loadData(self, data): self.leafCount = utils.cast(int, data.attrib.get('leafCount')) self.locations = self.listAttrs(data, 'path', etag='Location') self.originallyAvailableAt = utils.toDatetime(data.attrib.get('originallyAvailableAt'), '%Y-%m-%d') + self.originalTitle = data.attrib.get('originalTitle') self.rating = utils.cast(float, data.attrib.get('rating')) self.roles = self.findItems(data, media.Role) self.similar = self.findItems(data, media.Similar) From 10af1ce65dccbf9590ed300b51e37a171b096d0d Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Wed, 10 Feb 2021 21:03:10 -0800 Subject: [PATCH 2/3] Update test for show originalTitle attribute --- tests/test_video.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_video.py b/tests/test_video.py index 87c3014c8..cc637b222 100644 --- a/tests/test_video.py +++ b/tests/test_video.py @@ -566,6 +566,7 @@ def test_video_Show_attrs(show): assert len(show.locations) == 1 assert len(show.locations[0]) >= 10 assert utils.is_datetime(show.originallyAvailableAt) + assert show.originalTitle == "" assert show.rating >= 8.0 assert utils.is_int(show.ratingKey) assert sorted([i.tag for i in show.roles])[:4] == [ From c585ec6bbfd652c1f916679f78521c08bf368bba Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Sun, 14 Feb 2021 14:28:54 -0800 Subject: [PATCH 3/3] Fix show originalTitle in test --- tests/test_video.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_video.py b/tests/test_video.py index cc637b222..0b7264c3e 100644 --- a/tests/test_video.py +++ b/tests/test_video.py @@ -566,7 +566,7 @@ def test_video_Show_attrs(show): assert len(show.locations) == 1 assert len(show.locations[0]) >= 10 assert utils.is_datetime(show.originallyAvailableAt) - assert show.originalTitle == "" + assert show.originalTitle is None assert show.rating >= 8.0 assert utils.is_int(show.ratingKey) assert sorted([i.tag for i in show.roles])[:4] == [