diff --git a/Directory.Build.props b/Directory.Build.props index 02f19e1..a082cca 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - 1.0.0.0 - 1.0.0.0 - 1.0.0.0 + 1.0.2.0 + 1.0.2.0 + 1.0.2.0 diff --git a/Jellyfin.Plugin.MediaSegmentsApi/PluginServiceRegistrator.cs b/Jellyfin.Plugin.MediaSegmentsApi/PluginServiceRegistrator.cs new file mode 100644 index 0000000..3951c8b --- /dev/null +++ b/Jellyfin.Plugin.MediaSegmentsApi/PluginServiceRegistrator.cs @@ -0,0 +1,18 @@ +using Jellyfin.Plugin.MediaSegmentsApi.Providers; +using MediaBrowser.Controller; +using MediaBrowser.Controller.Plugins; +using Microsoft.Extensions.DependencyInjection; + +namespace Jellyfin.Plugin.MediaSegmentsApi; + +/// +/// Register MediaSegmentsApi services. +/// +public class PluginServiceRegistrator : IPluginServiceRegistrator +{ + /// + public void RegisterServices(IServiceCollection serviceCollection, IServerApplicationHost applicationHost) + { + serviceCollection.AddSingleton(); + } +} diff --git a/Jellyfin.Plugin.MediaSegmentsApi/Providers/SegmentProvider.cs b/Jellyfin.Plugin.MediaSegmentsApi/Providers/SegmentProvider.cs new file mode 100644 index 0000000..8357e6a --- /dev/null +++ b/Jellyfin.Plugin.MediaSegmentsApi/Providers/SegmentProvider.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using MediaBrowser.Controller; +using MediaBrowser.Controller.Entities; +using MediaBrowser.Model; +using MediaBrowser.Model.MediaSegments; + +namespace Jellyfin.Plugin.MediaSegmentsApi.Providers; + +/// +/// MediaSegmentsApi media segment provider. +/// +public class SegmentProvider : IMediaSegmentProvider +{ + /// + public string Name => Plugin.Instance!.Name; + + /// + public Task> GetMediaSegments(MediaSegmentGenerationRequest request, CancellationToken cancellationToken) => Task.FromResult>([]); + + /// + public ValueTask Supports(BaseItem item) => ValueTask.FromResult(false); +} diff --git a/build.yaml b/build.yaml index 3c9fe27..9b419e8 100644 --- a/build.yaml +++ b/build.yaml @@ -1,14 +1,14 @@ --- name: "MediaSegments API" guid: "6f0aaab5-e251-4a6d-b8d5-bc8c65222051" -version: "1.0.0.0" +version: "1.0.2.0" targetAbi: "10.10.2.0" framework: "net8.0" overview: "Create and delete Media Segments" description: > Provide an extended HTTP API to create and delete MediaSegments category: "General" -owner: "Endrl" +owner: "intro-skipper" artifacts: - "Jellyfin.Plugin.MediaSegmentsApi.dll" changelog: >