Move LiveTv to separate project

This commit is contained in:
Patrick Barron 2023-12-28 15:15:03 -05:00
parent 7eba162879
commit c1a3084312
78 changed files with 121 additions and 85 deletions

View File

@ -25,7 +25,6 @@ using Emby.Server.Implementations.Dto;
using Emby.Server.Implementations.HttpServer.Security; using Emby.Server.Implementations.HttpServer.Security;
using Emby.Server.Implementations.IO; using Emby.Server.Implementations.IO;
using Emby.Server.Implementations.Library; using Emby.Server.Implementations.Library;
using Emby.Server.Implementations.LiveTv;
using Emby.Server.Implementations.Localization; using Emby.Server.Implementations.Localization;
using Emby.Server.Implementations.Playlists; using Emby.Server.Implementations.Playlists;
using Emby.Server.Implementations.Plugins; using Emby.Server.Implementations.Plugins;
@ -567,9 +566,6 @@ namespace Emby.Server.Implementations
serviceCollection.AddSingleton<ISyncPlayManager, SyncPlayManager>(); serviceCollection.AddSingleton<ISyncPlayManager, SyncPlayManager>();
serviceCollection.AddSingleton<LiveTvDtoService>();
serviceCollection.AddSingleton<ILiveTvManager, LiveTvManager>();
serviceCollection.AddSingleton<IUserViewManager, UserViewManager>(); serviceCollection.AddSingleton<IUserViewManager, UserViewManager>();
serviceCollection.AddSingleton<IChapterManager, ChapterManager>(); serviceCollection.AddSingleton<IChapterManager, ChapterManager>();

View File

@ -22,7 +22,6 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="DiscUtils.Udf" /> <PackageReference Include="DiscUtils.Udf" />
<PackageReference Include="Jellyfin.XmlTv" />
<PackageReference Include="Microsoft.Data.Sqlite" /> <PackageReference Include="Microsoft.Data.Sqlite" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" /> <PackageReference Include="Microsoft.Extensions.Caching.Memory" />

View File

@ -17,7 +17,6 @@ using System.Runtime.InteropServices;
[assembly: NeutralResourcesLanguage("en")] [assembly: NeutralResourcesLanguage("en")]
[assembly: InternalsVisibleTo("Jellyfin.Server.Implementations.Tests")] [assembly: InternalsVisibleTo("Jellyfin.Server.Implementations.Tests")]
[assembly: InternalsVisibleTo("Emby.Server.Implementations.Fuzz")] [assembly: InternalsVisibleTo("Emby.Server.Implementations.Fuzz")]
[assembly: InternalsVisibleTo("Jellyfin.LiveTv.Tests")]
// Setting ComVisible to false makes the types in this assembly not visible // Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from // to COM components. If you need to access a type in this assembly from

View File

@ -6,6 +6,7 @@ using Emby.Server.Implementations.Session;
using Jellyfin.Api.WebSocketListeners; using Jellyfin.Api.WebSocketListeners;
using Jellyfin.Drawing; using Jellyfin.Drawing;
using Jellyfin.Drawing.Skia; using Jellyfin.Drawing.Skia;
using Jellyfin.LiveTv;
using Jellyfin.Server.Implementations; using Jellyfin.Server.Implementations;
using Jellyfin.Server.Implementations.Activity; using Jellyfin.Server.Implementations.Activity;
using Jellyfin.Server.Implementations.Devices; using Jellyfin.Server.Implementations.Devices;
@ -20,6 +21,7 @@ using MediaBrowser.Controller.Devices;
using MediaBrowser.Controller.Drawing; using MediaBrowser.Controller.Drawing;
using MediaBrowser.Controller.Events; using MediaBrowser.Controller.Events;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.LiveTv;
using MediaBrowser.Controller.Lyrics; using MediaBrowser.Controller.Lyrics;
using MediaBrowser.Controller.Net; using MediaBrowser.Controller.Net;
using MediaBrowser.Controller.Security; using MediaBrowser.Controller.Security;
@ -96,6 +98,9 @@ namespace Jellyfin.Server
serviceCollection.AddScoped<IAuthenticationManager, AuthenticationManager>(); serviceCollection.AddScoped<IAuthenticationManager, AuthenticationManager>();
serviceCollection.AddSingleton<LiveTvDtoService>();
serviceCollection.AddSingleton<ILiveTvManager, LiveTvManager>();
foreach (var type in GetExportTypes<ILyricProvider>()) foreach (var type in GetExportTypes<ILyricProvider>())
{ {
serviceCollection.AddSingleton(typeof(ILyricProvider), type); serviceCollection.AddSingleton(typeof(ILyricProvider), type);
@ -117,6 +122,9 @@ namespace Jellyfin.Server
// Jellyfin.Server.Implementations // Jellyfin.Server.Implementations
yield return typeof(JellyfinDbContext).Assembly; yield return typeof(JellyfinDbContext).Assembly;
// Jellyfin.LiveTv
yield return typeof(LiveTvManager).Assembly;
} }
} }
} }

