PlayTo Progressreporting

pull/702/head
7illusions 11 years ago
parent c60103df64
commit 871a3cb52c

@ -167,25 +167,28 @@ namespace MediaBrowser.Dlna.PlayTo
if (_currentItem == null || _device.IsStopped) if (_currentItem == null || _device.IsStopped)
return; return;
if (!_playbackStarted) var playlistItem = Playlist.FirstOrDefault(p => p.PlayState == 1);
if (playlistItem != null)
{ {
await _sessionManager.OnPlaybackStart(new PlaybackInfo if (!_playbackStarted)
{ {
Item = _currentItem, await _sessionManager.OnPlaybackStart(new PlaybackInfo
SessionId = _session.Id, {
CanSeek = true, Item = _currentItem,
QueueableMediaTypes = new List<string> { _currentItem.MediaType } SessionId = _session.Id,
CanSeek = true,
}).ConfigureAwait(false); QueueableMediaTypes = new List<string> { _currentItem.MediaType },
MediaSourceId = playlistItem.MediaSourceId,
AudioStreamIndex = playlistItem.AudioStreamIndex,
SubtitleStreamIndex = playlistItem.SubtitleStreamIndex
_playbackStarted = true; }).ConfigureAwait(false);
}
if ((_device.IsPlaying || _device.IsPaused)) _playbackStarted = true;
{ }
var playlistItem = Playlist.FirstOrDefault(p => p.PlayState == 1);
if (playlistItem != null) if ((_device.IsPlaying || _device.IsPaused))
{ {
var ticks = _device.Position.Ticks; var ticks = _device.Position.Ticks;

Loading…
Cancel
Save