Skip to content

Commit

Permalink
Player is guaranteed
Browse files Browse the repository at this point in the history
The player isn't always there, this makes sure it's there when we care.
  • Loading branch information
JBassett authored Oct 8, 2019
1 parent e99a7a5 commit 3cfe7b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/plex_webhooks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ async def handle_webhook(hass, webhook_id, request):
if event in playing:
logging.debug('Plex started playing')
data['status'] = 'PLAYING'
data['playerUuid'] = data['Player']['uuid']
elif event in stopped:
logging.debug('Plex stopped playing')
data['status'] = 'STOPPED'
data['playerUuid'] = data['Player']['uuid']
elif event in grabbed:
logging.debug('Plex got new media')
data['status'] = 'GRABBED'
Expand Down

0 comments on commit 3cfe7b6

Please sign in to comment.