Skip to content

Commit

Permalink
Initial commit: Basic plugin structure
Browse files Browse the repository at this point in the history
  • Loading branch information
grunwalski committed Jan 26, 2025
1 parent d62e613 commit 97cf247
Show file tree
Hide file tree
Showing 47 changed files with 200 additions and 5,641 deletions.
12 changes: 8 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Oo]ut/
msbuild.log
msbuild.err
msbuild.wrn

# Visual Studio 2015/2017 cache/options directory
.vs/
Expand Down Expand Up @@ -221,7 +225,7 @@ ClientBin/
*.publishsettings
orleans.codegen.cs

# Including strong name files can present a security risk
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk

Expand Down Expand Up @@ -317,7 +321,7 @@ __pycache__/
# OpenCover UI analysis results
OpenCover/

# Azure Stream Analytics local run output
# Azure Stream Analytics local run output
ASALocalRun/

# MSBuild Binary and Structured Log
Expand All @@ -326,7 +330,7 @@ ASALocalRun/
# NVidia Nsight GPU debugger configuration file
*.nvuser

# MFractors (Xamarin productivity tool) working folder
# MFractors (Xamarin productivity tool) working folder
.mfractor/
artifacts
.idea
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<Version>18.0.0.0</Version>
<AssemblyVersion>18.0.0.0</AssemblyVersion>
<FileVersion>18.0.0.0</FileVersion>
<Version>0.0.0.1</Version>
<AssemblyVersion>0.0.0.1</AssemblyVersion>
<FileVersion>0.0.0.1</FileVersion>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using MediaBrowser.Model.Plugins;

namespace Jellyfin.Plugin.DelayedRelease.Configuration
{
/// <summary>
/// Plugin Configuration.
/// </summary>
public class PluginConfiguration : BasePluginConfiguration
{
// Add your plugin-specific configuration properties here if needed
}
}
58 changes: 58 additions & 0 deletions Jellyfin.Plugin.DelayedRelease/Configuration/config.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>Delayed Release</title>
</head>
<body>
<div id="delayedReleaseConfigurationPage" data-role="page" class="page type-interior pluginConfigurationPage">
<div data-role="content">
<div class="content-primary">
<form class="delayedReleaseConfigurationForm">
<div class="verticalSection verticalSection-extrabottompadding">
<div class="sectionTitleContainer flex align-items-center">
<h2 class="sectionTitle">Delayed Release Settings:</h2>
<a is="emby-button" class="raised button-alt headerHelpButton" target="_blank"
href="https://github.com/your-username/jellyfin-plugin-delayedrelease">${Help}</a>
</div>
<div>
<button is="emby-button" type="submit" data-theme="b" class="raised button-submit block">
<span>Save</span>
</button>
</div>
</div>
</form>
</div>
</div>
<script type="text/javascript">
var DelayedReleasePluginConfiguration = {
uniquePluginId: "b7decd4f-e20d-45f5-b16b-da6f55d456a1",

loadConfiguration: function () {
Dashboard.showLoadingMsg();
ApiClient.getPluginConfiguration(DelayedReleasePluginConfiguration.uniquePluginId).then(function (config) {
Dashboard.hideLoadingMsg();
});
},

saveConfiguration: function () {
Dashboard.showLoadingMsg();
ApiClient.getPluginConfiguration(DelayedReleasePluginConfiguration.uniquePluginId).then(function (config) {
ApiClient.updatePluginConfiguration(DelayedReleasePluginConfiguration.uniquePluginId, config).then(function (result) {
Dashboard.processPluginConfigurationUpdateResult(result);
});
});
},
};

document.getElementById('delayedReleaseConfigurationPage').addEventListener('pageshow', function () {
DelayedReleasePluginConfiguration.loadConfiguration();
});

document.getElementById('delayedReleaseConfigurationPage').addEventListener('submit', function (e) {
e.preventDefault();
DelayedReleasePluginConfiguration.saveConfiguration();
});
</script>
</div>
</body>
</html>
48 changes: 48 additions & 0 deletions Jellyfin.Plugin.DelayedRelease/DelayedReleasePlugin.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using Jellyfin.Plugin.DelayedRelease.Configuration;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Model.Plugins;
using MediaBrowser.Model.Serialization;

namespace Jellyfin.Plugin.DelayedRelease
{
/// <summary>
/// Delayed Release Plugin.
/// </summary>
public class DelayedReleasePlugin : BasePlugin<PluginConfiguration>, IHasWebPages
{
/// <summary>
/// Initializes a new instance of the <see cref="DelayedReleasePlugin"/> class.
/// </summary>
/// <param name="applicationPaths">Instance of the <see cref="IApplicationPaths"/> interface.</param>
/// <param name="xmlSerializer">Instance of the <see cref="IXmlSerializer"/> interface.</param>
public DelayedReleasePlugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer)
: base(applicationPaths, xmlSerializer)
{
Instance = this;
}

/// <summary>
/// Gets current plugin instance.
/// </summary>
public static DelayedReleasePlugin? Instance { get; private set; }

/// <inheritdoc />
public override string Name => "Delayed Release";

/// <inheritdoc />
public override Guid Id => new Guid("b7decd4f-e20d-45f5-b16b-da6f55d456a1");

/// <inheritdoc />
public IEnumerable<PluginPageInfo> GetPages()
{
yield return new PluginPageInfo
{
Name = Name,
EmbeddedResourcePath = $"{GetType().Namespace}.Configuration.config.html"
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<CodeAnalysisRuleSet>../jellyfin.ruleset</CodeAnalysisRuleSet>
<AssemblyName>Jellyfin.Plugin.DelayedRelease</AssemblyName>
<RootNamespace>Jellyfin.Plugin.DelayedRelease</RootNamespace>
<Version>0.0.0.1</Version>
<AssemblyVersion>0.0.0.1</AssemblyVersion>
<FileVersion>0.0.0.1</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand All @@ -16,12 +21,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Jellyfin.Data" Version="10.*-*" />
<PackageReference Include="Jellyfin.Controller" Version="10.*-*" />
<PackageReference Include="Jellyfin.Common" Version="10.*-*" />
<PackageReference Include="Jellyfin.Model" Version="10.*-*" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.1" />
<PackageReference Include="Tvdb.Sdk" Version="4.7.10" />
<PackageReference Include="Jellyfin.Data" Version="10.8.13" />
<PackageReference Include="Jellyfin.Controller" Version="10.8.13" />
<PackageReference Include="Jellyfin.Common" Version="10.8.13" />
<PackageReference Include="Jellyfin.Model" Version="10.8.13" />
</ItemGroup>

<!-- Code Analyzers-->
Expand Down
16 changes: 0 additions & 16 deletions Jellyfin.Plugin.Tvdb.sln

This file was deleted.

60 changes: 0 additions & 60 deletions Jellyfin.Plugin.Tvdb/CollectionExtensions.cs

This file was deleted.

108 changes: 0 additions & 108 deletions Jellyfin.Plugin.Tvdb/Configuration/PluginConfiguration.cs

This file was deleted.

Loading

0 comments on commit 97cf247

Please sign in to comment.