From 4b908a8f2d8f7c87fa7fc17ef2ac24de9639de16 Mon Sep 17 00:00:00 2001 From: blacktwin Date: Wed, 15 Jul 2020 14:37:46 -0400 Subject: [PATCH] create media.Review class --- plexapi/media.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/plexapi/media.py b/plexapi/media.py index 7a106232..b1f095ad 100644 --- a/plexapi/media.py +++ b/plexapi/media.py @@ -651,6 +651,26 @@ class Role(MediaTag): FILTER = 'role' +@utils.registerPlexObject +class Review(MediaTag): + """ Represents a single Review for a Movie. + + Attributes: + TAG (str): 'Review' + """ + TAG = 'Review' + + def _loadData(self, data): + self._data = data + self.id = cast(int, data.attrib.get('id', 0)) + self.filter = data.attrib.get('filter') + self.tag = data.attrib.get('tag') + self.text = data.attrib.get('text') + self.image = data.attrib.get('image') + self.link = data.attrib.get('link') + self.source = data.attrib.get('source') + + @utils.registerPlexObject class Similar(MediaTag): """ Represents a single Similar media tag.