From af961dbaf48f9d889d82fc945829b5fabadd58e3 Mon Sep 17 00:00:00 2001 From: croneter Date: Mon, 12 Feb 2018 20:14:25 +0100 Subject: [PATCH] Fix GB content ratings - Should fix #401 --- resources/lib/PlexAPI.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/lib/PlexAPI.py b/resources/lib/PlexAPI.py index 9cc1e7da..019c51ef 100644 --- a/resources/lib/PlexAPI.py +++ b/resources/lib/PlexAPI.py @@ -469,11 +469,15 @@ class API(object): """ Get the content rating or None """ - mpaa = self.item.get('contentRating', None) + mpaa = self.item.get('contentRating') + if mpaa is None: + return # Convert more complex cases if mpaa in ("NR", "UR"): # Kodi seems to not like NR, but will accept Rated Not Rated mpaa = "Rated Not Rated" + elif mpaa.startswith('gb/'): + mpaa = mpaa.replace('gb/', 'UK:', 1) return mpaa def country_list(self):