mirror of
https://github.com/91270/MeiamSubtitles.git
synced 2026-02-02 18:19:50 +08:00
chore: 完善部署与发布文档,准备发布 v1.0.13.0
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -366,3 +366,5 @@ FodyWeavers.xsd
|
|||||||
/TestServer
|
/TestServer
|
||||||
|
|
||||||
TestServer/
|
TestServer/
|
||||||
|
*.bat
|
||||||
|
*.md
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<AssemblyVersion>1.0.12.0</AssemblyVersion>
|
<AssemblyVersion>1.0.13.0</AssemblyVersion>
|
||||||
<FileVersion>1.0.12.0</FileVersion>
|
<FileVersion>1.0.13.0</FileVersion>
|
||||||
<Version>1.0.12.0</Version>
|
<Version>1.0.13.0</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<AssemblyVersion>1.0.12.0</AssemblyVersion>
|
<AssemblyVersion>1.0.13.0</AssemblyVersion>
|
||||||
<FileVersion>1.0.12.0</FileVersion>
|
<FileVersion>1.0.13.0</FileVersion>
|
||||||
<Version>1.0.12.0</Version>
|
<Version>1.0.13.0</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net9.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<Version>1.0.12.0</Version>
|
<Version>1.0.13.0</Version>
|
||||||
<AssemblyVersion>1.0.12.0</AssemblyVersion>
|
<AssemblyVersion>1.0.13.0</AssemblyVersion>
|
||||||
<FileVersion>1.0.12.0</FileVersion>
|
<FileVersion>1.0.13.0</FileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ namespace Jellyfin.MeiamSub.Shooter
|
|||||||
/// <returns>远程字幕信息列表</returns>
|
/// <returns>远程字幕信息列表</returns>
|
||||||
public async Task<IEnumerable<RemoteSubtitleInfo>> Search(SubtitleSearchRequest request, CancellationToken cancellationToken)
|
public async Task<IEnumerable<RemoteSubtitleInfo>> Search(SubtitleSearchRequest request, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
_logger.LogInformation($"{Name} Search | SubtitleSearchRequest -> {JsonSerializer.Serialize(request)}");
|
_logger.LogInformation("DEBUG: Received Search request for " + (request?.MediaPath ?? "NULL"));
|
||||||
|
|
||||||
var subtitles = await SearchSubtitlesAsync(request);
|
var subtitles = await SearchSubtitlesAsync(request);
|
||||||
|
|
||||||
@@ -87,27 +87,49 @@ namespace Jellyfin.MeiamSub.Shooter
|
|||||||
{
|
{
|
||||||
// 修改人: Meiam
|
// 修改人: Meiam
|
||||||
// 修改时间: 2025-12-22
|
// 修改时间: 2025-12-22
|
||||||
// 备注: 增加异常处理
|
// 备注: 增加极致探测日志,定位方法中断的具体位置
|
||||||
|
|
||||||
|
_logger.LogInformation("DEBUG: Entering SearchSubtitlesAsync");
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var language = NormalizeLanguage(request.Language);
|
if (request == null)
|
||||||
|
|
||||||
_logger.LogInformation("{Provider} Search | Target -> {File} | Language -> {Lang}", Name, Path.GetFileName(request.MediaPath), language);
|
|
||||||
|
|
||||||
if (language != "chi" && language != "eng")
|
|
||||||
{
|
{
|
||||||
_logger.LogInformation("{Provider} Search | Summary -> Language not supported, skip search.", Name);
|
_logger.LogInformation("DEBUG: Request is null");
|
||||||
return Array.Empty<RemoteSubtitleInfo>();
|
return Array.Empty<RemoteSubtitleInfo>();
|
||||||
}
|
}
|
||||||
|
|
||||||
FileInfo fileInfo = new(request.MediaPath);
|
var language = NormalizeLanguage(request.Language);
|
||||||
|
var fileName = string.Empty;
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(request.MediaPath))
|
||||||
|
{
|
||||||
|
fileName = Path.GetFileName(request.MediaPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
_logger.LogInformation(Name + " Search | Target -> " + fileName + " | Language -> " + language);
|
||||||
|
|
||||||
|
if (language != "chi" && language != "eng")
|
||||||
|
{
|
||||||
|
_logger.LogInformation(Name + " Search | Summary -> Language not supported, skip search.");
|
||||||
|
return Array.Empty<RemoteSubtitleInfo>();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(request.MediaPath))
|
||||||
|
{
|
||||||
|
_logger.LogInformation(Name + " Search | Summary -> MediaPath is empty, skip search.");
|
||||||
|
return Array.Empty<RemoteSubtitleInfo>();
|
||||||
|
}
|
||||||
|
|
||||||
|
FileInfo fileInfo = new FileInfo(request.MediaPath);
|
||||||
|
|
||||||
|
_logger.LogInformation("DEBUG: Starting hash calculation for " + fileName);
|
||||||
|
|
||||||
var stopWatch = Stopwatch.StartNew();
|
var stopWatch = Stopwatch.StartNew();
|
||||||
var hash = await ComputeFileHashAsync(fileInfo);
|
var hash = await ComputeFileHashAsync(fileInfo);
|
||||||
stopWatch.Stop();
|
stopWatch.Stop();
|
||||||
|
|
||||||
_logger.LogInformation("{Provider} Search | FileHash -> {Hash} (Took {Elapsed}ms)", Name, hash, stopWatch.ElapsedMilliseconds);
|
_logger.LogInformation(Name + " Search | FileHash -> " + hash + " (Took " + stopWatch.ElapsedMilliseconds + "ms)");
|
||||||
|
|
||||||
var formData = new Dictionary<string, string>
|
var formData = new Dictionary<string, string>
|
||||||
{
|
{
|
||||||
@@ -208,7 +230,7 @@ namespace Jellyfin.MeiamSub.Shooter
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.LogError(ex, "{Provider} Search | Exception -> [{Type}] {Message}", Name, ex.GetType().Name, ex.Message);
|
_logger.LogError(ex, $"{Name} Search | Exception -> {ex.Message}");
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.LogInformation($"{Name} Search | Summary -> Get 0 Subtitles");
|
_logger.LogInformation($"{Name} Search | Summary -> Get 0 Subtitles");
|
||||||
|
|||||||
12
Jellyfin.MeiamSub.Shooter/meta.json
Normal file
12
Jellyfin.MeiamSub.Shooter/meta.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"category": "Subtitles",
|
||||||
|
"description": "Download subtitles from Shooter",
|
||||||
|
"guid": "038D37A2-7A1E-4C01-9B6D-AA215D29AB4C",
|
||||||
|
"name": "MeiamSub.Shooter",
|
||||||
|
"owner": "Meiam",
|
||||||
|
"targetAbi": "10.11.0.0",
|
||||||
|
"timestamp": "2025-12-22T10:00:00.0000000Z",
|
||||||
|
"version": "1.0.13.0",
|
||||||
|
"status": "Active",
|
||||||
|
"imagePath": "thumb.png"
|
||||||
|
}
|
||||||
@@ -3,8 +3,8 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<TargetFramework>net9.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<Version>1.0.12.0</Version>
|
<Version>1.0.13.0</Version>
|
||||||
<AssemblyVersion>1.0.12.0</AssemblyVersion>
|
<AssemblyVersion>1.0.13.0</AssemblyVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||||
|
|||||||
@@ -66,14 +66,14 @@ namespace Jellyfin.MeiamSub.Thunder
|
|||||||
/// <param name="request">包含媒体路径、语言等信息的搜索请求对象</param>
|
/// <param name="request">包含媒体路径、语言等信息的搜索请求对象</param>
|
||||||
/// <param name="cancellationToken">取消令牌</param>
|
/// <param name="cancellationToken">取消令牌</param>
|
||||||
/// <returns>远程字幕信息列表</returns>
|
/// <returns>远程字幕信息列表</returns>
|
||||||
public async Task<IEnumerable<RemoteSubtitleInfo>> Search(SubtitleSearchRequest request, CancellationToken cancellationToken)
|
public async Task<IEnumerable<RemoteSubtitleInfo>> Search(SubtitleSearchRequest request, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
_logger.LogInformation($"{Name} Search | SubtitleSearchRequest -> {JsonSerializer.Serialize(request)}");
|
_logger.LogInformation("DEBUG: Received Search request for " + (request?.MediaPath ?? "NULL"));
|
||||||
|
|
||||||
var subtitles = await SearchSubtitlesAsync(request);
|
var subtitles = await SearchSubtitlesAsync(request);
|
||||||
|
|
||||||
return subtitles;
|
return subtitles;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查询字幕
|
/// 查询字幕
|
||||||
@@ -84,17 +84,37 @@ namespace Jellyfin.MeiamSub.Thunder
|
|||||||
{
|
{
|
||||||
// 修改人: Meiam
|
// 修改人: Meiam
|
||||||
// 修改时间: 2025-12-22
|
// 修改时间: 2025-12-22
|
||||||
// 备注: 增加异常处理
|
// 备注: 增加极致探测日志
|
||||||
|
|
||||||
|
_logger.LogInformation("DEBUG: Entering SearchSubtitlesAsync (Thunder)");
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var language = NormalizeLanguage(request.Language);
|
if (request == null)
|
||||||
|
{
|
||||||
|
_logger.LogInformation("DEBUG: Request is null");
|
||||||
|
return Array.Empty<RemoteSubtitleInfo>();
|
||||||
|
}
|
||||||
|
|
||||||
_logger.LogInformation("{Provider} Search | Target -> {File} | Language -> {Lang}", Name, Path.GetFileName(request.MediaPath), language);
|
var language = NormalizeLanguage(request.Language);
|
||||||
|
var fileName = string.Empty;
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(request.MediaPath))
|
||||||
|
{
|
||||||
|
fileName = Path.GetFileName(request.MediaPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
_logger.LogInformation(Name + " Search | Target -> " + fileName + " | Language -> " + language);
|
||||||
|
|
||||||
if (language != "chi")
|
if (language != "chi")
|
||||||
{
|
{
|
||||||
_logger.LogInformation("{Provider} Search | Summary -> Language not supported, skip search.", Name);
|
_logger.LogInformation(Name + " Search | Summary -> Language not supported, skip search.");
|
||||||
|
return Array.Empty<RemoteSubtitleInfo>();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(request.MediaPath))
|
||||||
|
{
|
||||||
|
_logger.LogInformation(Name + " Search | Summary -> MediaPath is empty, skip search.");
|
||||||
return Array.Empty<RemoteSubtitleInfo>();
|
return Array.Empty<RemoteSubtitleInfo>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,7 +122,7 @@ namespace Jellyfin.MeiamSub.Thunder
|
|||||||
var cid = await GetCidByFileAsync(request.MediaPath);
|
var cid = await GetCidByFileAsync(request.MediaPath);
|
||||||
stopWatch.Stop();
|
stopWatch.Stop();
|
||||||
|
|
||||||
_logger.LogInformation("{Provider} Search | FileHash -> {Hash} (Took {Elapsed}ms)", Name, cid, stopWatch.ElapsedMilliseconds);
|
_logger.LogInformation(Name + " Search | FileHash -> " + cid + " (Took " + stopWatch.ElapsedMilliseconds + "ms)");
|
||||||
|
|
||||||
using var options = new HttpRequestMessage
|
using var options = new HttpRequestMessage
|
||||||
{
|
{
|
||||||
@@ -159,7 +179,7 @@ namespace Jellyfin.MeiamSub.Thunder
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.LogError(ex, "{Provider} Search | Exception -> [{Type}] {Message}", Name, ex.GetType().Name, ex.Message);
|
_logger.LogError(ex, $"{Name} Search | Exception -> {ex.Message}");
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.LogInformation($"{Name} Search | Summary -> Get 0 Subtitles");
|
_logger.LogInformation($"{Name} Search | Summary -> Get 0 Subtitles");
|
||||||
|
|||||||
12
Jellyfin.MeiamSub.Thunder/meta.json
Normal file
12
Jellyfin.MeiamSub.Thunder/meta.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"category": "Subtitles",
|
||||||
|
"description": "Download subtitles from Thunder XMP",
|
||||||
|
"guid": "E4CE9DA9-EF00-417C-96F2-861C512D45EB",
|
||||||
|
"name": "MeiamSub.Thunder",
|
||||||
|
"owner": "Meiam",
|
||||||
|
"targetAbi": "10.11.0.0",
|
||||||
|
"timestamp": "2025-12-22T10:00:00.0000000Z",
|
||||||
|
"version": "1.0.13.0",
|
||||||
|
"status": "Active",
|
||||||
|
"imagePath": "thumb.png"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user