View File

@ -58,6 +58,7 @@
<ProjectReference Include="..\src\Jellyfin.Drawing\Jellyfin.Drawing.csproj" /> <ProjectReference Include="..\src\Jellyfin.Drawing\Jellyfin.Drawing.csproj" />
<ProjectReference Include="..\Emby.Server.Implementations\Emby.Server.Implementations.csproj" /> <ProjectReference Include="..\Emby.Server.Implementations\Emby.Server.Implementations.csproj" />
<ProjectReference Include="..\src\Jellyfin.Drawing.Skia\Jellyfin.Drawing.Skia.csproj" /> <ProjectReference Include="..\src\Jellyfin.Drawing.Skia\Jellyfin.Drawing.Skia.csproj" />
<ProjectReference Include="..\src\Jellyfin.LiveTv\Jellyfin.LiveTv.csproj" />
<ProjectReference Include="..\Jellyfin.Server.Implementations\Jellyfin.Server.Implementations.csproj" /> <ProjectReference Include="..\Jellyfin.Server.Implementations\Jellyfin.Server.Implementations.csproj" />
<ProjectReference Include="..\src\Jellyfin.MediaEncoding.Hls\Jellyfin.MediaEncoding.Hls.csproj" /> <ProjectReference Include="..\src\Jellyfin.MediaEncoding.Hls\Jellyfin.MediaEncoding.Hls.csproj" />
</ItemGroup> </ItemGroup>

View File

