Преглед на файлове

update dlna play to device timeout

Luke Pulverenti преди 7 години
родител
ревизия
95084d6f7d
променени са 2 файла, в които са добавени 2 реда и са изтрити 18 реда
  1. 1 1
      Emby.Dlna/PlayTo/Device.cs
  2. 1 17
      Emby.Dlna/PlayTo/PlayToController.cs

+ 1 - 1
Emby.Dlna/PlayTo/Device.cs

@@ -113,7 +113,7 @@ namespace Emby.Dlna.PlayTo
 
         private int GetInactiveTimerIntervalMs()
         {
-            return Timeout.Infinite;
+            return 60000;
         }
 
         public void Start()

+ 1 - 17
Emby.Dlna/PlayTo/PlayToController.cs

@@ -48,23 +48,7 @@ namespace Emby.Dlna.PlayTo
         {
             get
             {
-                var lastDateKnownActivity = _creationTime > _device.DateLastActivity ? _creationTime : _device.DateLastActivity;
-
-                if (DateTime.UtcNow >= lastDateKnownActivity.AddSeconds(120))
-                {
-                    try
-                    {
-                        // Session is inactive, mark it for Disposal and don't start the elapsed timer.
-                        _sessionManager.ReportSessionEnded(_session.Id);
-                    }
-                    catch (Exception ex)
-                    {
-                        _logger.ErrorException("Error in ReportSessionEnded", ex);
-                    }
-                    return false;
-                }
-
-                return _device != null;
+                return !_disposed && _device != null;
             }
         }