Skip to content

Commit

Permalink
适配 Jellyfin 最新版本
Browse files Browse the repository at this point in the history
  • Loading branch information
91270 committed Mar 31, 2022
1 parent 4922949 commit 03ce0a0
Show file tree
Hide file tree
Showing 13 changed files with 809 additions and 1 deletion.
12 changes: 12 additions & 0 deletions Jellyfin.MeiamSub.Shooter/Configuration/PluginConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using MediaBrowser.Model.Plugins;

namespace Jellyfin.MeiamSub.Shooter.Configuration
{
/// <summary>
/// Plugin configuration.
/// </summary>
public class PluginConfiguration : BasePluginConfiguration
{

}
}
11 changes: 11 additions & 0 deletions Jellyfin.MeiamSub.Shooter/Jellyfin.MeiamSub.Shooter.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Jellyfin.Controller" Version="10.7.7" />
</ItemGroup>

</Project>
15 changes: 15 additions & 0 deletions Jellyfin.MeiamSub.Shooter/Model/DownloadSubInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Jellyfin.MeiamSub.Shooter.Model
{
public class DownloadSubInfo
{
public string Url { get; set; }
public string Format { get; set; }
public string Language { get; set; }
public string TwoLetterISOLanguageName { get; set; }
public bool? IsForced { get; set; }
}
}
19 changes: 19 additions & 0 deletions Jellyfin.MeiamSub.Shooter/Model/SubtitleResponseRoot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace Jellyfin.MeiamSub.Shooter.Model
{
public class SubtitleResponseRoot
{
public string Desc { get; set; }
public int Delay { get; set; }
public SubFileInfo[] Files { get; set; }
}

public class SubFileInfo
{
public string Ext { get; set; }
public string Link { get; set; }
}

}
41 changes: 41 additions & 0 deletions Jellyfin.MeiamSub.Shooter/Plugin.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using Jellyfin.MeiamSub.Shooter.Configuration;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Model.Drawing;
using MediaBrowser.Model.Serialization;
using System;
using System.IO;

namespace Jellyfin.MeiamSub.Shooter
{

/// <summary>
/// 插件入口
/// </summary>
public class Plugin : BasePlugin<PluginConfiguration>
{
/// <summary>
/// 插件ID
/// </summary>
public override Guid Id => new Guid("038D37A2-7A1E-4C01-9B6D-AA215D29AB4C");

/// <summary>
/// 插件名称
/// </summary>
public override string Name => "MeiamSub.Shooter";

/// <summary>
/// 插件描述
/// </summary>
public override string Description => "Download subtitles from Shooter";

public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer)
: base(applicationPaths, xmlSerializer)
{
Instance = this;
}

public static Plugin Instance { get; private set; }

}
}
Loading

0 comments on commit 03ce0a0

Please sign in to comment.