bazarr/libs/plex/interfaces/status.py

22 lines
543 B
Python
Raw Normal View History

2018-10-31 16:08:29 +00:00
from plex.core.idict import idict
from plex.interfaces.core.base import Interface
class StatusInterface(Interface):
path = 'status'
def sessions(self):
response = self.http.get('sessions')
return self.parse(response, idict({
'MediaContainer': ('SessionContainer', idict({
'Track': 'Track',
'Video': {
'episode': 'Episode',
'clip': 'Clip',
'movie': 'Movie'
}
}))
}))