mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 22:07:13 -04:00
update dlna play to device timeout
This commit is contained in:
parent
335ec27edc
commit
95084d6f7d
@ -113,7 +113,7 @@ namespace Emby.Dlna.PlayTo
|
|||||||
|
|
||||||
private int GetInactiveTimerIntervalMs()
|
private int GetInactiveTimerIntervalMs()
|
||||||
{
|
{
|
||||||
return Timeout.Infinite;
|
return 60000;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Start()
|
public void Start()
|
||||||
|
@ -48,23 +48,7 @@ namespace Emby.Dlna.PlayTo
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
var lastDateKnownActivity = _creationTime > _device.DateLastActivity ? _creationTime : _device.DateLastActivity;
|
return !_disposed && _device != null;
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user