Jellyfin 10.11 plugin: a scheduled task that labels each library card with the library name over a representative backdrop (Noto Sans, centered, soft shadow), matching Jellyfin's default cover style. Supports source rules (top-rated / random / newest) and per-library pinned sources. Sets images via the internal provider API so the home-screen view cache updates without a server restart.
45 lines
1.3 KiB
C#
45 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Globalization;
|
|
using Jellyfin.Plugin.Placard.Configuration;
|
|
using MediaBrowser.Common.Configuration;
|
|
using MediaBrowser.Common.Plugins;
|
|
using MediaBrowser.Model.Plugins;
|
|
using MediaBrowser.Model.Serialization;
|
|
|
|
namespace Jellyfin.Plugin.Placard;
|
|
|
|
/// <summary>
|
|
/// Placard: bakes each library's name onto a representative backdrop,
|
|
/// matching Jellyfin's default library-card styling.
|
|
/// </summary>
|
|
public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
|
|
{
|
|
public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer)
|
|
: base(applicationPaths, xmlSerializer)
|
|
{
|
|
Instance = this;
|
|
}
|
|
|
|
public static Plugin? Instance { get; private set; }
|
|
|
|
public override string Name => "Placard";
|
|
|
|
public override Guid Id => Guid.Parse("b6f8e2a4-1c3d-4e5f-9a7b-2d4c6e8f0a1b");
|
|
|
|
public override string Description =>
|
|
"Bakes each library's name onto a representative backdrop, matching Jellyfin's default card style.";
|
|
|
|
public IEnumerable<PluginPageInfo> GetPages()
|
|
{
|
|
yield return new PluginPageInfo
|
|
{
|
|
Name = Name,
|
|
EmbeddedResourcePath = string.Format(
|
|
CultureInfo.InvariantCulture,
|
|
"{0}.Configuration.configPage.html",
|
|
GetType().Namespace)
|
|
};
|
|
}
|
|
}
|