jellyfin / jellyfin-plugin-nextpvr

https://jellyfin.org
MIT License
25 stars 9 forks source link

Initial changes for 10.9.1 #48

Closed emveepee closed 3 months ago

emveepee commented 3 months ago

Initial changes to handle major Live TV plugin changes in jellyfin 10.9. Need help with recordings and other undocumented changes. Tested with Live TV playback only.

emveepee commented 3 months ago

@barronpm @crobibero I will need your help in understanding how the recording IChannel gets added o the service extension from PR 10858. If I try to add it (it is commented out now) I get

[2024-05-13 15:06:50.920 -04:00] [FTL] [1] Main: Error while starting server
System.InvalidOperationException: A circular dependency was detected for the service of type 'MediaBrowser.Controller.Channels.IChannelManager'.
MediaBrowser.Controller.Channels.IChannelManager(Jellyfin.LiveTv.Channels.ChannelManager) -> System.Collections.Generic.IEnumerable<MediaBrowser.Controller.Channels.IChannel> -> MediaBrowser.Controller.Channels.IChannel(Jellyfin.Plugin.NextPVR.RecordingsChannel) -> MediaBrowser.Controller.LiveTv.ILiveTvManager(Jellyfin.LiveTv.LiveTvManager) -> MediaBrowser.Controller.Channels.IChannelManager
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteChain.CheckCircularDependency(ServiceIdentifier serviceIdentifier)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite(ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite(ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateEnumerable(ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite(ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, ServiceIdentifier serviceIdentifier, Type implementationType, CallSiteChain callSiteChain)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain, Int32 slot)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite(ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(ServiceIdentifier serviceIdentifier, CallSiteChain callSiteChain)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
   at Emby.Server.Implementations.ApplicationHost.Resolve[T]() in D:\jellyfin\jellyfin\Emby.Server.Implementations\ApplicationHost.cs:line 332
   at Emby.Server.Implementations.ApplicationHost.SetStaticProperties() in D:\jellyfin\jellyfin\Emby.Server.Implementations\ApplicationHost.cs:line 632
   at Emby.Server.Implementations.ApplicationHost.InitializeServices() in D:\jellyfin\jellyfin\Emby.Server.Implementations\ApplicationHost.cs:line 580
   at Jellyfin.Server.Program.StartServer(IServerApplicationPaths appPaths, StartupOptions options, IConfiguration startupConfig) in D:\jellyfin\jellyfin\Jellyfin.Server\Program.cs:line 159
crobibero commented 3 months ago

You can't reference the ILiveTvManager from IChannel

Since it is only referenced to get the list of ILiveTvService, it should be trivial to remove.

emveepee commented 3 months ago

You can't reference the ILiveTvManager from IChannel

Since it is only referenced to get the list of ILiveTvService, it should be trivial to remove.

How do I get the reference back to the http service contained in ILiveTVService in the RecordingService if ILiveTVManager isn't passed back any longer?

@crobibero please suggest improvements to the second commit

This PR this should include and close PR 42-44 but I can't test or even understand workflow so that needs to be reviewed too.

emveepee commented 3 months ago

@joshuaboniface what do I need to to add to get further movement on this PR? Users have tested the binary here https://forums.nextpvr.com/showthread.php?tid=65568&action=lastpost but there are no reviewers assigned.

emveepee commented 3 months ago

@Shadowghost still waiting for your review.