-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for contentRating error in Plex #12445
Conversation
@@ -370,7 +370,8 @@ def refresh(self, device, session): | |||
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 = self._session.contentRating \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead, use getattr(self._session, 'contentRating', None)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool thanks, done
@@ -370,7 +370,7 @@ def refresh(self, device, session): | |||
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (86 > 79 characters)
* Fix for contentRating * Use getattr instead of hasattr * Lint
Fixes #12058