diff --git a/Configuration/PluginConfiguration.cs b/Configuration/PluginConfiguration.cs index f440d5e..3cdf94c 100644 --- a/Configuration/PluginConfiguration.cs +++ b/Configuration/PluginConfiguration.cs @@ -7,6 +7,9 @@ namespace Jellyfin.Plugin.Webdav.Configuration /// public class PluginConfiguration : BasePluginConfiguration { + /// + /// Initializes a new instance of the class. + /// public PluginConfiguration() { BaseUrl = ""; diff --git a/Jellyfin.Plugin.Webdav.csproj b/Jellyfin.Plugin.Webdav.csproj index def6105..5b08b7d 100644 --- a/Jellyfin.Plugin.Webdav.csproj +++ b/Jellyfin.Plugin.Webdav.csproj @@ -22,4 +22,9 @@ + + + Always + + diff --git a/Plugin.cs b/Plugin.cs index 7b5d6df..6c3ca9a 100644 --- a/Plugin.cs +++ b/Plugin.cs @@ -40,7 +40,7 @@ namespace Jellyfin.Plugin.Webdav /// /// Gets the plugin instance. /// - public static WebdavPlugin Instance { get; private set; } + public static WebdavPlugin? Instance { get; private set; } /// public IEnumerable GetPages() diff --git a/ServiceRegistrator.cs b/ServiceRegistrator.cs index 024400d..6c5a896 100644 --- a/ServiceRegistrator.cs +++ b/ServiceRegistrator.cs @@ -19,8 +19,6 @@ namespace Jellyfin.Plugin.Webdav /// public void RegisterServices(IServiceCollection serviceCollection, IServerApplicationHost applicationHost) { - // Register plugin configuration instance - serviceCollection.AddSingleton(_ => WebdavPlugin.Instance.Configuration); serviceCollection.AddSingleton(); serviceCollection.AddHostedService(); } diff --git a/StreamingController.cs b/StreamingController.cs index 8176a95..8cbe067 100644 --- a/StreamingController.cs +++ b/StreamingController.cs @@ -14,6 +14,11 @@ namespace Jellyfin.Plugin.Webdav.Controllers private readonly WebDavClientService _webDavClientService; private readonly PluginConfiguration _config; + /// + /// Initializes a new instance of the class. + /// + /// The WebDAV client service. + /// The plugin configuration. public StreamController(WebDavClientService webDavClientService, PluginConfiguration config) { _webDavClientService = webDavClientService; @@ -23,7 +28,7 @@ namespace Jellyfin.Plugin.Webdav.Controllers /// /// Streams the file at the given WebDAV path. /// - /// The relative path under the configured root. + /// The relative path under the configured root. [HttpGet("{*path}")] public async Task Get(string path) { diff --git a/WebDavHostedService.cs b/WebDavHostedService.cs index 2399d5d..5500b19 100644 --- a/WebDavHostedService.cs +++ b/WebDavHostedService.cs @@ -18,6 +18,10 @@ namespace Jellyfin.Plugin.Webdav { private readonly ILibraryManager _libraryManager; + /// + /// Initializes a new instance of the class. + /// + /// The library manager. public WebDavHostedService(ILibraryManager libraryManager) { _libraryManager = libraryManager; diff --git a/build.yaml b/build.yaml index d787e28..39571fe 100644 --- a/build.yaml +++ b/build.yaml @@ -9,6 +9,9 @@ description: > Integrates Nextcloud/WebDAV sources as virtual library content in Jellyfin. category: "General" owner: "jellyfin" +pages: + - name: WebDAV + embeddedResourcePath: Jellyfin.Plugin.Webdav.Configuration.configPage.html artifacts: - "Jellyfin.Plugin.Webdav.dll" - "WebDav.Client.dll" diff --git a/plugin.json b/plugin.json new file mode 100644 index 0000000..48ec8f8 --- /dev/null +++ b/plugin.json @@ -0,0 +1,21 @@ +{ + "name": "WebDAV", + "guid": "5db89aeb-14ad-450b-bcf2-ae235ebbe299", + "version": "1.0.0.0", + "targetAbi": "10.9.0.0", + "framework": "net8.0", + "overview": "WebDAV Nextcloud integration plugin", + "description": "Integrates Nextcloud/WebDAV sources as virtual library content in Jellyfin.", + "category": "General", + "owner": "jellyfin", + "assemblies": [ + "Jellyfin.Plugin.Webdav.dll", + "WebDav.Client.dll" + ], + "pages": [ + { + "name": "WebDAV", + "embeddedResourcePath": "Jellyfin.Plugin.Webdav.Configuration.configPage.html" + } + ] +} \ No newline at end of file