Skip to content

Fix for contentRating error in Plex#12445

Merged
balloob merged 3 commits intohome-assistant:devfrom
ryanm101:plexfix
Feb 16, 2018
Merged

Fix for contentRating error in Plex#12445
balloob merged 3 commits intohome-assistant:devfrom
ryanm101:plexfix

Conversation

@ryanm101
Copy link
Copy Markdown
Contributor

Fixes #12058

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
Copy Markdown
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
Copy Markdown
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

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)
Copy link
Copy Markdown

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