mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-15 23:02:18 +01:00
update character escaping
This commit is contained in:
@@ -1108,7 +1108,11 @@ namespace Emby.Server.Implementations.Channels
|
||||
{
|
||||
if (_fileSystem.GetLastWriteTimeUtc(cachePath).Add(cacheLength) > DateTime.UtcNow)
|
||||
{
|
||||
return _jsonSerializer.DeserializeFromFile<ChannelItemResult>(cachePath);
|
||||
var cachedResult = _jsonSerializer.DeserializeFromFile<ChannelItemResult>(cachePath);
|
||||
if (cachedResult != null)
|
||||
{
|
||||
return cachedResult;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1131,7 +1135,11 @@ namespace Emby.Server.Implementations.Channels
|
||||
{
|
||||
if (_fileSystem.GetLastWriteTimeUtc(cachePath).Add(cacheLength) > DateTime.UtcNow)
|
||||
{
|
||||
return _jsonSerializer.DeserializeFromFile<ChannelItemResult>(cachePath);
|
||||
var cachedResult = _jsonSerializer.DeserializeFromFile<ChannelItemResult>(cachePath);
|
||||
if (cachedResult != null)
|
||||
{
|
||||
return cachedResult;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1162,6 +1170,11 @@ namespace Emby.Server.Implementations.Channels
|
||||
|
||||
var result = await channel.GetChannelItems(query, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (result == null)
|
||||
{
|
||||
throw new InvalidOperationException("Channel returned a null result from GetChannelItems");
|
||||
}
|
||||
|
||||
if (!startIndex.HasValue && !limit.HasValue)
|
||||
{
|
||||
CacheResponse(result, cachePath);
|
||||
|
||||
Reference in New Issue
Block a user