mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-28 13:01:57 +00:00
reduce AnalyzeDurationMs for live tv
This commit is contained in:
@@ -491,7 +491,7 @@ namespace Emby.Server.Implementations.Dto
|
||||
}
|
||||
}
|
||||
|
||||
if (!(item is LiveTvProgram))
|
||||
if (!(item is LiveTvProgram) || fields.Contains(ItemFields.PlayAccess))
|
||||
{
|
||||
dto.PlayAccess = item.GetPlayAccess(user);
|
||||
}
|
||||
|
||||
@@ -425,8 +425,7 @@ namespace Emby.Server.Implementations.Library
|
||||
|
||||
if (parent != null)
|
||||
{
|
||||
await parent.ValidateChildren(new Progress<double>(), CancellationToken.None)
|
||||
.ConfigureAwait(false);
|
||||
await parent.ValidateChildren(new Progress<double>(), CancellationToken.None, new MetadataRefreshOptions(_fileSystem), false) .ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
else if (parent != null)
|
||||
|
||||
@@ -6,7 +6,6 @@ using System.Threading.Tasks;
|
||||
using MediaBrowser.Controller.MediaEncoding;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
using MediaBrowser.Model.Dto;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.LiveTv
|
||||
@@ -16,6 +15,8 @@ namespace Emby.Server.Implementations.LiveTv
|
||||
private readonly IMediaEncoder _mediaEncoder;
|
||||
private readonly ILogger _logger;
|
||||
|
||||
const int AnalyzeDurationMs = 2000;
|
||||
|
||||
public LiveStreamHelper(IMediaEncoder mediaEncoder, ILogger logger)
|
||||
{
|
||||
_mediaEncoder = mediaEncoder;
|
||||
@@ -34,7 +35,7 @@ namespace Emby.Server.Implementations.LiveTv
|
||||
Protocol = mediaSource.Protocol,
|
||||
MediaType = isAudio ? DlnaProfileType.Audio : DlnaProfileType.Video,
|
||||
ExtractChapters = false,
|
||||
AnalyzeDurationSections = 2
|
||||
AnalyzeDurationMs = AnalyzeDurationMs
|
||||
|
||||
}, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
@@ -98,6 +99,8 @@ namespace Emby.Server.Implementations.LiveTv
|
||||
|
||||
// Try to estimate this
|
||||
mediaSource.InferTotalBitrate(true);
|
||||
|
||||
mediaSource.AnalyzeDurationMs = AnalyzeDurationMs;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
|
||||
|
||||
_sharedBuffer.Enqueue(copy);
|
||||
|
||||
while (_sharedBuffer.Count > 3000)
|
||||
while (_sharedBuffer.Count > 10000)
|
||||
{
|
||||
byte[] bytes;
|
||||
_sharedBuffer.TryDequeue(out bytes);
|
||||
|
||||
Reference in New Issue
Block a user