Skip to content

Commit

Permalink
fix: emby 4.8
Browse files Browse the repository at this point in the history
  • Loading branch information
DirtyRacer1337 committed Sep 20, 2024
1 parent 6b10e89 commit b059c34
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 10 deletions.
11 changes: 11 additions & 0 deletions Jellyfin.Plugin.Stash/Configuration/PluginConfiguration.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
#if __EMBY__
using Emby.Web.GenericEdit;
#else
using MediaBrowser.Model.Plugins;
#endif

namespace Stash.Configuration
{
#if __EMBY__
public class PluginConfiguration : EditableOptionsBase
{
public override string EditorTitle => Plugin.Instance.Name;

#else
public class PluginConfiguration : BasePluginConfiguration
{
#endif
public PluginConfiguration()
{
this.StashEndpoint = "http://localhost:9999";
Expand Down
20 changes: 12 additions & 8 deletions Jellyfin.Plugin.Stash/Plugin.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
using System;
using System.Collections.Generic;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Model.Plugins;
using MediaBrowser.Model.Serialization;
using Stash.Configuration;

#if __EMBY__
using System.IO;
using MediaBrowser.Common;
using MediaBrowser.Common.Net;
using MediaBrowser.Model.Drawing;
using MediaBrowser.Model.Logging;
using MediaBrowser.Controller.Plugins;
#else
using MediaBrowser.Model.Serialization;
using MediaBrowser.Common.Configuration;
using System.Net.Http;
using Microsoft.Extensions.Logging;
#endif
Expand All @@ -21,15 +21,14 @@
namespace Stash
{
#if __EMBY__
public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
public class Plugin : BasePluginSimpleUI<PluginConfiguration>
{
public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer, IHttpClient http, ILogManager logger)
public Plugin(IApplicationHost applicationHost, IHttpClient http, ILogManager logger) : base(applicationHost)
#else
public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
{
public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer, IHttpClientFactory http, ILogger<Plugin> logger)
public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer, IHttpClientFactory http, ILogger<Plugin> logger) : base(applicationPaths, xmlSerializer)
#endif
: base(applicationPaths, xmlSerializer)
{
Instance = this;
Http = http;
Expand Down Expand Up @@ -58,6 +57,11 @@ public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer,

public override Guid Id => Guid.Parse("57b8ef5d-8835-436d-9514-a709ee25faf2");

#if __EMBY__
public PluginConfiguration Configuration => GetOptions();
#else
#endif

public IEnumerable<PluginPageInfo> GetPages()
=> new[]
{
Expand Down
7 changes: 5 additions & 2 deletions Jellyfin.Plugin.Stash/Stash.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</ItemGroup>

<ItemGroup Condition="'$(Configuration)'=='Debug.Emby' or '$(Configuration)'=='Release.Emby'">
<PackageReference Include="MediaBrowser.Server.Core" Version="4.7.9" />
<PackageReference Include="MediaBrowser.Server.Core" Version="4.8.5" />
</ItemGroup>

<ItemGroup Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Debug.Emby'">
Expand All @@ -63,7 +63,10 @@
</ItemGroup>

<ItemGroup Condition="'$(Configuration)'=='Release' or '$(Configuration)'=='Release.Emby'">
<PackageReference Include="ILRepack.Lib.MSBuild.Task" Version="2.0.18.2" />
<PackageReference Include="ILRepack.Lib.MSBuild.Task" Version="2.0.34.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit b059c34

Please sign in to comment.