mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
Re-add mpaa rating
This commit is contained in:
parent
ce47644868
commit
ce81a1fc33
4 changed files with 6 additions and 3 deletions
|
@ -168,9 +168,9 @@ class API(object):
|
|||
|
||||
return overview
|
||||
|
||||
def get_mpaa(self):
|
||||
# Convert more complex cases
|
||||
mpaa = self.item.get('OfficialRating', "")
|
||||
def get_mpaa(self, rating=None):
|
||||
|
||||
mpaa = rating or self.item.get('OfficialRating', "")
|
||||
|
||||
if mpaa in ("NR", "UR"):
|
||||
# Kodi seems to not like NR, but will accept Not Rated
|
||||
|
|
|
@ -246,6 +246,7 @@ class Actions(object):
|
|||
obj['Genres'] = " / ".join(obj['Genres'] or [])
|
||||
obj['Studios'] = [API.validate_studio(studio) for studio in (obj['Studios'] or [])]
|
||||
obj['Studios'] = " / ".join(obj['Studios'])
|
||||
obj['Mpaa'] = API.get_mpaa(obj['Mpaa'])
|
||||
obj['People'] = obj['People'] or []
|
||||
obj['Countries'] = " / ".join(obj['Countries'] or [])
|
||||
obj['Directors'] = " / ".join(obj['Directors'] or [])
|
||||
|
|
|
@ -82,6 +82,7 @@ class Movies(KodiDb):
|
|||
obj['Writers'] = " / ".join(obj['Writers'] or [])
|
||||
obj['Directors'] = " / ".join(obj['Directors'] or [])
|
||||
obj['Plot'] = API.get_overview(obj['Plot'])
|
||||
obj['Mpaa'] = API.get_mpaa(obj['Mpaa'])
|
||||
obj['Resume'] = API.adjust_resume((obj['Resume'] or 0) / 10000000.0)
|
||||
obj['Runtime'] = round(float((obj['Runtime'] or 0) / 10000000.0), 6)
|
||||
obj['People'] = API.get_people_artwork(obj['People'])
|
||||
|
|
|
@ -90,6 +90,7 @@ class TVShows(KodiDb):
|
|||
obj['LibraryName'] = library['Name']
|
||||
obj['Genres'] = obj['Genres'] or []
|
||||
obj['People'] = obj['People'] or []
|
||||
obj['Mpaa'] = API.get_mpaa(obj['Mpaa'])
|
||||
obj['Studios'] = [API.validate_studio(studio) for studio in (obj['Studios'] or [])]
|
||||
obj['Genre'] = " / ".join(obj['Genres'])
|
||||
obj['People'] = API.get_people_artwork(obj['People'])
|
||||
|
|
Loading…
Reference in a new issue