aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/LiveTv
diff options
context:
space:
mode:
authorPatrick Barron <barronpm@gmail.com>2023-12-28 14:34:44 -0500
committerPatrick Barron <barronpm@gmail.com>2024-01-09 09:47:07 -0500
commit051fa04a803068b5fe8c86e1f991e85a9fbc4d04 (patch)
tree481e12808834257daf466d0f4fa913c39a2ffb86 /Emby.Server.Implementations/LiveTv
parent2f1b7d0988520d9341692f235b8adf1e4e10ebd7 (diff)
Move GetRecordingStreamMediaSources to IMediaSourceManager
Diffstat (limited to 'Emby.Server.Implementations/LiveTv')
-rw-r--r--Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs32
-rw-r--r--Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs2
2 files changed, 1 insertions, 33 deletions
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
index abe3ff349f..e2e0dfb2bb 100644
--- a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
@@ -47,7 +47,6 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
private const int TunerDiscoveryDurationMs = 3000;
- private readonly IServerApplicationHost _appHost;
private readonly ILogger<EmbyTV> _logger;
private readonly IHttpClientFactory _httpClientFactory;
private readonly IServerConfigurationManager _config;
@@ -76,7 +75,6 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
private bool _disposed;
public EmbyTV(
- IServerApplicationHost appHost,
IStreamHelper streamHelper,
IMediaSourceManager mediaSourceManager,
ILogger<EmbyTV> logger,
@@ -91,7 +89,6 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
{
Current = this;
- _appHost = appHost;
_logger = logger;
_httpClientFactory = httpClientFactory;
_config = config;
@@ -1021,35 +1018,6 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
throw new NotImplementedException();
}
- public async Task<List<MediaSourceInfo>> GetRecordingStreamMediaSources(ActiveRecordingInfo info, CancellationToken cancellationToken)
- {
- var stream = new MediaSourceInfo
- {
- EncoderPath = _appHost.GetApiUrlForLocalAccess() + "/LiveTv/LiveRecordings/" + info.Id + "/stream",
- EncoderProtocol = MediaProtocol.Http,
- Path = info.Path,
- Protocol = MediaProtocol.File,
- Id = info.Id,
- SupportsDirectPlay = false,
- SupportsDirectStream = true,
- SupportsTranscoding = true,
- IsInfiniteStream = true,
- RequiresOpening = false,
- RequiresClosing = false,
- BufferMs = 0,
- IgnoreDts = true,
- IgnoreIndex = true
- };
-
- await new LiveStreamHelper(_mediaEncoder, _logger, _config.CommonApplicationPaths)
- .AddMediaInfoWithProbe(stream, false, false, cancellationToken).ConfigureAwait(false);
-
- return new List<MediaSourceInfo>
- {
- stream
- };
- }
-
public Task CloseLiveStream(string id, CancellationToken cancellationToken)
{
return Task.CompletedTask;
diff --git a/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs b/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs
index 6a92fc5997..a5a1a4a4c5 100644
--- a/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs
+++ b/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs
@@ -61,7 +61,7 @@ namespace Emby.Server.Implementations.LiveTv
{
if (activeRecordingInfo is not null)
{
- sources = await EmbyTV.EmbyTV.Current.GetRecordingStreamMediaSources(activeRecordingInfo, cancellationToken)
+ sources = await _mediaSourceManager.GetRecordingStreamMediaSources(activeRecordingInfo, cancellationToken)
.ConfigureAwait(false);
}
else