@ -89,6 +89,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.MediaEncoding.Keyf
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.LiveTv.Tests", "tests\Jellyfin.LiveTv.Tests\Jellyfin.LiveTv.Tests.csproj", "{C4F71272-C6BE-4C30-BE0D-4E6ED651D6D3}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.LiveTv.Tests", "tests\Jellyfin.LiveTv.Tests\Jellyfin.LiveTv.Tests.csproj", "{C4F71272-C6BE-4C30-BE0D-4E6ED651D6D3}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.LiveTv", "src\Jellyfin.LiveTv\Jellyfin.LiveTv.csproj", "{8C6B2B13-58A4-4506-9DAB-1F882A093FE0}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -239,6 +241,10 @@ Global
{C4F71272-C6BE-4C30-BE0D-4E6ED651D6D3}.Debug|Any CPU.Build.0 = Debug|Any CPU {C4F71272-C6BE-4C30-BE0D-4E6ED651D6D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C4F71272-C6BE-4C30-BE0D-4E6ED651D6D3}.Release|Any CPU.ActiveCfg = Release|Any CPU {C4F71272-C6BE-4C30-BE0D-4E6ED651D6D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C4F71272-C6BE-4C30-BE0D-4E6ED651D6D3}.Release|Any CPU.Build.0 = Release|Any CPU {C4F71272-C6BE-4C30-BE0D-4E6ED651D6D3}.Release|Any CPU.Build.0 = Release|Any CPU
{8C6B2B13-58A4-4506-9DAB-1F882A093FE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8C6B2B13-58A4-4506-9DAB-1F882A093FE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8C6B2B13-58A4-4506-9DAB-1F882A093FE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8C6B2B13-58A4-4506-9DAB-1F882A093FE0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -266,6 +272,7 @@ Global
{154872D9-6C12-4007-96E3-8F70A58386CE} = {C9F0AB5D-F4D7-40C8-A353-3305C86D6D4C} {154872D9-6C12-4007-96E3-8F70A58386CE} = {C9F0AB5D-F4D7-40C8-A353-3305C86D6D4C}
{0A3FCC4D-C714-4072-B90F-E374A15F9FF9} = {C9F0AB5D-F4D7-40C8-A353-3305C86D6D4C} {0A3FCC4D-C714-4072-B90F-E374A15F9FF9} = {C9F0AB5D-F4D7-40C8-A353-3305C86D6D4C}
{C4F71272-C6BE-4C30-BE0D-4E6ED651D6D3} = {FBBB5129-006E-4AD7-BAD5-8B7CA1D10ED6} {C4F71272-C6BE-4C30-BE0D-4E6ED651D6D3} = {FBBB5129-006E-4AD7-BAD5-8B7CA1D10ED6}
{8C6B2B13-58A4-4506-9DAB-1F882A093FE0} = {C9F0AB5D-F4D7-40C8-A353-3305C86D6D4C}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3448830C-EBDC-426C-85CD-7BBB9651A7FE} SolutionGuid = {3448830C-EBDC-426C-85CD-7BBB9651A7FE}

View File

