mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
update tv db cleanup
This commit is contained in:
parent
e62270df35
commit
bbaf88ae1f
@ -107,7 +107,7 @@ namespace MediaBrowser.Controller.Persistence
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="type">The type.</param>
|
/// <param name="type">The type.</param>
|
||||||
/// <returns>IEnumerable{Guid}.</returns>
|
/// <returns>IEnumerable{Guid}.</returns>
|
||||||
IEnumerable<string> GetItemsOfType(Type type);
|
IEnumerable<Guid> GetItemsOfType(Type type);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Saves the children.
|
/// Saves the children.
|
||||||
|
@ -134,11 +134,6 @@ namespace MediaBrowser.Dlna.PlayTo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetServerAddress()
|
|
||||||
{
|
|
||||||
return _serverAddress;
|
|
||||||
}
|
|
||||||
|
|
||||||
async void _device_MediaChanged(object sender, MediaChangedEventArgs e)
|
async void _device_MediaChanged(object sender, MediaChangedEventArgs e)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -25,14 +25,14 @@ namespace MediaBrowser.Server.Implementations.HttpServer.Security
|
|||||||
{
|
{
|
||||||
var authorization = _authContext.GetAuthorizationInfo(requestContext);
|
var authorization = _authContext.GetAuthorizationInfo(requestContext);
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(authorization.Token))
|
//if (!string.IsNullOrWhiteSpace(authorization.Token))
|
||||||
{
|
//{
|
||||||
var auth = GetTokenInfo(requestContext);
|
// var auth = GetTokenInfo(requestContext);
|
||||||
if (auth != null)
|
// if (auth != null)
|
||||||
{
|
// {
|
||||||
return _sessionManager.GetSessionByAuthenticationToken(auth, authorization.DeviceId, requestContext.RemoteIp, authorization.Version);
|
// return _sessionManager.GetSessionByAuthenticationToken(auth, authorization.DeviceId, requestContext.RemoteIp, authorization.Version);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
var session = _sessionManager.GetSession(authorization.DeviceId, authorization.Client, authorization.Version);
|
var session = _sessionManager.GetSession(authorization.DeviceId, authorization.Client, authorization.Version);
|
||||||
return Task.FromResult(session);
|
return Task.FromResult(session);
|
||||||
|
@ -1115,7 +1115,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|||||||
{
|
{
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
|
|
||||||
if (!currentIdList.Contains(new Guid(programId)))
|
if (!currentIdList.Contains(programId))
|
||||||
{
|
{
|
||||||
var program = _libraryManager.GetItemById(programId);
|
var program = _libraryManager.GetItemById(programId);
|
||||||
|
|
||||||
|
@ -521,8 +521,8 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<string> GetItemsOfType(Type type)
|
public IEnumerable<Guid> GetItemsOfType(Type type)
|
||||||
{
|
{
|
||||||
if (type == null)
|
if (type == null)
|
||||||
{
|
{
|
||||||
@ -541,7 +541,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||||||
{
|
{
|
||||||
while (reader.Read())
|
while (reader.Read())
|
||||||
{
|
{
|
||||||
yield return reader.GetString(0);
|
yield return reader.GetGuid(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ namespace MediaBrowser.Server.Implementations.Photos
|
|||||||
|
|
||||||
protected abstract Task<List<BaseItem>> GetItemsWithImages(IHasImages item);
|
protected abstract Task<List<BaseItem>> GetItemsWithImages(IHasImages item);
|
||||||
|
|
||||||
private const string Version = "3";
|
private const string Version = "4";
|
||||||
protected string GetConfigurationCacheKey(List<BaseItem> items, string itemName)
|
protected string GetConfigurationCacheKey(List<BaseItem> items, string itemName)
|
||||||
{
|
{
|
||||||
var parts = Version + "_" + (itemName ?? string.Empty) + "_" +
|
var parts = Version + "_" + (itemName ?? string.Empty) + "_" +
|
||||||
|
@ -41,17 +41,25 @@ namespace MediaBrowser.Server.Implementations.Session
|
|||||||
}
|
}
|
||||||
|
|
||||||
private bool _isActive;
|
private bool _isActive;
|
||||||
|
private DateTime _lastActivityDate;
|
||||||
public bool IsSessionActive
|
public bool IsSessionActive
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return HasOpenSockets;
|
if (HasOpenSockets)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//return false;
|
||||||
|
return _isActive && (DateTime.UtcNow - _lastActivityDate).TotalMinutes <= 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnActivity()
|
public void OnActivity()
|
||||||
{
|
{
|
||||||
_isActive = true;
|
_isActive = true;
|
||||||
|
_lastActivityDate = DateTime.UtcNow;
|
||||||
}
|
}
|
||||||
|
|
||||||
private IEnumerable<IWebSocketConnection> GetActiveSockets()
|
private IEnumerable<IWebSocketConnection> GetActiveSockets()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user