Initial plugin setup

This commit is contained in:
Odd Stråbø 2020-07-21 23:23:32 +02:00
parent 7a3aa0fecf
commit 5da9017157
6 changed files with 39 additions and 39 deletions

View File

@ -1,17 +1,17 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Plugin.Template", "Jellyfin.Plugin.Template\Jellyfin.Plugin.Template.csproj", "{D921B930-CF91-406F-ACBC-08914DCD0D34}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D921B930-CF91-406F-ACBC-08914DCD0D34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D921B930-CF91-406F-ACBC-08914DCD0D34}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D921B930-CF91-406F-ACBC-08914DCD0D34}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D921B930-CF91-406F-ACBC-08914DCD0D34}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Plugin.CoverArtArchive", "Jellyfin.Plugin.CoverArtArchive\Jellyfin.Plugin.CoverArtArchive.csproj", "{D921B930-CF91-406F-ACBC-08914DCD0D34}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D921B930-CF91-406F-ACBC-08914DCD0D34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D921B930-CF91-406F-ACBC-08914DCD0D34}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D921B930-CF91-406F-ACBC-08914DCD0D34}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D921B930-CF91-406F-ACBC-08914DCD0D34}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

View File

@ -1,6 +1,6 @@
using MediaBrowser.Model.Plugins;
namespace Jellyfin.Plugin.Template.Configuration
namespace Jellyfin.Plugin.CoverArtArchive.Configuration
{
public enum SomeOptions
{

View File

@ -2,13 +2,13 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Template</title>
<title>CoverArtArchive</title>
</head>
<body>
<div id="TemplateConfigPage" data-role="page" class="page type-interior pluginConfigurationPage" data-require="emby-input,emby-button,emby-select,emby-checkbox">
<div id="CoverArtArchiveConfigPage" data-role="page" class="page type-interior pluginConfigurationPage" data-require="emby-input,emby-button,emby-select,emby-checkbox">
<div data-role="content">
<div class="content-primary">
<form id="TemplateConfigForm">
<form id="CoverArtArchiveConfigForm">
<div class="selectContainer">
<label class="selectLabel" for="Options">Several Options</label>
<select is="emby-select" id="Options" name="Options" class="emby-select-withcolor emby-select">
@ -41,13 +41,13 @@
</div>
</div>
<script type="text/javascript">
var TemplateConfig = {
pluginUniqueId: 'eb5d7894-8eef-4b36-aa6f-5d124e828ce1'
var CoverArtArchiveConfig = {
pluginUniqueId: '8119f3c6-cfc2-4d9c-a0ba-028f1d93e526'
};
$('#TemplateConfigPage').on('pageshow', function () {
$('#CoverArtArchiveConfigPage').on('pageshow', function () {
Dashboard.showLoadingMsg();
ApiClient.getPluginConfiguration(TemplateConfig.pluginUniqueId).then(function (config) {
ApiClient.getPluginConfiguration(CoverArtArchiveConfig.pluginUniqueId).then(function (config) {
$('#Options').val(config.Options).change();
$('#AnInteger').val(config.AnInteger).change();
document.getElementById('TrueFalseSetting').checked = config.TrueFalseSetting;
@ -56,14 +56,14 @@
});
});
$('#TemplateConfigForm').on('submit', function () {
$('#CoverArtArchiveConfigForm').on('submit', function () {
Dashboard.showLoadingMsg();
ApiClient.getPluginConfiguration(TemplateConfig.pluginUniqueId).then(function (config) {
ApiClient.getPluginConfiguration(CoverArtArchiveConfig.pluginUniqueId).then(function (config) {
config.Options = $('#Options').val();
config.AnInteger = $('#AnInteger').val();
config.TrueFalseSetting = document.getElementById('TrueFalseSetting').checked;
config.AString = $('#AString').val();
ApiClient.updatePluginConfiguration(TemplateConfig.pluginUniqueId, config).then(function (result) {
ApiClient.updatePluginConfiguration(CoverArtArchiveConfig.pluginUniqueId, config).then(function (result) {
Dashboard.processPluginConfigurationUpdateResult(result);
});
});

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<RootNamespace>Jellyfin.Plugin.Template</RootNamespace>
<RootNamespace>Jellyfin.Plugin.CoverArtArchive</RootNamespace>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
</PropertyGroup>

View File

@ -1,18 +1,18 @@
using System;
using System.Collections.Generic;
using Jellyfin.Plugin.Template.Configuration;
using Jellyfin.Plugin.CoverArtArchive.Configuration;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Model.Plugins;
using MediaBrowser.Model.Serialization;
namespace Jellyfin.Plugin.Template
namespace Jellyfin.Plugin.CoverArtArchive
{
public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
{
public override string Name => "Template";
public override string Name => "Cover Art Archive";
public override Guid Id => Guid.Parse("eb5d7894-8eef-4b36-aa6f-5d124e828ce1");
public override Guid Id => Guid.Parse("8119f3c6-cfc2-4d9c-a0ba-028f1d93e526");
public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer) : base(applicationPaths, xmlSerializer)
{

View File

@ -1,15 +1,15 @@
---
name: "Template"
guid: "eb5d7894-8eef-4b36-aa6f-5d124e828ce1"
name: "Cover Art Archive"
guid: "8119f3c6-cfc2-4d9c-a0ba-028f1d93e526"
version: "1.0.0.0"
targetAbi: "10.6.0.0"
overview: "Short description about your plugin"
overview: "MusicBrainz Cover Art Archive"
description: >
This is a longer description that can span more than one
line and include details about your plugin.
This plugin provides images from the Cover Art Archive https://musicbrainz.org/doc/Cover_Art_Archive
and depends on the MusicBrainz metadata provider to know what images belong where
category: "General"
owner: "jellyfin"
artifacts:
- "Jellyfin.Plugin.Template.dll"
- "Jellyfin.Plugin.CoverArtArchive.dll"
changelog: >
changelog