Skip to content
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

Merged
merged 3 commits into from
Feb 16, 2018
Merged

Fix for contentRating error in Plex #12445

merged 3 commits into from
Feb 16, 2018

Conversation

ryanm101
Copy link
Contributor

Fixes #12058

@@ -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 \
Copy link
Member

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)

Copy link
Contributor Author

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)

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)

@balloob balloob added this to the 0.63.3 milestone Feb 16, 2018
@balloob balloob merged commit 2053c8a into home-assistant:dev Feb 16, 2018
@ryanm101 ryanm101 changed the title Fix for contentRating error Fix for contentRating error in Plex Feb 17, 2018
@ryanm101 ryanm101 deleted the plexfix branch February 17, 2018 08:52
balloob pushed a commit that referenced this pull request Feb 17, 2018
* Fix for contentRating

* Use getattr instead of hasattr

* Lint
@balloob balloob mentioned this pull request Feb 17, 2018
@home-assistant home-assistant locked and limited conversation to collaborators May 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants