Move stop playback to emby file

Prep to rework that part.
This commit is contained in:
angelblue05 2018-01-14 20:18:35 -06:00
parent 1798e6e01d
commit 0945d46baf

View file

@ -671,17 +671,13 @@ class Read_EmbyServer():
'LiveStreamId': None 'LiveStreamId': None
}) })
def get_live_stream(self, item_id, profile, session_id, token, offset=0, audio=None, subtitles=None): def stop_playback(self, item_id, position, playsession_id, mediasource_id=None):
url = self.get_emby_url('/LiveStreams/Open') url = self.get_emby_url('/Sessions/Playing/Stopped')
return self.doUtils.downloadUrl(url, action_type="POST", postBody={ return self.doUtils.downloadUrl(url, action_type="POST", postBody={
'UserId': self.userId,
'DeviceProfile': profile,
'ItemId': item_id, 'ItemId': item_id,
'PlaySessionId': session_id, 'MediaSourceId': mediasource_id or item_id,
'OpenToken': token, 'PositionTicks': position,
'StartTimeTicks': offset, #TODO 'PlaySessionId': playsession_id
'AudioStreamIndex': audio, #TODO
'SubtitleStreamIndex': subtitles #TODO
}) })