|
|
|
@ -23,10 +23,6 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
|
|
|
|
|
{
|
|
|
|
|
public abstract class BaseTunerHost
|
|
|
|
|
{
|
|
|
|
|
protected readonly IServerConfigurationManager Config;
|
|
|
|
|
protected readonly ILogger<BaseTunerHost> Logger;
|
|
|
|
|
protected readonly IFileSystem FileSystem;
|
|
|
|
|
|
|
|
|
|
private readonly IMemoryCache _memoryCache;
|
|
|
|
|
|
|
|
|
|
protected BaseTunerHost(IServerConfigurationManager config, ILogger<BaseTunerHost> logger, IFileSystem fileSystem, IMemoryCache memoryCache)
|
|
|
|
@ -37,12 +33,20 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
|
|
|
|
|
FileSystem = fileSystem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public virtual bool IsSupported => true;
|
|
|
|
|
protected IServerConfigurationManager Config { get; }
|
|
|
|
|
|
|
|
|
|
protected abstract Task<List<ChannelInfo>> GetChannelsInternal(TunerHostInfo tuner, CancellationToken cancellationToken);
|
|
|
|
|
protected ILogger<BaseTunerHost> Logger { get; }
|
|
|
|
|
|
|
|
|
|
protected IFileSystem FileSystem { get; }
|
|
|
|
|
|
|
|
|
|
public virtual bool IsSupported => true;
|
|
|
|
|
|
|
|
|
|
public abstract string Type { get; }
|
|
|
|
|
|
|
|
|
|
protected virtual string ChannelIdPrefix => Type + "_";
|
|
|
|
|
|
|
|
|
|
protected abstract Task<List<ChannelInfo>> GetChannelsInternal(TunerHostInfo tuner, CancellationToken cancellationToken);
|
|
|
|
|
|
|
|
|
|
public async Task<List<ChannelInfo>> GetChannels(TunerHostInfo tuner, bool enableCache, CancellationToken cancellationToken)
|
|
|
|
|
{
|
|
|
|
|
var key = tuner.Id;
|
|
|
|
@ -217,8 +221,6 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
|
|
|
|
|
throw new LiveTvConflictException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected virtual string ChannelIdPrefix => Type + "_";
|
|
|
|
|
|
|
|
|
|
protected virtual bool IsValidChannelId(string channelId)
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrEmpty(channelId))
|
|
|
|
|