update dlna resume

This commit is contained in:
Luke Pulverenti 2015-05-17 09:55:48 -04:00
parent 94a2cfa9f5
commit 337777afc9

View File

@ -385,6 +385,16 @@ namespace MediaBrowser.Dlna.PlayTo
if (newItem.StreamInfo.IsDirectStream) if (newItem.StreamInfo.IsDirectStream)
{ {
await Task.Delay(1000).ConfigureAwait(false);
var maxWait = 15000000;
var currentWait = 0;
while (_device.TransportState != TRANSPORTSTATE.PLAYING && currentWait < maxWait)
{
await Task.Delay(1000).ConfigureAwait(false);
currentWait += 1000;
}
await _device.Seek(TimeSpan.FromTicks(newPosition)).ConfigureAwait(false); await _device.Seek(TimeSpan.FromTicks(newPosition)).ConfigureAwait(false);
} }
return; return;