|
|
@ -203,6 +203,11 @@ namespace MediaBrowser.Controller.Session
|
|
|
|
|
|
|
|
|
|
|
|
public void StartAutomaticProgress(ITimerFactory timerFactory, PlaybackProgressInfo progressInfo)
|
|
|
|
public void StartAutomaticProgress(ITimerFactory timerFactory, PlaybackProgressInfo progressInfo)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (_disposed)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
lock (_progressLock)
|
|
|
|
lock (_progressLock)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_lastProgressInfo = progressInfo;
|
|
|
|
_lastProgressInfo = progressInfo;
|
|
|
@ -223,6 +228,11 @@ namespace MediaBrowser.Controller.Session
|
|
|
|
|
|
|
|
|
|
|
|
private async void OnProgressTimerCallback(object state)
|
|
|
|
private async void OnProgressTimerCallback(object state)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (_disposed)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var progressInfo = _lastProgressInfo;
|
|
|
|
var progressInfo = _lastProgressInfo;
|
|
|
|
if (progressInfo == null)
|
|
|
|
if (progressInfo == null)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -274,8 +284,12 @@ namespace MediaBrowser.Controller.Session
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private bool _disposed = false;
|
|
|
|
|
|
|
|
|
|
|
|
public void Dispose()
|
|
|
|
public void Dispose()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
_disposed = true;
|
|
|
|
|
|
|
|
|
|
|
|
StopAutomaticProgress();
|
|
|
|
StopAutomaticProgress();
|
|
|
|
_sessionManager = null;
|
|
|
|
_sessionManager = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|