mirror of
https://github.com/home-assistant/core.git
synced 2026-10-05 15:28:34 +01:00
Fix for contentRating error (#12445)
* Fix for contentRating * Use getattr instead of hasattr * Lint
This commit is contained in:
1 parent
13d6e56106
commit
2053c8a908
1 file changed
+2
-1
@@ -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()
|
||||
|
||||
|
||||
Reference in new issue
Block a user