Fix for contentRating error (#12445)

* Fix for contentRating

* Use getattr instead of hasattr

* Lint
pull/12405/merge
Ryan McLean 2018-02-16 19:51:19 +00:00 committed by Paulus Schoutsen
parent 13d6e56106
commit 2053c8a908
1 changed files with 2 additions and 1 deletions

View File

@ -370,7 +370,8 @@ class PlexClient(MediaPlayerDevice):
self._is_player_available = False
self._media_position = self._session.viewOffset
self._media_content_id = self._session.ratingKey
self._media_content_rating = self._session.contentRating
self._media_content_rating = getattr(
self._session, 'contentRating', None)
self._set_player_state()