mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Rename EmbyTV to DefaultLiveTvService
This commit is contained in:
parent
fa6d859a51
commit
cac7ff84ca
@ -6,7 +6,6 @@ using System.Net.Mime;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using Emby.Server.Implementations.EntryPoints;
|
using Emby.Server.Implementations.EntryPoints;
|
||||||
using Jellyfin.Api.Middleware;
|
using Jellyfin.Api.Middleware;
|
||||||
using Jellyfin.LiveTv.EmbyTV;
|
|
||||||
using Jellyfin.LiveTv.Extensions;
|
using Jellyfin.LiveTv.Extensions;
|
||||||
using Jellyfin.LiveTv.Recordings;
|
using Jellyfin.LiveTv.Recordings;
|
||||||
using Jellyfin.MediaEncoding.Hls.Extensions;
|
using Jellyfin.MediaEncoding.Hls.Extensions;
|
||||||
|
@ -24,13 +24,13 @@ using MediaBrowser.Model.Dto;
|
|||||||
using MediaBrowser.Model.LiveTv;
|
using MediaBrowser.Model.LiveTv;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace Jellyfin.LiveTv.EmbyTV
|
namespace Jellyfin.LiveTv
|
||||||
{
|
{
|
||||||
public sealed class EmbyTV : ILiveTvService, ISupportsDirectStreamProvider, ISupportsNewTimerIds
|
public sealed class DefaultLiveTvService : ILiveTvService, ISupportsDirectStreamProvider, ISupportsNewTimerIds
|
||||||
{
|
{
|
||||||
public const string ServiceName = "Emby";
|
public const string ServiceName = "Emby";
|
||||||
|
|
||||||
private readonly ILogger<EmbyTV> _logger;
|
private readonly ILogger<DefaultLiveTvService> _logger;
|
||||||
private readonly IServerConfigurationManager _config;
|
private readonly IServerConfigurationManager _config;
|
||||||
private readonly ITunerHostManager _tunerHostManager;
|
private readonly ITunerHostManager _tunerHostManager;
|
||||||
private readonly IListingsManager _listingsManager;
|
private readonly IListingsManager _listingsManager;
|
||||||
@ -40,8 +40,8 @@ namespace Jellyfin.LiveTv.EmbyTV
|
|||||||
private readonly TimerManager _timerManager;
|
private readonly TimerManager _timerManager;
|
||||||
private readonly SeriesTimerManager _seriesTimerManager;
|
private readonly SeriesTimerManager _seriesTimerManager;
|
||||||
|
|
||||||
public EmbyTV(
|
public DefaultLiveTvService(
|
||||||
ILogger<EmbyTV> logger,
|
ILogger<DefaultLiveTvService> logger,
|
||||||
IServerConfigurationManager config,
|
IServerConfigurationManager config,
|
||||||
ITunerHostManager tunerHostManager,
|
ITunerHostManager tunerHostManager,
|
||||||
IListingsManager listingsManager,
|
IListingsManager listingsManager,
|
@ -37,7 +37,7 @@ public static class LiveTvServiceCollectionExtensions
|
|||||||
services.AddSingleton<IGuideManager, GuideManager>();
|
services.AddSingleton<IGuideManager, GuideManager>();
|
||||||
services.AddSingleton<IRecordingsManager, RecordingsManager>();
|
services.AddSingleton<IRecordingsManager, RecordingsManager>();
|
||||||
|
|
||||||
services.AddSingleton<ILiveTvService, EmbyTV.EmbyTV>();
|
services.AddSingleton<ILiveTvService, DefaultLiveTvService>();
|
||||||
services.AddSingleton<ITunerHost, HdHomerunHost>();
|
services.AddSingleton<ITunerHost, HdHomerunHost>();
|
||||||
services.AddSingleton<ITunerHost, M3UTunerHost>();
|
services.AddSingleton<ITunerHost, M3UTunerHost>();
|
||||||
services.AddSingleton<IListingsProvider, SchedulesDirect>();
|
services.AddSingleton<IListingsProvider, SchedulesDirect>();
|
||||||
|
@ -141,7 +141,7 @@ public class GuideManager : IGuideManager
|
|||||||
CleanDatabase(newProgramIdList.ToArray(), [BaseItemKind.LiveTvProgram], progress, cancellationToken);
|
CleanDatabase(newProgramIdList.ToArray(), [BaseItemKind.LiveTvProgram], progress, cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
var coreService = _liveTvManager.Services.OfType<EmbyTV.EmbyTV>().FirstOrDefault();
|
var coreService = _liveTvManager.Services.OfType<DefaultLiveTvService>().FirstOrDefault();
|
||||||
if (coreService is not null)
|
if (coreService is not null)
|
||||||
{
|
{
|
||||||
await coreService.RefreshSeriesTimers(cancellationToken).ConfigureAwait(false);
|
await coreService.RefreshSeriesTimers(cancellationToken).ConfigureAwait(false);
|
||||||
|
@ -72,7 +72,7 @@ namespace Jellyfin.LiveTv
|
|||||||
_recordingsManager = recordingsManager;
|
_recordingsManager = recordingsManager;
|
||||||
_services = services.ToArray();
|
_services = services.ToArray();
|
||||||
|
|
||||||
var defaultService = _services.OfType<EmbyTV.EmbyTV>().First();
|
var defaultService = _services.OfType<DefaultLiveTvService>().First();
|
||||||
defaultService.TimerCreated += OnEmbyTvTimerCreated;
|
defaultService.TimerCreated += OnEmbyTvTimerCreated;
|
||||||
defaultService.TimerCancelled += OnEmbyTvTimerCancelled;
|
defaultService.TimerCancelled += OnEmbyTvTimerCancelled;
|
||||||
}
|
}
|
||||||
@ -340,7 +340,7 @@ namespace Jellyfin.LiveTv
|
|||||||
// Set the total bitrate if not already supplied
|
// Set the total bitrate if not already supplied
|
||||||
mediaSource.InferTotalBitrate();
|
mediaSource.InferTotalBitrate();
|
||||||
|
|
||||||
if (service is not EmbyTV.EmbyTV)
|
if (service is not DefaultLiveTvService)
|
||||||
{
|
{
|
||||||
// We can't trust that we'll be able to direct stream it through emby server, no matter what the provider says
|
// We can't trust that we'll be able to direct stream it through emby server, no matter what the provider says
|
||||||
// mediaSource.SupportsDirectPlay = false;
|
// mediaSource.SupportsDirectPlay = false;
|
||||||
@ -769,7 +769,7 @@ namespace Jellyfin.LiveTv
|
|||||||
|
|
||||||
var channel = string.IsNullOrWhiteSpace(info.ChannelId)
|
var channel = string.IsNullOrWhiteSpace(info.ChannelId)
|
||||||
? null
|
? null
|
||||||
: _libraryManager.GetItemById(_tvDtoService.GetInternalChannelId(EmbyTV.EmbyTV.ServiceName, info.ChannelId));
|
: _libraryManager.GetItemById(_tvDtoService.GetInternalChannelId(DefaultLiveTvService.ServiceName, info.ChannelId));
|
||||||
|
|
||||||
dto.SeriesTimerId = string.IsNullOrEmpty(info.SeriesTimerId)
|
dto.SeriesTimerId = string.IsNullOrEmpty(info.SeriesTimerId)
|
||||||
? null
|
? null
|
||||||
@ -1005,7 +1005,7 @@ namespace Jellyfin.LiveTv
|
|||||||
|
|
||||||
await service.CancelTimerAsync(timer.ExternalId, CancellationToken.None).ConfigureAwait(false);
|
await service.CancelTimerAsync(timer.ExternalId, CancellationToken.None).ConfigureAwait(false);
|
||||||
|
|
||||||
if (service is not EmbyTV.EmbyTV)
|
if (service is not DefaultLiveTvService)
|
||||||
{
|
{
|
||||||
TimerCancelled?.Invoke(this, new GenericEventArgs<TimerEventInfo>(new TimerEventInfo(id)));
|
TimerCancelled?.Invoke(this, new GenericEventArgs<TimerEventInfo>(new TimerEventInfo(id)));
|
||||||
}
|
}
|
||||||
@ -1314,7 +1314,7 @@ namespace Jellyfin.LiveTv
|
|||||||
|
|
||||||
_logger.LogInformation("New recording scheduled");
|
_logger.LogInformation("New recording scheduled");
|
||||||
|
|
||||||
if (service is not EmbyTV.EmbyTV)
|
if (service is not DefaultLiveTvService)
|
||||||
{
|
{
|
||||||
TimerCreated?.Invoke(this, new GenericEventArgs<TimerEventInfo>(
|
TimerCreated?.Invoke(this, new GenericEventArgs<TimerEventInfo>(
|
||||||
new TimerEventInfo(newTimerId)
|
new TimerEventInfo(newTimerId)
|
||||||
|
@ -11,7 +11,6 @@ using System.Threading.Tasks;
|
|||||||
using AsyncKeyedLock;
|
using AsyncKeyedLock;
|
||||||
using Jellyfin.Data.Enums;
|
using Jellyfin.Data.Enums;
|
||||||
using Jellyfin.LiveTv.Configuration;
|
using Jellyfin.LiveTv.Configuration;
|
||||||
using Jellyfin.LiveTv.EmbyTV;
|
|
||||||
using Jellyfin.LiveTv.IO;
|
using Jellyfin.LiveTv.IO;
|
||||||
using Jellyfin.LiveTv.Timers;
|
using Jellyfin.LiveTv.Timers;
|
||||||
using MediaBrowser.Common.Configuration;
|
using MediaBrowser.Common.Configuration;
|
||||||
|
@ -9,7 +9,6 @@ using System.Xml;
|
|||||||
using Jellyfin.Data.Enums;
|
using Jellyfin.Data.Enums;
|
||||||
using Jellyfin.Extensions;
|
using Jellyfin.Extensions;
|
||||||
using Jellyfin.LiveTv.Configuration;
|
using Jellyfin.LiveTv.Configuration;
|
||||||
using Jellyfin.LiveTv.EmbyTV;
|
|
||||||
using MediaBrowser.Common.Configuration;
|
using MediaBrowser.Common.Configuration;
|
||||||
using MediaBrowser.Common.Extensions;
|
using MediaBrowser.Common.Extensions;
|
||||||
using MediaBrowser.Controller.Dto;
|
using MediaBrowser.Controller.Dto;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user