test jellyfin plugin, would be nice

This commit is contained in:
2026-08-22 22:00:28 +02:00
parent 7d6405c776
commit 4baee3fafe
23 changed files with 1713 additions and 1 deletions
@@ -0,0 +1,10 @@
using MediaBrowser.Model.Plugins;
namespace {{NAMESPACE}}.Configuration;
/// <summary>
/// Plugin configuration.
/// </summary>
public class PluginConfiguration : BasePluginConfiguration
{
}
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{PLUGIN_NAME}}</title>
</head>
<body>
<div id="{{PAGE_ID}}ConfigPage" data-role="page" class="page type-interior pluginConfigurationPage" data-require="emby-button">
<div data-role="content">
<div class="content-primary">
<p>{{PLUGIN_DESCRIPTION}}</p>
<p>No settings yet.</p>
</div>
</div>
<script type="text/javascript">
var {{PAGE_ID}}Config = {
pluginUniqueId: '{{PLUGIN_GUID}}'
};
</script>
</div>
</body>
</html>
@@ -0,0 +1,55 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using {{NAMESPACE}}.Configuration;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Model.Plugins;
using MediaBrowser.Model.Serialization;
namespace {{NAMESPACE}};
/// <summary>
/// {{PLUGIN_NAME}} plugin.
/// </summary>
public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
{
/// <summary>
/// Initializes a new instance of the <see cref="Plugin"/> class.
/// </summary>
public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer)
: base(applicationPaths, xmlSerializer)
{
Instance = this;
}
/// <inheritdoc />
public override string Name => "{{PLUGIN_NAME}}";
/// <inheritdoc />
public override string Description => "{{PLUGIN_DESCRIPTION}}";
/// <inheritdoc />
public override Guid Id => Guid.Parse("{{PLUGIN_GUID}}");
/// <summary>
/// Gets the current plugin instance.
/// </summary>
public static Plugin? Instance { get; private set; }
/// <inheritdoc />
public IEnumerable<PluginPageInfo> GetPages()
{
return
[
new PluginPageInfo
{
Name = Name,
EmbeddedResourcePath = string.Format(
CultureInfo.InvariantCulture,
"{0}.Configuration.configPage.html",
GetType().Namespace)
}
];
}
}
@@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace>{{NAMESPACE}}</RootNamespace>
<AssemblyName>{{ASSEMBLY_NAME}}</AssemblyName>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<Version>1.0.0.0</Version>
<FileVersion>1.0.0.0</FileVersion>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Jellyfin.Controller" Version="10.11.3">
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
<PackageReference Include="Jellyfin.Model" Version="10.11.3">
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<None Remove="Configuration\configPage.html" />
<EmbeddedResource Include="Configuration\configPage.html" />
</ItemGroup>
</Project>
+22
View File
@@ -0,0 +1,22 @@
# {{PLUGIN_NAME}}
{{PLUGIN_DESCRIPTION}}
## Build
```bash
dotnet build -c Release
```
## Release
Tag and push:
```bash
git tag jellyfin/{{PLUGIN_SLUG}}/v1.0.0
git push origin jellyfin/{{PLUGIN_SLUG}}/v1.0.0
```
Install from the aggregated catalog:
`Jellyfin/manifest.json` (raw URL on your Gitea instance).
+14
View File
@@ -0,0 +1,14 @@
name: "{{PLUGIN_NAME}}"
guid: "{{PLUGIN_GUID}}"
version: "1.0.0.0"
targetAbi: "10.11.0.0"
framework: "net9.0"
owner: "bram"
overview: "{{PLUGIN_OVERVIEW}}"
description: >
{{PLUGIN_DESCRIPTION}}
category: "General"
artifacts:
- "{{ASSEMBLY_NAME}}.dll"
changelog: |-
- Initial scaffold