@ -5,7 +5,6 @@ using System.IO;
using System.Net.Http; using System.Net.Http;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Jellyfin.Api.Helpers;
using MediaBrowser.Common.Net; using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Streaming; using MediaBrowser.Controller.Streaming;
@ -13,7 +12,7 @@ using MediaBrowser.Model.Dto;
using MediaBrowser.Model.IO; using MediaBrowser.Model.IO;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.LiveTv.EmbyTV namespace Jellyfin.LiveTv.EmbyTV
{ {
public sealed class DirectRecorder : IRecorder public sealed class DirectRecorder : IRecorder
{ {

View File

@ -14,14 +14,12 @@ using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Xml; using System.Xml;
using Emby.Server.Implementations.Library;
using Jellyfin.Data.Enums; using Jellyfin.Data.Enums;
using Jellyfin.Data.Events; using Jellyfin.Data.Events;
using Jellyfin.Extensions; using Jellyfin.Extensions;
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Extensions; using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.Progress; using MediaBrowser.Common.Progress;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;
@ -39,7 +37,7 @@ using MediaBrowser.Model.MediaInfo;
using MediaBrowser.Model.Providers; using MediaBrowser.Model.Providers;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.LiveTv.EmbyTV namespace Jellyfin.LiveTv.EmbyTV
{ {
public sealed class EmbyTV : ILiveTvService, ISupportsDirectStreamProvider, ISupportsNewTimerIds, IDisposable public sealed class EmbyTV : ILiveTvService, ISupportsDirectStreamProvider, ISupportsNewTimerIds, IDisposable
{ {

View File

@ -23,7 +23,7 @@ using MediaBrowser.Model.Dto;
using MediaBrowser.Model.IO; using MediaBrowser.Model.IO;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.LiveTv.EmbyTV namespace Jellyfin.LiveTv.EmbyTV
{ {
public class EncodedRecorder : IRecorder public class EncodedRecorder : IRecorder
{ {

View File

@ -3,7 +3,7 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using MediaBrowser.Controller.Plugins; using MediaBrowser.Controller.Plugins;
namespace Emby.Server.Implementations.LiveTv.EmbyTV namespace Jellyfin.LiveTv.EmbyTV
{ {
public sealed class EntryPoint : IServerEntryPoint public sealed class EntryPoint : IServerEntryPoint
{ {

View File

@ -4,7 +4,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using MediaBrowser.Controller.LiveTv; using MediaBrowser.Controller.LiveTv;
namespace Emby.Server.Implementations.LiveTv.EmbyTV namespace Jellyfin.LiveTv.EmbyTV
{ {
internal class EpgChannelData internal class EpgChannelData
{ {

View File

@ -6,7 +6,7 @@ using System.Threading.Tasks;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Dto; using MediaBrowser.Model.Dto;
namespace Emby.Server.Implementations.LiveTv.EmbyTV namespace Jellyfin.LiveTv.EmbyTV
{ {
public interface IRecorder : IDisposable public interface IRecorder : IDisposable
{ {

View File

@ -9,7 +9,7 @@ using System.Text.Json;
using Jellyfin.Extensions.Json; using Jellyfin.Extensions.Json;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.LiveTv.EmbyTV namespace Jellyfin.LiveTv.EmbyTV
{ {
public class ItemDataProvider<T> public class ItemDataProvider<T>
where T : class where T : class

View File

@ -1,7 +1,7 @@
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Configuration;
namespace Emby.Server.Implementations.LiveTv.EmbyTV namespace Jellyfin.LiveTv.EmbyTV
{ {
/// <summary> /// <summary>
/// Class containing extension methods for working with the nfo configuration. /// Class containing extension methods for working with the nfo configuration.

View File

@ -5,7 +5,7 @@ using System.Globalization;
using System.Text; using System.Text;
using MediaBrowser.Controller.LiveTv; using MediaBrowser.Controller.LiveTv;
namespace Emby.Server.Implementations.LiveTv.EmbyTV namespace Jellyfin.LiveTv.EmbyTV
{ {
internal static class RecordingHelper internal static class RecordingHelper
{ {

View File

@ -4,7 +4,7 @@ using System;
using MediaBrowser.Controller.LiveTv; using MediaBrowser.Controller.LiveTv;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.LiveTv.EmbyTV namespace Jellyfin.LiveTv.EmbyTV
{ {
public class SeriesTimerManager : ItemDataProvider<SeriesTimerInfo> public class SeriesTimerManager : ItemDataProvider<SeriesTimerInfo>
{ {

View File

@ -10,7 +10,7 @@ using MediaBrowser.Controller.LiveTv;
using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.LiveTv;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.LiveTv.EmbyTV namespace Jellyfin.LiveTv.EmbyTV
{ {
public class TimerManager : ItemDataProvider<TimerInfo> public class TimerManager : ItemDataProvider<TimerInfo>
{ {

View File

@ -1,5 +1,6 @@
#nullable disable #nullable disable
#pragma warning disable CA1711
#pragma warning disable CS1591 #pragma warning disable CS1591
using System; using System;
@ -10,7 +11,7 @@ using System.Threading.Tasks;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Dto; using MediaBrowser.Model.Dto;
namespace Emby.Server.Implementations.Library namespace Jellyfin.LiveTv
{ {
public sealed class ExclusiveLiveStream : ILiveStream public sealed class ExclusiveLiveStream : ILiveStream
{ {

View File

@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
<_Parameter1>Jellyfin.LiveTv.Tests</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Jellyfin.XmlTv" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\MediaBrowser.Model\MediaBrowser.Model.csproj" />
<ProjectReference Include="..\..\MediaBrowser.Controller\MediaBrowser.Controller.csproj" />
<ProjectReference Include="..\..\MediaBrowser.Common\MediaBrowser.Common.csproj" />
</ItemGroup>
</Project>

View File

@ -16,9 +16,9 @@ using System.Text;
using System.Text.Json; using System.Text.Json;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos;
using Jellyfin.Extensions; using Jellyfin.Extensions;
using Jellyfin.Extensions.Json; using Jellyfin.Extensions.Json;
using Jellyfin.LiveTv.Listings.SchedulesDirectDtos;
using MediaBrowser.Common.Net; using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Authentication; using MediaBrowser.Controller.Authentication;
using MediaBrowser.Controller.LiveTv; using MediaBrowser.Controller.LiveTv;
@ -27,7 +27,7 @@ using MediaBrowser.Model.Entities;
using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.LiveTv;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.LiveTv.Listings namespace Jellyfin.LiveTv.Listings
{ {
public class SchedulesDirect : IListingsProvider, IDisposable public class SchedulesDirect : IListingsProvider, IDisposable
{ {
@ -613,6 +613,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
// Response is automatically disposed in the calling function, // Response is automatically disposed in the calling function,
// so dispose manually if not returning. // so dispose manually if not returning.
#pragma warning disable IDISP016, IDISP017
response.Dispose(); response.Dispose();
if (!enableRetry || (int)response.StatusCode >= 500) if (!enableRetry || (int)response.StatusCode >= 500)
{ {
@ -621,6 +622,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
null, null,
response.StatusCode); response.StatusCode);
} }
#pragma warning restore IDISP016, IDISP017
_tokens.Clear(); _tokens.Clear();
options.Headers.TryAddWithoutValidation("token", await GetToken(providerInfo, cancellationToken).ConfigureAwait(false)); options.Headers.TryAddWithoutValidation("token", await GetToken(providerInfo, cancellationToken).ConfigureAwait(false));

View File

@ -1,6 +1,6 @@
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Broadcaster dto. /// Broadcaster dto.

View File

@ -1,6 +1,6 @@
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Caption dto. /// Caption dto.

View File

@ -1,6 +1,6 @@
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Cast dto. /// Cast dto.

View File

@ -2,7 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Channel dto. /// Channel dto.

View File

@ -1,6 +1,6 @@
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Content rating dto. /// Content rating dto.

View File

@ -1,6 +1,6 @@
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Crew dto. /// Crew dto.

View File

@ -2,7 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Day dto. /// Day dto.

View File

@ -1,6 +1,6 @@
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Description 1_000 dto. /// Description 1_000 dto.

View File

@ -1,6 +1,6 @@
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Description 100 dto. /// Description 100 dto.

View File

@ -2,7 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Descriptions program dto. /// Descriptions program dto.

View File

@ -1,6 +1,6 @@
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Event details dto. /// Event details dto.

View File

@ -1,6 +1,6 @@
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Gracenote dto. /// Gracenote dto.

View File

@ -2,7 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Headends dto. /// Headends dto.

View File

@ -1,6 +1,6 @@
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Image data dto. /// Image data dto.

View File

@ -1,6 +1,6 @@
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// The lineup dto. /// The lineup dto.

View File

@ -2,7 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Lineups dto. /// Lineups dto.

View File

@ -1,6 +1,6 @@
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Logo dto. /// Logo dto.

View File

@ -1,6 +1,6 @@
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Map dto. /// Map dto.

View File

@ -1,6 +1,6 @@
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Metadata dto. /// Metadata dto.

View File

@ -1,6 +1,6 @@
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Metadata programs dto. /// Metadata programs dto.

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Metadata schedule dto. /// Metadata schedule dto.

View File

@ -2,7 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Movie dto. /// Movie dto.

View File

@ -1,6 +1,6 @@
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Multipart dto. /// Multipart dto.

View File

@ -2,7 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Program details dto. /// Program details dto.

View File

@ -2,7 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Program dto. /// Program dto.

View File

@ -1,6 +1,6 @@
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Quality rating dto. /// Quality rating dto.

View File

@ -1,6 +1,6 @@
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Rating dto. /// Rating dto.

View File

@ -1,6 +1,6 @@
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Recommendation dto. /// Recommendation dto.

View File

@ -2,7 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Request schedule for channel dto. /// Request schedule for channel dto.

View File

@ -2,7 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Show image dto. /// Show image dto.

View File

@ -2,7 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Station dto. /// Station dto.

View File

@ -1,6 +1,6 @@
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// Title dto. /// Title dto.

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos namespace Jellyfin.LiveTv.Listings.SchedulesDirectDtos
{ {
/// <summary> /// <summary>
/// The token dto. /// The token dto.

View File

@ -23,7 +23,7 @@ using MediaBrowser.Model.IO;
using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.LiveTv;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.LiveTv.Listings namespace Jellyfin.LiveTv.Listings
{ {
public class XmlTvListingsProvider : IListingsProvider public class XmlTvListingsProvider : IListingsProvider
{ {

View File

@ -2,7 +2,7 @@ using System.Collections.Generic;
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.LiveTv;
namespace Emby.Server.Implementations.LiveTv namespace Jellyfin.LiveTv
{ {
/// <summary> /// <summary>
/// <see cref="IConfigurationFactory" /> implementation for <see cref="LiveTvOptions" />. /// <see cref="IConfigurationFactory" /> implementation for <see cref="LiveTvOptions" />.

View File

@ -20,7 +20,7 @@ using MediaBrowser.Model.Entities;
using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.LiveTv;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.LiveTv namespace Jellyfin.LiveTv
{ {
public class LiveTvDtoService public class LiveTvDtoService
{ {

View File

@ -9,7 +9,6 @@ using System.Linq;
using System.Text.Json; using System.Text.Json;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Emby.Server.Implementations.Library;
using Jellyfin.Data.Entities; using Jellyfin.Data.Entities;
using Jellyfin.Data.Enums; using Jellyfin.Data.Enums;
using Jellyfin.Data.Events; using Jellyfin.Data.Events;
@ -34,7 +33,7 @@ using MediaBrowser.Model.Querying;
using MediaBrowser.Model.Tasks; using MediaBrowser.Model.Tasks;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.LiveTv namespace Jellyfin.LiveTv
{ {
/// <summary> /// <summary>
/// Class LiveTvManager. /// Class LiveTvManager.
@ -231,7 +230,9 @@ namespace Emby.Server.Implementations.LiveTv
_logger.LogInformation("Opening channel stream from {0}, external channel Id: {1}", service.Name, channel.ExternalId); _logger.LogInformation("Opening channel stream from {0}, external channel Id: {1}", service.Name, channel.ExternalId);
MediaSourceInfo info; MediaSourceInfo info;
#pragma warning disable CA1859 // TODO: Analyzer bug?
ILiveStream liveStream; ILiveStream liveStream;
#pragma warning restore CA1859
if (service is ISupportsDirectStreamProvider supportsManagedStream) if (service is ISupportsDirectStreamProvider supportsManagedStream)
{ {
liveStream = await supportsManagedStream.GetChannelStreamWithDirectStreamProvider(channel.ExternalId, mediaSourceId, currentLiveStreams, cancellationToken).ConfigureAwait(false); liveStream = await supportsManagedStream.GetChannelStreamWithDirectStreamProvider(channel.ExternalId, mediaSourceId, currentLiveStreams, cancellationToken).ConfigureAwait(false);

View File

@ -16,7 +16,7 @@ using MediaBrowser.Model.Dto;
using MediaBrowser.Model.MediaInfo; using MediaBrowser.Model.MediaInfo;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.LiveTv namespace Jellyfin.LiveTv
{ {
public class LiveTvMediaSourceProvider : IMediaSourceProvider public class LiveTvMediaSourceProvider : IMediaSourceProvider
{ {

View File

@ -7,7 +7,7 @@ using MediaBrowser.Controller.LiveTv;
using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.LiveTv;
using MediaBrowser.Model.Tasks; using MediaBrowser.Model.Tasks;
namespace Emby.Server.Implementations.LiveTv namespace Jellyfin.LiveTv
{ {
/// <summary> /// <summary>
/// The "Refresh Guide" scheduled task. /// The "Refresh Guide" scheduled task.

View File

@ -19,7 +19,7 @@ using MediaBrowser.Model.IO;
using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.LiveTv;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.LiveTv.TunerHosts namespace Jellyfin.LiveTv.TunerHosts
{ {
public abstract class BaseTunerHost public abstract class BaseTunerHost
{ {

View File

@ -1,6 +1,6 @@
#nullable disable #nullable disable
namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun namespace Jellyfin.LiveTv.TunerHosts.HdHomerun
{ {
internal class Channels internal class Channels
{ {

View File

@ -2,7 +2,7 @@
using System; using System;
namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun namespace Jellyfin.LiveTv.TunerHosts.HdHomerun
{ {
internal class DiscoverResponse internal class DiscoverResponse
{ {

View File

@ -3,7 +3,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun namespace Jellyfin.LiveTv.TunerHosts.HdHomerun
{ {
public class HdHomerunChannelCommands : IHdHomerunChannelCommands public class HdHomerunChannelCommands : IHdHomerunChannelCommands
{ {

View File

@ -30,7 +30,7 @@ using MediaBrowser.Model.MediaInfo;
using MediaBrowser.Model.Net; using MediaBrowser.Model.Net;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun namespace Jellyfin.LiveTv.TunerHosts.HdHomerun
{ {
public class HdHomerunHost : BaseTunerHost, ITunerHost, IConfigurableTunerHost public class HdHomerunHost : BaseTunerHost, ITunerHost, IConfigurableTunerHost
{ {
@ -143,7 +143,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
if (!throwAllExceptions && ex.StatusCode.HasValue && ex.StatusCode.Value == HttpStatusCode.NotFound) if (!throwAllExceptions && ex.StatusCode.HasValue && ex.StatusCode.Value == HttpStatusCode.NotFound)
{ {
const string DefaultValue = "HDHR"; const string DefaultValue = "HDHR";
var response = new DiscoverResponse var discoverResponse = new DiscoverResponse
{ {
ModelNumber = DefaultValue ModelNumber = DefaultValue
}; };
@ -152,11 +152,11 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
// HDHR4 doesn't have this api // HDHR4 doesn't have this api
lock (_modelCache) lock (_modelCache)
{ {
_modelCache[cacheKey] = response; _modelCache[cacheKey] = discoverResponse;
} }
} }
return response; return discoverResponse;
} }
throw; throw;

View File

@ -14,7 +14,7 @@ using System.Threading.Tasks;
using MediaBrowser.Common; using MediaBrowser.Common;
using MediaBrowser.Controller.LiveTv; using MediaBrowser.Controller.LiveTv;
namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun namespace Jellyfin.LiveTv.TunerHosts.HdHomerun
{ {
public sealed class HdHomerunManager : IDisposable public sealed class HdHomerunManager : IDisposable
{ {

View File

@ -1,5 +1,6 @@
#nullable disable #nullable disable
#pragma warning disable CA1711
#pragma warning disable CS1591 #pragma warning disable CS1591
using System; using System;
@ -19,7 +20,7 @@ using MediaBrowser.Model.LiveTv;
using MediaBrowser.Model.MediaInfo; using MediaBrowser.Model.MediaInfo;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun namespace Jellyfin.LiveTv.TunerHosts.HdHomerun
{ {
public class HdHomerunUdpStream : LiveStream, IDirectStreamProvider public class HdHomerunUdpStream : LiveStream, IDirectStreamProvider
{ {

View File

@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun namespace Jellyfin.LiveTv.TunerHosts.HdHomerun
{ {
public interface IHdHomerunChannelCommands public interface IHdHomerunChannelCommands
{ {

View File

@ -3,7 +3,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun namespace Jellyfin.LiveTv.TunerHosts.HdHomerun
{ {
public partial class LegacyHdHomerunChannelCommands : IHdHomerunChannelCommands public partial class LegacyHdHomerunChannelCommands : IHdHomerunChannelCommands
{ {

View File

@ -1,5 +1,6 @@
#nullable disable #nullable disable
#pragma warning disable CA1711
#pragma warning disable CS1591 #pragma warning disable CS1591
using System; using System;
@ -14,7 +15,7 @@ using MediaBrowser.Model.IO;
using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.LiveTv;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.LiveTv.TunerHosts namespace Jellyfin.LiveTv.TunerHosts
{ {
public class LiveStream : ILiveStream public class LiveStream : ILiveStream
{ {

View File

@ -24,7 +24,7 @@ using MediaBrowser.Model.MediaInfo;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Net.Http.Headers; using Microsoft.Net.Http.Headers;
namespace Emby.Server.Implementations.LiveTv.TunerHosts namespace Jellyfin.LiveTv.TunerHosts
{ {
public class M3UTunerHost : BaseTunerHost, ITunerHost, IConfigurableTunerHost public class M3UTunerHost : BaseTunerHost, ITunerHost, IConfigurableTunerHost
{ {

View File

@ -18,7 +18,7 @@ using MediaBrowser.Model.IO;
using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.LiveTv;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.LiveTv.TunerHosts namespace Jellyfin.LiveTv.TunerHosts
{ {
public partial class M3uParser public partial class M3uParser
{ {

View File

@ -1,3 +1,4 @@
#pragma warning disable CA1711
#pragma warning disable CS1591 #pragma warning disable CS1591
using System; using System;
@ -16,7 +17,7 @@ using MediaBrowser.Model.LiveTv;
using MediaBrowser.Model.MediaInfo; using MediaBrowser.Model.MediaInfo;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.LiveTv.TunerHosts namespace Jellyfin.LiveTv.TunerHosts
{ {
public class SharedHttpStream : LiveStream, IDirectStreamProvider public class SharedHttpStream : LiveStream, IDirectStreamProvider
{ {

View File

@ -6,7 +6,7 @@ using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using AutoFixture; using AutoFixture;
using AutoFixture.AutoMoq; using AutoFixture.AutoMoq;
using Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun; using Jellyfin.LiveTv.TunerHosts.HdHomerun;
using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.LiveTv;
using Moq; using Moq;
using Moq.Protected; using Moq.Protected;

View File

@ -1,6 +1,6 @@
using System; using System;
using System.Text; using System.Text;
using Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun; using Jellyfin.LiveTv.TunerHosts.HdHomerun;
using Xunit; using Xunit;
namespace Jellyfin.LiveTv.Tests namespace Jellyfin.LiveTv.Tests

View File

@ -24,6 +24,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\Emby.Server.Implementations\Emby.Server.Implementations.csproj" /> <ProjectReference Include="..\..\src\Jellyfin.LiveTv\Jellyfin.LiveTv.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -6,7 +6,7 @@ using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using AutoFixture; using AutoFixture;
using AutoFixture.AutoMoq; using AutoFixture.AutoMoq;
using Emby.Server.Implementations.LiveTv.Listings; using Jellyfin.LiveTv.Listings;
using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.LiveTv;
using Moq; using Moq;
using Moq.Protected; using Moq.Protected;

View File

@ -1,5 +1,5 @@
using System; using System;
using Emby.Server.Implementations.LiveTv.EmbyTV; using Jellyfin.LiveTv.EmbyTV;
using MediaBrowser.Controller.LiveTv; using MediaBrowser.Controller.LiveTv;
using Xunit; using Xunit;

View File

@ -2,8 +2,8 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Text.Json; using System.Text.Json;
using Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos;
using Jellyfin.Extensions.Json; using Jellyfin.Extensions.Json;
using Jellyfin.LiveTv.Listings.SchedulesDirectDtos;
using Xunit; using Xunit;
namespace Jellyfin.LiveTv.Tests.SchedulesDirect namespace Jellyfin.LiveTv.Tests.SchedulesDirect