mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 01:54:42 +01:00
update opening of live streams
This commit is contained in:
@@ -30,7 +30,7 @@ namespace Emby.Server.Implementations.Channels
|
||||
return Task.FromResult<IEnumerable<MediaSourceInfo>>(new List<MediaSourceInfo>());
|
||||
}
|
||||
|
||||
public Task<Tuple<MediaSourceInfo, IDirectStreamProvider>> OpenMediaSource(string openToken, CancellationToken cancellationToken)
|
||||
public Task<Tuple<MediaSourceInfo, IDirectStreamProvider>> OpenMediaSource(string openToken, bool allowLiveStreamProbe, CancellationToken cancellationToken)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ using MediaBrowser.Model.Tasks;
|
||||
|
||||
namespace Emby.Server.Implementations.Data
|
||||
{
|
||||
public class CleanDatabaseScheduledTask : IScheduledTask
|
||||
public class CleanDatabaseScheduledTask : ILibraryPostScanTask
|
||||
{
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly IItemRepository _itemRepo;
|
||||
@@ -49,7 +49,7 @@ namespace Emby.Server.Implementations.Data
|
||||
get { return "Library"; }
|
||||
}
|
||||
|
||||
public async Task Execute(CancellationToken cancellationToken, IProgress<double> progress)
|
||||
public async Task Run(IProgress<double> progress, CancellationToken cancellationToken)
|
||||
{
|
||||
// Ensure these objects are lazy loaded.
|
||||
// Without this there is a deadlock that will need to be investigated
|
||||
|
||||
@@ -371,7 +371,7 @@ namespace Emby.Server.Implementations.Library
|
||||
var tuple = GetProvider(request.OpenToken);
|
||||
var provider = tuple.Item1;
|
||||
|
||||
var mediaSourceTuple = await provider.OpenMediaSource(tuple.Item2, cancellationToken).ConfigureAwait(false);
|
||||
var mediaSourceTuple = await provider.OpenMediaSource(tuple.Item2, request.AllowMediaProbe, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
var mediaSource = mediaSourceTuple.Item1;
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace Emby.Server.Implementations.LiveTv
|
||||
return list;
|
||||
}
|
||||
|
||||
public async Task<Tuple<MediaSourceInfo, IDirectStreamProvider>> OpenMediaSource(string openToken, CancellationToken cancellationToken)
|
||||
public async Task<Tuple<MediaSourceInfo, IDirectStreamProvider>> OpenMediaSource(string openToken, bool allowLiveStreamProbe, CancellationToken cancellationToken)
|
||||
{
|
||||
MediaSourceInfo stream = null;
|
||||
const bool isAudio = false;
|
||||
@@ -140,7 +140,7 @@ namespace Emby.Server.Implementations.LiveTv
|
||||
|
||||
try
|
||||
{
|
||||
if (!stream.SupportsProbing || stream.MediaStreams.Any(i => i.Index != -1))
|
||||
if (!allowLiveStreamProbe || !stream.SupportsProbing || stream.MediaStreams.Any(i => i.Index != -1))
|
||||
{
|
||||
AddMediaInfo(stream, isAudio, cancellationToken);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user