mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 19:53:17 +00:00
Option to include paused content when requesting is media is playing.
This commit is contained in:
parent
36b5d12a19
commit
0c8587ceac
1 changed files with 3 additions and 1 deletions
|
@ -173,8 +173,10 @@ class PlexClient(object):
|
|||
def timeline(self):
|
||||
return self.sendCommand('timeline/poll', **{'wait':1, 'commandID':4})
|
||||
|
||||
def isPlayingMedia(self):
|
||||
def isPlayingMedia(self, includePaused=False):
|
||||
for mediatype in self.timeline():
|
||||
if mediatype.get('state') == 'playing':
|
||||
return True
|
||||
if includePaused and mediatype.get('state') == 'paused':
|
||||
return True
|
||||
return False
|
||||
|
|
Loading…
Reference in a new issue