remove warnings, but still no config page

This commit is contained in:
copyrights 2025-04-21 21:24:59 +02:00
parent 88a1de5d7d
commit 89ee319025
8 changed files with 43 additions and 4 deletions

View file

@ -7,6 +7,9 @@ namespace Jellyfin.Plugin.Webdav.Configuration
/// </summary>
public class PluginConfiguration : BasePluginConfiguration
{
/// <summary>
/// Initializes a new instance of the <see cref="PluginConfiguration"/> class.
/// </summary>
public PluginConfiguration()
{
BaseUrl = "";

View file

@ -22,4 +22,9 @@
<EmbeddedResource Include="Configuration\configPage.html" />
</ItemGroup>
<ItemGroup>
<None Include="plugin.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

View file

@ -40,7 +40,7 @@ namespace Jellyfin.Plugin.Webdav
/// <summary>
/// Gets the plugin instance.
/// </summary>
public static WebdavPlugin Instance { get; private set; }
public static WebdavPlugin? Instance { get; private set; }
/// <inheritdoc/>
public IEnumerable<PluginPageInfo> GetPages()

View file

@ -19,8 +19,6 @@ namespace Jellyfin.Plugin.Webdav
/// <inheritdoc/>
public void RegisterServices(IServiceCollection serviceCollection, IServerApplicationHost applicationHost)
{
// Register plugin configuration instance
serviceCollection.AddSingleton<Configuration.PluginConfiguration>(_ => WebdavPlugin.Instance.Configuration);
serviceCollection.AddSingleton<WebDavClientService>();
serviceCollection.AddHostedService<WebDavSyncService>();
}

View file

@ -14,6 +14,11 @@ namespace Jellyfin.Plugin.Webdav.Controllers
private readonly WebDavClientService _webDavClientService;
private readonly PluginConfiguration _config;
/// <summary>
/// Initializes a new instance of the <see cref="StreamController"/> class.
/// </summary>
/// <param name="webDavClientService">The WebDAV client service.</param>
/// <param name="config">The plugin configuration.</param>
public StreamController(WebDavClientService webDavClientService, PluginConfiguration config)
{
_webDavClientService = webDavClientService;
@ -23,7 +28,7 @@ namespace Jellyfin.Plugin.Webdav.Controllers
/// <summary>
/// Streams the file at the given WebDAV path.
/// </summary>
/// <param name="*path">The relative path under the configured root.</param>
/// <param name="path">The relative path under the configured root.</param>
[HttpGet("{*path}")]
public async Task<IActionResult> Get(string path)
{

View file

@ -18,6 +18,10 @@ namespace Jellyfin.Plugin.Webdav
{
private readonly ILibraryManager _libraryManager;
/// <summary>
/// Initializes a new instance of the <see cref="WebDavHostedService"/> class.
/// </summary>
/// <param name="libraryManager">The library manager.</param>
public WebDavHostedService(ILibraryManager libraryManager)
{
_libraryManager = libraryManager;

View file

@ -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"

21
plugin.json Normal file
View file

@ -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"
}
]
}