74 lines
2.2 KiB
C#
74 lines
2.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Globalization;
|
|
using Jellyfin.Plugin.MovieNight.Configuration;
|
|
using MediaBrowser.Common.Configuration;
|
|
using MediaBrowser.Common.Plugins;
|
|
using MediaBrowser.Model.Plugins;
|
|
using MediaBrowser.Model.Serialization;
|
|
|
|
namespace Jellyfin.Plugin.MovieNight;
|
|
|
|
/// <summary>
|
|
/// MovieNight Jellyfin plugin.
|
|
/// </summary>
|
|
public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="Plugin"/> class.
|
|
/// </summary>
|
|
/// <param name="applicationPaths">Application paths.</param>
|
|
/// <param name="xmlSerializer">XML serializer.</param>
|
|
public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer)
|
|
: base(applicationPaths, xmlSerializer)
|
|
{
|
|
Instance = this;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override string Name => "MovieNight";
|
|
|
|
/// <inheritdoc />
|
|
public override Guid Id => Guid.Parse("42c72919-d6ff-4f62-bb8c-0fac39efafdb");
|
|
|
|
/// <inheritdoc />
|
|
public override string Description => "Bridges Jellyfin playback and sync signals to the MovieNight backend.";
|
|
|
|
/// <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)
|
|
},
|
|
new PluginPageInfo
|
|
{
|
|
Name = Name + ".js",
|
|
EmbeddedResourcePath = string.Format(
|
|
CultureInfo.InvariantCulture,
|
|
"{0}.Configuration.config.js",
|
|
GetType().Namespace)
|
|
},
|
|
new PluginPageInfo
|
|
{
|
|
Name = Name + ".ui.js",
|
|
EmbeddedResourcePath = string.Format(
|
|
CultureInfo.InvariantCulture,
|
|
"{0}.Configuration.ui.js",
|
|
GetType().Namespace)
|
|
}
|
|
];
|
|
}
|
|
}
|