mirror of
https://github.com/real-zony/ZonyLrcToolsX.git
synced 2025-07-02 05:10:42 +00:00
parent
3705c6c8b5
commit
ffd76f5f2b
@ -1,3 +1,4 @@
|
|||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@ -38,6 +39,8 @@ namespace ZonyLrcTools.Cli.Infrastructure.Tag
|
|||||||
public virtual async ValueTask<MusicInfo> LoadTagAsync(string filePath)
|
public virtual async ValueTask<MusicInfo> LoadTagAsync(string filePath)
|
||||||
{
|
{
|
||||||
foreach (var provider in _sortedTagInfoProviders)
|
foreach (var provider in _sortedTagInfoProviders)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var info = await provider.LoadAsync(filePath);
|
var info = await provider.LoadAsync(filePath);
|
||||||
if (info != null)
|
if (info != null)
|
||||||
@ -46,9 +49,13 @@ namespace ZonyLrcTools.Cli.Infrastructure.Tag
|
|||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
// ignored
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Logger.LogWarning($"{filePath} 没有找到正确的标签信息,请考虑调整正则表达式。");
|
Logger.LogWarning($"{filePath} 没有找到正确的标签信息,请考虑调整正则表达式。");
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,7 +69,7 @@ namespace ZonyLrcTools.Cli.Infrastructure.Tag
|
|||||||
return Options.Provider.Tag.Plugin
|
return Options.Provider.Tag.Plugin
|
||||||
.Where(x => x.Priority != -1)
|
.Where(x => x.Priority != -1)
|
||||||
.OrderBy(x => x.Priority)
|
.OrderBy(x => x.Priority)
|
||||||
.Join(TagInfoProviders,x=>x.Name,y=>y.Name,(x,y)=>y);
|
.Join(TagInfoProviders, x => x.Name, y => y.Name, (x, y) => y);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void HandleBlockWord(MusicInfo info)
|
protected void HandleBlockWord(MusicInfo info)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user