From 740e8f4c63b28d55ae9a74c5e1ff0076919aaed9 Mon Sep 17 00:00:00 2001 From: real-zony Date: Thu, 6 Oct 2022 13:02:20 +0800 Subject: [PATCH] refactor: Common components are moved to the Common library. --- .../Commands/SubCommand/DownloadCommand.cs | 12 ++++++------ .../Commands/SubCommand/UtilityCommand.cs | 6 +++--- src/ZonyLrcTools.Cli/ZonyLrcTools.Cli.csproj | 7 ------- .../Album/IAlbumDownloader.cs | 4 +--- .../Album/InternalAlbumDownloaderNames.cs | 2 +- .../Album/NetEase/NetEaseAlbumDownloader.cs | 9 +++------ .../Album/QQMusic/QQMusicAlbumDownloader.cs | 7 ++----- .../Infrastructure/Extensions/LoggerHelper.cs} | 5 ++--- .../Infrastructure/Extensions/StringHelper.cs | 4 +--- .../Infrastructure/IO/FileScanner.cs | 9 ++------- .../Infrastructure/IO/FileScannerResult.cs | 4 +--- .../Infrastructure/IO/FileStreamExtensions.cs | 5 +---- .../Infrastructure/IO/IFileScanner.cs | 5 +---- .../Infrastructure/Threading/WarpTask.cs | 6 +----- .../Lyrics}/ILyricDownloader.cs | 4 +--- .../Lyrics}/ILyricItemCollectionFactory.cs | 2 +- .../Lyrics}/ILyricTextResolver.cs | 2 +- .../Lyrics}/InternalLyricDownloaderNames.cs | 2 +- .../Lyrics}/LyricDownloader.cs | 3 +-- .../Lyrics}/LyricDownloaderArgs.cs | 2 +- .../Lyrics}/LyricItem.cs | 3 +-- .../Lyrics}/LyricItemCollection.cs | 6 +----- .../Lyrics}/LyricItemCollectionFactory.cs | 2 +- .../KuGou/JsonModel/GetLyricAccessKeyRequest.cs | 2 +- .../KuGou/JsonModel/GetLyricAccessKeyResponse.cs | 3 +-- .../Providers}/KuGou/JsonModel/GetLyricRequest.cs | 2 +- .../Providers}/KuGou/JsonModel/SongSearchRequest.cs | 2 +- .../Providers}/KuGou/JsonModel/SongSearchResponse.cs | 5 ++--- .../Lyrics/Providers}/KuGou/KuGourLyricDownloader.cs | 6 ++---- .../Providers}/NetEase/JsonModel/GetLyricRequest.cs | 2 +- .../Providers}/NetEase/JsonModel/GetLyricResponse.cs | 2 +- .../NetEase/JsonModel/GetSongDetailsRequest.cs | 2 +- .../NetEase/JsonModel/SongSearchRequest.cs | 2 +- .../NetEase/JsonModel/SongSearchResponse.cs | 5 +---- .../JsonModel/SongSearchResponseStatusCode.cs | 2 +- .../Providers}/NetEase/NetEaseLyricDownloader.cs | 6 ++---- .../Providers}/QQMusic/JsonModel/GetLyricRequest.cs | 2 +- .../QQMusic/JsonModel/SongSearchRequest.cs | 2 +- .../QQMusic/JsonModel/SongSearchResponse.cs | 3 +-- .../Lyrics/Providers}/QQMusic/QQLyricDownloader.cs | 7 ++----- .../MusicDecryption/DecryptionResult.cs | 4 +--- .../MusicDecryption/IMusicDecryptor.cs | 4 +--- .../MusicDecryption/NcmMusicDecryptor.cs | 8 ++------ .../MusicInfo.cs | 4 +--- .../TagInfo}/BlockWordDictionary.cs | 0 .../TagInfo}/DefaultTagLoader.cs | 1 + .../TagInfo}/FileNameTagInfoProvider.cs | 1 + .../TagInfo}/IBlockWordDictionary.cs | 0 .../TagInfo}/ITagInfoProvider.cs | 1 + .../TagInfo}/ITagLoader.cs | 1 + .../TagInfo}/TaglibTagInfoProvider.cs | 1 + .../Updater/DefaultUpdater.cs | 9 +++------ .../Updater/JsonModel/NewVersionItem.cs | 2 +- .../Updater/JsonModel/NewVersionItemType.cs | 2 +- .../Updater/JsonModel/NewVersionResponse.cs | 5 +---- src/ZonyLrcTools.Common/ZonyLrcTools.Common.csproj | 5 +++++ tests/ZonyLrcTools.Tests/FileScannerTests.cs | 5 ++--- .../Album/NetEaseAlbumDownloader_Tests.cs | 2 +- .../Album/QQMusicAlbumDownloaderTests.cs | 2 +- .../Lyric/KuGouLyricDownloaderTests.cs | 3 +-- .../Infrastructure/Lyric/LyricCollectionTests.cs | 1 - .../Lyric/NetEaseLyricDownloaderTests.cs | 2 +- .../Infrastructure/Lyric/QQLyricDownloaderTests.cs | 3 +-- .../MusicDecryption/NcmMusicDecryptor_Tests.cs | 2 +- 64 files changed, 84 insertions(+), 150 deletions(-) rename src/{ZonyLrcTools.Cli/Infrastructure => ZonyLrcTools.Common}/Album/IAlbumDownloader.cs (88%) rename src/{ZonyLrcTools.Cli/Infrastructure => ZonyLrcTools.Common}/Album/InternalAlbumDownloaderNames.cs (89%) rename src/{ZonyLrcTools.Cli/Infrastructure => ZonyLrcTools.Common}/Album/NetEase/NetEaseAlbumDownloader.cs (91%) rename src/{ZonyLrcTools.Cli/Infrastructure => ZonyLrcTools.Common}/Album/QQMusic/QQMusicAlbumDownloader.cs (88%) rename src/{ZonyLrcTools.Cli/Infrastructure/Extensions/LoggerExtensions.cs => ZonyLrcTools.Common/Infrastructure/Extensions/LoggerHelper.cs} (95%) rename src/{ZonyLrcTools.Cli => ZonyLrcTools.Common}/Infrastructure/Extensions/StringHelper.cs (91%) rename src/{ZonyLrcTools.Cli => ZonyLrcTools.Common}/Infrastructure/IO/FileScanner.cs (90%) rename src/{ZonyLrcTools.Cli => ZonyLrcTools.Common}/Infrastructure/IO/FileScannerResult.cs (91%) rename src/{ZonyLrcTools.Cli => ZonyLrcTools.Common}/Infrastructure/IO/FileStreamExtensions.cs (93%) rename src/{ZonyLrcTools.Cli => ZonyLrcTools.Common}/Infrastructure/IO/IFileScanner.cs (81%) rename src/{ZonyLrcTools.Cli => ZonyLrcTools.Common}/Infrastructure/Threading/WarpTask.cs (95%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics}/ILyricDownloader.cs (90%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics}/ILyricItemCollectionFactory.cs (95%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics}/ILyricTextResolver.cs (69%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics}/InternalLyricDownloaderNames.cs (92%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics}/LyricDownloader.cs (96%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics}/LyricDownloaderArgs.cs (88%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics}/LyricItem.cs (98%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics}/LyricItemCollection.cs (96%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics}/LyricItemCollectionFactory.cs (97%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics/Providers}/KuGou/JsonModel/GetLyricAccessKeyRequest.cs (90%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics/Providers}/KuGou/JsonModel/GetLyricAccessKeyResponse.cs (84%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics/Providers}/KuGou/JsonModel/GetLyricRequest.cs (92%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics/Providers}/KuGou/JsonModel/SongSearchRequest.cs (92%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics/Providers}/KuGou/JsonModel/SongSearchResponse.cs (83%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics/Providers}/KuGou/KuGourLyricDownloader.cs (95%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics/Providers}/NetEase/JsonModel/GetLyricRequest.cs (92%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics/Providers}/NetEase/JsonModel/GetLyricResponse.cs (95%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics/Providers}/NetEase/JsonModel/GetSongDetailsRequest.cs (83%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics/Providers}/NetEase/JsonModel/SongSearchRequest.cs (96%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics/Providers}/NetEase/JsonModel/SongSearchResponse.cs (94%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics/Providers}/NetEase/JsonModel/SongSearchResponseStatusCode.cs (62%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics/Providers}/NetEase/NetEaseLyricDownloader.cs (95%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics/Providers}/QQMusic/JsonModel/GetLyricRequest.cs (92%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics/Providers}/QQMusic/JsonModel/SongSearchRequest.cs (93%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics/Providers}/QQMusic/JsonModel/SongSearchResponse.cs (85%) rename src/{ZonyLrcTools.Cli/Infrastructure/Lyric => ZonyLrcTools.Common/Lyrics/Providers}/QQMusic/QQLyricDownloader.cs (95%) rename src/{ZonyLrcTools.Cli/Infrastructure => ZonyLrcTools.Common}/MusicDecryption/DecryptionResult.cs (73%) rename src/{ZonyLrcTools.Cli/Infrastructure => ZonyLrcTools.Common}/MusicDecryption/IMusicDecryptor.cs (84%) rename src/{ZonyLrcTools.Cli/Infrastructure => ZonyLrcTools.Common}/MusicDecryption/NcmMusicDecryptor.cs (96%) rename src/{ZonyLrcTools.Cli/Infrastructure => ZonyLrcTools.Common}/MusicInfo.cs (95%) rename src/{ZonyLrcTools.Cli/Infrastructure/Tag => ZonyLrcTools.Common/TagInfo}/BlockWordDictionary.cs (100%) rename src/{ZonyLrcTools.Cli/Infrastructure/Tag => ZonyLrcTools.Common/TagInfo}/DefaultTagLoader.cs (99%) rename src/{ZonyLrcTools.Cli/Infrastructure/Tag => ZonyLrcTools.Common/TagInfo}/FileNameTagInfoProvider.cs (98%) rename src/{ZonyLrcTools.Cli/Infrastructure/Tag => ZonyLrcTools.Common/TagInfo}/IBlockWordDictionary.cs (100%) rename src/{ZonyLrcTools.Cli/Infrastructure/Tag => ZonyLrcTools.Common/TagInfo}/ITagInfoProvider.cs (95%) rename src/{ZonyLrcTools.Cli/Infrastructure/Tag => ZonyLrcTools.Common/TagInfo}/ITagLoader.cs (95%) rename src/{ZonyLrcTools.Cli/Infrastructure/Tag => ZonyLrcTools.Common/TagInfo}/TaglibTagInfoProvider.cs (98%) rename src/{ZonyLrcTools.Cli/Infrastructure => ZonyLrcTools.Common}/Updater/DefaultUpdater.cs (90%) rename src/{ZonyLrcTools.Cli/Infrastructure => ZonyLrcTools.Common}/Updater/JsonModel/NewVersionItem.cs (66%) rename src/{ZonyLrcTools.Cli/Infrastructure => ZonyLrcTools.Common}/Updater/JsonModel/NewVersionItemType.cs (53%) rename src/{ZonyLrcTools.Cli/Infrastructure => ZonyLrcTools.Common}/Updater/JsonModel/NewVersionResponse.cs (68%) diff --git a/src/ZonyLrcTools.Cli/Commands/SubCommand/DownloadCommand.cs b/src/ZonyLrcTools.Cli/Commands/SubCommand/DownloadCommand.cs index 947dcc2..d5892a9 100644 --- a/src/ZonyLrcTools.Cli/Commands/SubCommand/DownloadCommand.cs +++ b/src/ZonyLrcTools.Cli/Commands/SubCommand/DownloadCommand.cs @@ -8,15 +8,15 @@ using System.Threading.Tasks; using McMaster.Extensions.CommandLineUtils; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using ZonyLrcTools.Cli.Infrastructure; -using ZonyLrcTools.Cli.Infrastructure.Album; -using ZonyLrcTools.Cli.Infrastructure.Extensions; -using ZonyLrcTools.Cli.Infrastructure.IO; -using ZonyLrcTools.Cli.Infrastructure.Lyric; using ZonyLrcTools.Cli.Infrastructure.Tag; -using ZonyLrcTools.Cli.Infrastructure.Threading; +using ZonyLrcTools.Common; +using ZonyLrcTools.Common.Album; using ZonyLrcTools.Common.Configuration; using ZonyLrcTools.Common.Infrastructure.Exceptions; +using ZonyLrcTools.Common.Infrastructure.Extensions; +using ZonyLrcTools.Common.Infrastructure.IO; +using ZonyLrcTools.Common.Infrastructure.Threading; +using ZonyLrcTools.Common.Lyrics; using File = System.IO.File; namespace ZonyLrcTools.Cli.Commands.SubCommand diff --git a/src/ZonyLrcTools.Cli/Commands/SubCommand/UtilityCommand.cs b/src/ZonyLrcTools.Cli/Commands/SubCommand/UtilityCommand.cs index 8c048b0..c08bbb1 100644 --- a/src/ZonyLrcTools.Cli/Commands/SubCommand/UtilityCommand.cs +++ b/src/ZonyLrcTools.Cli/Commands/SubCommand/UtilityCommand.cs @@ -6,10 +6,10 @@ using System.Threading.Tasks; using McMaster.Extensions.CommandLineUtils; using Microsoft.Extensions.Logging; using Newtonsoft.Json.Linq; -using ZonyLrcTools.Cli.Infrastructure.IO; -using ZonyLrcTools.Cli.Infrastructure.MusicDecryption; -using ZonyLrcTools.Cli.Infrastructure.Threading; using ZonyLrcTools.Common.Infrastructure.Exceptions; +using ZonyLrcTools.Common.Infrastructure.IO; +using ZonyLrcTools.Common.Infrastructure.Threading; +using ZonyLrcTools.Common.MusicDecryption; namespace ZonyLrcTools.Cli.Commands.SubCommand { diff --git a/src/ZonyLrcTools.Cli/ZonyLrcTools.Cli.csproj b/src/ZonyLrcTools.Cli/ZonyLrcTools.Cli.csproj index 9069f1f..3370fa9 100644 --- a/src/ZonyLrcTools.Cli/ZonyLrcTools.Cli.csproj +++ b/src/ZonyLrcTools.Cli/ZonyLrcTools.Cli.csproj @@ -13,18 +13,11 @@ - - - - - - - diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Album/IAlbumDownloader.cs b/src/ZonyLrcTools.Common/Album/IAlbumDownloader.cs similarity index 88% rename from src/ZonyLrcTools.Cli/Infrastructure/Album/IAlbumDownloader.cs rename to src/ZonyLrcTools.Common/Album/IAlbumDownloader.cs index 3ce69ee..bc64282 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Album/IAlbumDownloader.cs +++ b/src/ZonyLrcTools.Common/Album/IAlbumDownloader.cs @@ -1,6 +1,4 @@ -using System.Threading.Tasks; - -namespace ZonyLrcTools.Cli.Infrastructure.Album +namespace ZonyLrcTools.Common.Album { /// /// 专辑封面下载器,用于匹配并下载歌曲的专辑封面。 diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Album/InternalAlbumDownloaderNames.cs b/src/ZonyLrcTools.Common/Album/InternalAlbumDownloaderNames.cs similarity index 89% rename from src/ZonyLrcTools.Cli/Infrastructure/Album/InternalAlbumDownloaderNames.cs rename to src/ZonyLrcTools.Common/Album/InternalAlbumDownloaderNames.cs index d2f921d..a690230 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Album/InternalAlbumDownloaderNames.cs +++ b/src/ZonyLrcTools.Common/Album/InternalAlbumDownloaderNames.cs @@ -1,4 +1,4 @@ -namespace ZonyLrcTools.Cli.Infrastructure.Album +namespace ZonyLrcTools.Common.Album { /// /// 定义了程序默认提供的专辑图像下载器。 diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Album/NetEase/NetEaseAlbumDownloader.cs b/src/ZonyLrcTools.Common/Album/NetEase/NetEaseAlbumDownloader.cs similarity index 91% rename from src/ZonyLrcTools.Cli/Infrastructure/Album/NetEase/NetEaseAlbumDownloader.cs rename to src/ZonyLrcTools.Common/Album/NetEase/NetEaseAlbumDownloader.cs index 6f96d36..9a62376 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Album/NetEase/NetEaseAlbumDownloader.cs +++ b/src/ZonyLrcTools.Common/Album/NetEase/NetEaseAlbumDownloader.cs @@ -1,14 +1,11 @@ -using System; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Threading.Tasks; +using System.Net.Http.Headers; using Newtonsoft.Json.Linq; -using ZonyLrcTools.Cli.Infrastructure.Lyric.NetEase.JsonModel; using ZonyLrcTools.Common.Infrastructure.DependencyInject; using ZonyLrcTools.Common.Infrastructure.Exceptions; using ZonyLrcTools.Common.Infrastructure.Network; +using ZonyLrcTools.Common.Lyrics.Providers.NetEase.JsonModel; -namespace ZonyLrcTools.Cli.Infrastructure.Album.NetEase +namespace ZonyLrcTools.Common.Album.NetEase { public class NetEaseAlbumDownloader : IAlbumDownloader, ITransientDependency { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Album/QQMusic/QQMusicAlbumDownloader.cs b/src/ZonyLrcTools.Common/Album/QQMusic/QQMusicAlbumDownloader.cs similarity index 88% rename from src/ZonyLrcTools.Cli/Infrastructure/Album/QQMusic/QQMusicAlbumDownloader.cs rename to src/ZonyLrcTools.Common/Album/QQMusic/QQMusicAlbumDownloader.cs index 5cf3c0f..001f9b3 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Album/QQMusic/QQMusicAlbumDownloader.cs +++ b/src/ZonyLrcTools.Common/Album/QQMusic/QQMusicAlbumDownloader.cs @@ -1,12 +1,9 @@ -using System; -using System.Net.Http; using System.Net.Http.Headers; -using System.Threading.Tasks; -using ZonyLrcTools.Cli.Infrastructure.Lyric.QQMusic.JsonModel; using ZonyLrcTools.Common.Infrastructure.DependencyInject; using ZonyLrcTools.Common.Infrastructure.Network; +using ZonyLrcTools.Common.Lyrics.Providers.QQMusic.JsonModel; -namespace ZonyLrcTools.Cli.Infrastructure.Album.QQMusic +namespace ZonyLrcTools.Common.Album.QQMusic { public class QQMusicAlbumDownloader : IAlbumDownloader, ITransientDependency { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Extensions/LoggerExtensions.cs b/src/ZonyLrcTools.Common/Infrastructure/Extensions/LoggerHelper.cs similarity index 95% rename from src/ZonyLrcTools.Cli/Infrastructure/Extensions/LoggerExtensions.cs rename to src/ZonyLrcTools.Common/Infrastructure/Extensions/LoggerHelper.cs index 8f5bb6d..87a950d 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Extensions/LoggerExtensions.cs +++ b/src/ZonyLrcTools.Common/Infrastructure/Extensions/LoggerHelper.cs @@ -1,15 +1,14 @@ -using System; using System.Text; using Microsoft.Extensions.Logging; using Newtonsoft.Json; using ZonyLrcTools.Common.Infrastructure.Exceptions; -namespace ZonyLrcTools.Cli.Infrastructure.Extensions +namespace ZonyLrcTools.Common.Infrastructure.Extensions { /// /// 日志记录相关的扩展方法。 /// - public static class LoggerExtensions + public static class LoggerHelper { /// /// 使用 级别打印错误日志,并记录异常堆栈。 diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Extensions/StringHelper.cs b/src/ZonyLrcTools.Common/Infrastructure/Extensions/StringHelper.cs similarity index 91% rename from src/ZonyLrcTools.Cli/Infrastructure/Extensions/StringHelper.cs rename to src/ZonyLrcTools.Common/Infrastructure/Extensions/StringHelper.cs index b1f2b4a..74128b2 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Extensions/StringHelper.cs +++ b/src/ZonyLrcTools.Common/Infrastructure/Extensions/StringHelper.cs @@ -1,6 +1,4 @@ -using System; - -namespace ZonyLrcTools.Cli.Infrastructure.Extensions +namespace ZonyLrcTools.Common.Infrastructure.Extensions { /// /// 字符串处理相关的工具方法。 diff --git a/src/ZonyLrcTools.Cli/Infrastructure/IO/FileScanner.cs b/src/ZonyLrcTools.Common/Infrastructure/IO/FileScanner.cs similarity index 90% rename from src/ZonyLrcTools.Cli/Infrastructure/IO/FileScanner.cs rename to src/ZonyLrcTools.Common/Infrastructure/IO/FileScanner.cs index ef8a010..c519d47 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/IO/FileScanner.cs +++ b/src/ZonyLrcTools.Common/Infrastructure/IO/FileScanner.cs @@ -1,16 +1,11 @@ -using System; using System.Collections.Concurrent; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; -using ZonyLrcTools.Cli.Infrastructure.Extensions; using ZonyLrcTools.Common.Infrastructure.DependencyInject; using ZonyLrcTools.Common.Infrastructure.Exceptions; +using ZonyLrcTools.Common.Infrastructure.Extensions; -namespace ZonyLrcTools.Cli.Infrastructure.IO +namespace ZonyLrcTools.Common.Infrastructure.IO { public class FileScanner : IFileScanner, ITransientDependency { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/IO/FileScannerResult.cs b/src/ZonyLrcTools.Common/Infrastructure/IO/FileScannerResult.cs similarity index 91% rename from src/ZonyLrcTools.Cli/Infrastructure/IO/FileScannerResult.cs rename to src/ZonyLrcTools.Common/Infrastructure/IO/FileScannerResult.cs index 985bdc6..816ccdc 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/IO/FileScannerResult.cs +++ b/src/ZonyLrcTools.Common/Infrastructure/IO/FileScannerResult.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; - -namespace ZonyLrcTools.Cli.Infrastructure.IO +namespace ZonyLrcTools.Common.Infrastructure.IO { /// /// 文件扫描结果对象。 diff --git a/src/ZonyLrcTools.Cli/Infrastructure/IO/FileStreamExtensions.cs b/src/ZonyLrcTools.Common/Infrastructure/IO/FileStreamExtensions.cs similarity index 93% rename from src/ZonyLrcTools.Cli/Infrastructure/IO/FileStreamExtensions.cs rename to src/ZonyLrcTools.Common/Infrastructure/IO/FileStreamExtensions.cs index 28dc6a5..5980625 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/IO/FileStreamExtensions.cs +++ b/src/ZonyLrcTools.Common/Infrastructure/IO/FileStreamExtensions.cs @@ -1,7 +1,4 @@ -using System.IO; -using System.Threading.Tasks; - -namespace ZonyLrcTools.Cli.Infrastructure.IO +namespace ZonyLrcTools.Common.Infrastructure.IO { public static class FileStreamExtensions { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/IO/IFileScanner.cs b/src/ZonyLrcTools.Common/Infrastructure/IO/IFileScanner.cs similarity index 81% rename from src/ZonyLrcTools.Cli/Infrastructure/IO/IFileScanner.cs rename to src/ZonyLrcTools.Common/Infrastructure/IO/IFileScanner.cs index 0de05a3..4eb4687 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/IO/IFileScanner.cs +++ b/src/ZonyLrcTools.Common/Infrastructure/IO/IFileScanner.cs @@ -1,7 +1,4 @@ -using System.Collections.Generic; -using System.Threading.Tasks; - -namespace ZonyLrcTools.Cli.Infrastructure.IO +namespace ZonyLrcTools.Common.Infrastructure.IO { /// /// 音乐文件扫描器,用于扫描音乐文件。 diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Threading/WarpTask.cs b/src/ZonyLrcTools.Common/Infrastructure/Threading/WarpTask.cs similarity index 95% rename from src/ZonyLrcTools.Cli/Infrastructure/Threading/WarpTask.cs rename to src/ZonyLrcTools.Common/Infrastructure/Threading/WarpTask.cs index 2a7df0a..6d165bb 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Threading/WarpTask.cs +++ b/src/ZonyLrcTools.Common/Infrastructure/Threading/WarpTask.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace ZonyLrcTools.Cli.Infrastructure.Threading +namespace ZonyLrcTools.Common.Infrastructure.Threading { /// /// 针对 Task 的包装类,基于信号量 限定并行度。 diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/ILyricDownloader.cs b/src/ZonyLrcTools.Common/Lyrics/ILyricDownloader.cs similarity index 90% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/ILyricDownloader.cs rename to src/ZonyLrcTools.Common/Lyrics/ILyricDownloader.cs index 78d5abe..9cb1287 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/ILyricDownloader.cs +++ b/src/ZonyLrcTools.Common/Lyrics/ILyricDownloader.cs @@ -1,6 +1,4 @@ -using System.Threading.Tasks; - -namespace ZonyLrcTools.Cli.Infrastructure.Lyric +namespace ZonyLrcTools.Common.Lyrics { /// /// 歌词数据下载器,用于匹配并下载歌曲的歌词。 diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/ILyricItemCollectionFactory.cs b/src/ZonyLrcTools.Common/Lyrics/ILyricItemCollectionFactory.cs similarity index 95% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/ILyricItemCollectionFactory.cs rename to src/ZonyLrcTools.Common/Lyrics/ILyricItemCollectionFactory.cs index e8324dd..efe4b46 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/ILyricItemCollectionFactory.cs +++ b/src/ZonyLrcTools.Common/Lyrics/ILyricItemCollectionFactory.cs @@ -1,4 +1,4 @@ -namespace ZonyLrcTools.Cli.Infrastructure.Lyric +namespace ZonyLrcTools.Common.Lyrics { /// /// 构建 对象的工厂。 diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/ILyricTextResolver.cs b/src/ZonyLrcTools.Common/Lyrics/ILyricTextResolver.cs similarity index 69% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/ILyricTextResolver.cs rename to src/ZonyLrcTools.Common/Lyrics/ILyricTextResolver.cs index 360640d..c2d35e2 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/ILyricTextResolver.cs +++ b/src/ZonyLrcTools.Common/Lyrics/ILyricTextResolver.cs @@ -1,4 +1,4 @@ -namespace ZonyLrcTools.Cli.Infrastructure.Lyric +namespace ZonyLrcTools.Common.Lyrics { public interface ILyricTextResolver { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/InternalLyricDownloaderNames.cs b/src/ZonyLrcTools.Common/Lyrics/InternalLyricDownloaderNames.cs similarity index 92% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/InternalLyricDownloaderNames.cs rename to src/ZonyLrcTools.Common/Lyrics/InternalLyricDownloaderNames.cs index 2dafcef..8bf69e0 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/InternalLyricDownloaderNames.cs +++ b/src/ZonyLrcTools.Common/Lyrics/InternalLyricDownloaderNames.cs @@ -1,4 +1,4 @@ -namespace ZonyLrcTools.Cli.Infrastructure.Lyric +namespace ZonyLrcTools.Common.Lyrics { /// /// 定义了程序默认提供的歌词下载器。 diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/LyricDownloader.cs b/src/ZonyLrcTools.Common/Lyrics/LyricDownloader.cs similarity index 96% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/LyricDownloader.cs rename to src/ZonyLrcTools.Common/Lyrics/LyricDownloader.cs index 16ceac6..abb573e 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/LyricDownloader.cs +++ b/src/ZonyLrcTools.Common/Lyrics/LyricDownloader.cs @@ -1,8 +1,7 @@ -using System.Threading.Tasks; using ZonyLrcTools.Common.Infrastructure.DependencyInject; using ZonyLrcTools.Common.Infrastructure.Exceptions; -namespace ZonyLrcTools.Cli.Infrastructure.Lyric +namespace ZonyLrcTools.Common.Lyrics { /// /// 歌词下载器的基类,定义了歌词下载器的常规逻辑。 diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/LyricDownloaderArgs.cs b/src/ZonyLrcTools.Common/Lyrics/LyricDownloaderArgs.cs similarity index 88% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/LyricDownloaderArgs.cs rename to src/ZonyLrcTools.Common/Lyrics/LyricDownloaderArgs.cs index e2f0124..1cec2c2 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/LyricDownloaderArgs.cs +++ b/src/ZonyLrcTools.Common/Lyrics/LyricDownloaderArgs.cs @@ -1,4 +1,4 @@ -namespace ZonyLrcTools.Cli.Infrastructure.Lyric +namespace ZonyLrcTools.Common.Lyrics { public class LyricDownloaderArgs { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/LyricItem.cs b/src/ZonyLrcTools.Common/Lyrics/LyricItem.cs similarity index 98% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/LyricItem.cs rename to src/ZonyLrcTools.Common/Lyrics/LyricItem.cs index 2eb7483..ba43556 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/LyricItem.cs +++ b/src/ZonyLrcTools.Common/Lyrics/LyricItem.cs @@ -1,7 +1,6 @@ -using System; using System.Text.RegularExpressions; -namespace ZonyLrcTools.Cli.Infrastructure.Lyric +namespace ZonyLrcTools.Common.Lyrics { /// /// 歌词的行对象,是 的最小单位。。 diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/LyricItemCollection.cs b/src/ZonyLrcTools.Common/Lyrics/LyricItemCollection.cs similarity index 96% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/LyricItemCollection.cs rename to src/ZonyLrcTools.Common/Lyrics/LyricItemCollection.cs index dbce48d..fb7fc98 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/LyricItemCollection.cs +++ b/src/ZonyLrcTools.Common/Lyrics/LyricItemCollection.cs @@ -1,12 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; using System.Text; -using ZonyLrcTools.Cli.Infrastructure.Extensions; using ZonyLrcTools.Common.Configuration; using ZonyLrcTools.Common.Infrastructure.Extensions; -namespace ZonyLrcTools.Cli.Infrastructure.Lyric +namespace ZonyLrcTools.Common.Lyrics { /// /// 歌词数据,包含多条歌词行对象()。 diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/LyricItemCollectionFactory.cs b/src/ZonyLrcTools.Common/Lyrics/LyricItemCollectionFactory.cs similarity index 97% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/LyricItemCollectionFactory.cs rename to src/ZonyLrcTools.Common/Lyrics/LyricItemCollectionFactory.cs index ec79ea7..26a520c 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/LyricItemCollectionFactory.cs +++ b/src/ZonyLrcTools.Common/Lyrics/LyricItemCollectionFactory.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.Options; using ZonyLrcTools.Common.Configuration; using ZonyLrcTools.Common.Infrastructure.DependencyInject; -namespace ZonyLrcTools.Cli.Infrastructure.Lyric +namespace ZonyLrcTools.Common.Lyrics { /// /// 的默认实现。 diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/KuGou/JsonModel/GetLyricAccessKeyRequest.cs b/src/ZonyLrcTools.Common/Lyrics/Providers/KuGou/JsonModel/GetLyricAccessKeyRequest.cs similarity index 90% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/KuGou/JsonModel/GetLyricAccessKeyRequest.cs rename to src/ZonyLrcTools.Common/Lyrics/Providers/KuGou/JsonModel/GetLyricAccessKeyRequest.cs index 113cbba..c31f94e 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/KuGou/JsonModel/GetLyricAccessKeyRequest.cs +++ b/src/ZonyLrcTools.Common/Lyrics/Providers/KuGou/JsonModel/GetLyricAccessKeyRequest.cs @@ -1,6 +1,6 @@ using Newtonsoft.Json; -namespace ZonyLrcTools.Cli.Infrastructure.Lyric.KuGou.JsonModel +namespace ZonyLrcTools.Common.Lyrics.Providers.KuGou.JsonModel { public class GetLyricAccessKeyRequest { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/KuGou/JsonModel/GetLyricAccessKeyResponse.cs b/src/ZonyLrcTools.Common/Lyrics/Providers/KuGou/JsonModel/GetLyricAccessKeyResponse.cs similarity index 84% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/KuGou/JsonModel/GetLyricAccessKeyResponse.cs rename to src/ZonyLrcTools.Common/Lyrics/Providers/KuGou/JsonModel/GetLyricAccessKeyResponse.cs index 400f4c1..e938d09 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/KuGou/JsonModel/GetLyricAccessKeyResponse.cs +++ b/src/ZonyLrcTools.Common/Lyrics/Providers/KuGou/JsonModel/GetLyricAccessKeyResponse.cs @@ -1,7 +1,6 @@ -using System.Collections.Generic; using Newtonsoft.Json; -namespace ZonyLrcTools.Cli.Infrastructure.Lyric.KuGou.JsonModel +namespace ZonyLrcTools.Common.Lyrics.Providers.KuGou.JsonModel { public class GetLyricAccessKeyResponse { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/KuGou/JsonModel/GetLyricRequest.cs b/src/ZonyLrcTools.Common/Lyrics/Providers/KuGou/JsonModel/GetLyricRequest.cs similarity index 92% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/KuGou/JsonModel/GetLyricRequest.cs rename to src/ZonyLrcTools.Common/Lyrics/Providers/KuGou/JsonModel/GetLyricRequest.cs index 8cfe042..7ba3380 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/KuGou/JsonModel/GetLyricRequest.cs +++ b/src/ZonyLrcTools.Common/Lyrics/Providers/KuGou/JsonModel/GetLyricRequest.cs @@ -1,6 +1,6 @@ using Newtonsoft.Json; -namespace ZonyLrcTools.Cli.Infrastructure.Lyric.KuGou.JsonModel +namespace ZonyLrcTools.Common.Lyrics.Providers.KuGou.JsonModel { public class GetLyricRequest { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/KuGou/JsonModel/SongSearchRequest.cs b/src/ZonyLrcTools.Common/Lyrics/Providers/KuGou/JsonModel/SongSearchRequest.cs similarity index 92% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/KuGou/JsonModel/SongSearchRequest.cs rename to src/ZonyLrcTools.Common/Lyrics/Providers/KuGou/JsonModel/SongSearchRequest.cs index b0c4ec4..0d31726 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/KuGou/JsonModel/SongSearchRequest.cs +++ b/src/ZonyLrcTools.Common/Lyrics/Providers/KuGou/JsonModel/SongSearchRequest.cs @@ -2,7 +2,7 @@ using System.Web; using Newtonsoft.Json; -namespace ZonyLrcTools.Cli.Infrastructure.Lyric.KuGou.JsonModel +namespace ZonyLrcTools.Common.Lyrics.Providers.KuGou.JsonModel { public class SongSearchRequest { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/KuGou/JsonModel/SongSearchResponse.cs b/src/ZonyLrcTools.Common/Lyrics/Providers/KuGou/JsonModel/SongSearchResponse.cs similarity index 83% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/KuGou/JsonModel/SongSearchResponse.cs rename to src/ZonyLrcTools.Common/Lyrics/Providers/KuGou/JsonModel/SongSearchResponse.cs index 26ed934..c1178ad 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/KuGou/JsonModel/SongSearchResponse.cs +++ b/src/ZonyLrcTools.Common/Lyrics/Providers/KuGou/JsonModel/SongSearchResponse.cs @@ -1,7 +1,6 @@ -using System.Collections.Generic; -using Newtonsoft.Json; +using Newtonsoft.Json; -namespace ZonyLrcTools.Cli.Infrastructure.Lyric.KuGou.JsonModel +namespace ZonyLrcTools.Common.Lyrics.Providers.KuGou.JsonModel { public class SongSearchResponse { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/KuGou/KuGourLyricDownloader.cs b/src/ZonyLrcTools.Common/Lyrics/Providers/KuGou/KuGourLyricDownloader.cs similarity index 95% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/KuGou/KuGourLyricDownloader.cs rename to src/ZonyLrcTools.Common/Lyrics/Providers/KuGou/KuGourLyricDownloader.cs index 8a06221..c323f83 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/KuGou/KuGourLyricDownloader.cs +++ b/src/ZonyLrcTools.Common/Lyrics/Providers/KuGou/KuGourLyricDownloader.cs @@ -1,14 +1,12 @@ -using System; using System.Text; -using System.Threading.Tasks; using Microsoft.Extensions.Options; using Newtonsoft.Json.Linq; -using ZonyLrcTools.Cli.Infrastructure.Lyric.KuGou.JsonModel; using ZonyLrcTools.Common.Configuration; using ZonyLrcTools.Common.Infrastructure.Exceptions; using ZonyLrcTools.Common.Infrastructure.Network; +using ZonyLrcTools.Common.Lyrics.Providers.KuGou.JsonModel; -namespace ZonyLrcTools.Cli.Infrastructure.Lyric.KuGou +namespace ZonyLrcTools.Common.Lyrics.Providers.KuGou { public class KuGourLyricDownloader : LyricDownloader { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/NetEase/JsonModel/GetLyricRequest.cs b/src/ZonyLrcTools.Common/Lyrics/Providers/NetEase/JsonModel/GetLyricRequest.cs similarity index 92% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/NetEase/JsonModel/GetLyricRequest.cs rename to src/ZonyLrcTools.Common/Lyrics/Providers/NetEase/JsonModel/GetLyricRequest.cs index 602a7e6..98a5be8 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/NetEase/JsonModel/GetLyricRequest.cs +++ b/src/ZonyLrcTools.Common/Lyrics/Providers/NetEase/JsonModel/GetLyricRequest.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; // ReSharper disable InconsistentNaming -namespace ZonyLrcTools.Cli.Infrastructure.Lyric.NetEase.JsonModel +namespace ZonyLrcTools.Common.Lyrics.Providers.NetEase.JsonModel { public class GetLyricRequest { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/NetEase/JsonModel/GetLyricResponse.cs b/src/ZonyLrcTools.Common/Lyrics/Providers/NetEase/JsonModel/GetLyricResponse.cs similarity index 95% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/NetEase/JsonModel/GetLyricResponse.cs rename to src/ZonyLrcTools.Common/Lyrics/Providers/NetEase/JsonModel/GetLyricResponse.cs index 12d372f..1461b5a 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/NetEase/JsonModel/GetLyricResponse.cs +++ b/src/ZonyLrcTools.Common/Lyrics/Providers/NetEase/JsonModel/GetLyricResponse.cs @@ -1,6 +1,6 @@ using Newtonsoft.Json; -namespace ZonyLrcTools.Cli.Infrastructure.Lyric.NetEase.JsonModel +namespace ZonyLrcTools.Common.Lyrics.Providers.NetEase.JsonModel { public class GetLyricResponse { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/NetEase/JsonModel/GetSongDetailsRequest.cs b/src/ZonyLrcTools.Common/Lyrics/Providers/NetEase/JsonModel/GetSongDetailsRequest.cs similarity index 83% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/NetEase/JsonModel/GetSongDetailsRequest.cs rename to src/ZonyLrcTools.Common/Lyrics/Providers/NetEase/JsonModel/GetSongDetailsRequest.cs index 5934c70..183602e 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/NetEase/JsonModel/GetSongDetailsRequest.cs +++ b/src/ZonyLrcTools.Common/Lyrics/Providers/NetEase/JsonModel/GetSongDetailsRequest.cs @@ -1,6 +1,6 @@ using Newtonsoft.Json; -namespace ZonyLrcTools.Cli.Infrastructure.Lyric.NetEase.JsonModel +namespace ZonyLrcTools.Common.Lyrics.Providers.NetEase.JsonModel { public class GetSongDetailsRequest { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/NetEase/JsonModel/SongSearchRequest.cs b/src/ZonyLrcTools.Common/Lyrics/Providers/NetEase/JsonModel/SongSearchRequest.cs similarity index 96% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/NetEase/JsonModel/SongSearchRequest.cs rename to src/ZonyLrcTools.Common/Lyrics/Providers/NetEase/JsonModel/SongSearchRequest.cs index 88600d0..14df5e8 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/NetEase/JsonModel/SongSearchRequest.cs +++ b/src/ZonyLrcTools.Common/Lyrics/Providers/NetEase/JsonModel/SongSearchRequest.cs @@ -3,7 +3,7 @@ using System.Text.RegularExpressions; using System.Web; using Newtonsoft.Json; -namespace ZonyLrcTools.Cli.Infrastructure.Lyric.NetEase.JsonModel +namespace ZonyLrcTools.Common.Lyrics.Providers.NetEase.JsonModel { public class SongSearchRequest { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/NetEase/JsonModel/SongSearchResponse.cs b/src/ZonyLrcTools.Common/Lyrics/Providers/NetEase/JsonModel/SongSearchResponse.cs similarity index 94% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/NetEase/JsonModel/SongSearchResponse.cs rename to src/ZonyLrcTools.Common/Lyrics/Providers/NetEase/JsonModel/SongSearchResponse.cs index cafffc5..6955e70 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/NetEase/JsonModel/SongSearchResponse.cs +++ b/src/ZonyLrcTools.Common/Lyrics/Providers/NetEase/JsonModel/SongSearchResponse.cs @@ -1,9 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; using Newtonsoft.Json; -namespace ZonyLrcTools.Cli.Infrastructure.Lyric.NetEase.JsonModel +namespace ZonyLrcTools.Common.Lyrics.Providers.NetEase.JsonModel { public class SongSearchResponse { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/NetEase/JsonModel/SongSearchResponseStatusCode.cs b/src/ZonyLrcTools.Common/Lyrics/Providers/NetEase/JsonModel/SongSearchResponseStatusCode.cs similarity index 62% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/NetEase/JsonModel/SongSearchResponseStatusCode.cs rename to src/ZonyLrcTools.Common/Lyrics/Providers/NetEase/JsonModel/SongSearchResponseStatusCode.cs index 87a03e7..eb5cdea 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/NetEase/JsonModel/SongSearchResponseStatusCode.cs +++ b/src/ZonyLrcTools.Common/Lyrics/Providers/NetEase/JsonModel/SongSearchResponseStatusCode.cs @@ -1,4 +1,4 @@ -namespace ZonyLrcTools.Cli.Infrastructure.Lyric.NetEase.JsonModel +namespace ZonyLrcTools.Common.Lyrics.Providers.NetEase.JsonModel { public static class SongSearchResponseStatusCode { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/NetEase/NetEaseLyricDownloader.cs b/src/ZonyLrcTools.Common/Lyrics/Providers/NetEase/NetEaseLyricDownloader.cs similarity index 95% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/NetEase/NetEaseLyricDownloader.cs rename to src/ZonyLrcTools.Common/Lyrics/Providers/NetEase/NetEaseLyricDownloader.cs index bacfcc9..30dd3c9 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/NetEase/NetEaseLyricDownloader.cs +++ b/src/ZonyLrcTools.Common/Lyrics/Providers/NetEase/NetEaseLyricDownloader.cs @@ -1,15 +1,13 @@ -using System; using System.Net.Http.Headers; using System.Text; -using System.Threading.Tasks; using Microsoft.Extensions.Options; using Newtonsoft.Json; -using ZonyLrcTools.Cli.Infrastructure.Lyric.NetEase.JsonModel; using ZonyLrcTools.Common.Configuration; using ZonyLrcTools.Common.Infrastructure.Exceptions; using ZonyLrcTools.Common.Infrastructure.Network; +using ZonyLrcTools.Common.Lyrics.Providers.NetEase.JsonModel; -namespace ZonyLrcTools.Cli.Infrastructure.Lyric.NetEase +namespace ZonyLrcTools.Common.Lyrics.Providers.NetEase { public class NetEaseLyricDownloader : LyricDownloader { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/QQMusic/JsonModel/GetLyricRequest.cs b/src/ZonyLrcTools.Common/Lyrics/Providers/QQMusic/JsonModel/GetLyricRequest.cs similarity index 92% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/QQMusic/JsonModel/GetLyricRequest.cs rename to src/ZonyLrcTools.Common/Lyrics/Providers/QQMusic/JsonModel/GetLyricRequest.cs index c822221..5c9f10e 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/QQMusic/JsonModel/GetLyricRequest.cs +++ b/src/ZonyLrcTools.Common/Lyrics/Providers/QQMusic/JsonModel/GetLyricRequest.cs @@ -1,6 +1,6 @@ using Newtonsoft.Json; -namespace ZonyLrcTools.Cli.Infrastructure.Lyric.QQMusic.JsonModel +namespace ZonyLrcTools.Common.Lyrics.Providers.QQMusic.JsonModel { public class GetLyricRequest { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/QQMusic/JsonModel/SongSearchRequest.cs b/src/ZonyLrcTools.Common/Lyrics/Providers/QQMusic/JsonModel/SongSearchRequest.cs similarity index 93% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/QQMusic/JsonModel/SongSearchRequest.cs rename to src/ZonyLrcTools.Common/Lyrics/Providers/QQMusic/JsonModel/SongSearchRequest.cs index 98f4e9f..b0118c8 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/QQMusic/JsonModel/SongSearchRequest.cs +++ b/src/ZonyLrcTools.Common/Lyrics/Providers/QQMusic/JsonModel/SongSearchRequest.cs @@ -2,7 +2,7 @@ using System.Text; using System.Web; using Newtonsoft.Json; -namespace ZonyLrcTools.Cli.Infrastructure.Lyric.QQMusic.JsonModel +namespace ZonyLrcTools.Common.Lyrics.Providers.QQMusic.JsonModel { public class SongSearchRequest { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/QQMusic/JsonModel/SongSearchResponse.cs b/src/ZonyLrcTools.Common/Lyrics/Providers/QQMusic/JsonModel/SongSearchResponse.cs similarity index 85% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/QQMusic/JsonModel/SongSearchResponse.cs rename to src/ZonyLrcTools.Common/Lyrics/Providers/QQMusic/JsonModel/SongSearchResponse.cs index 8536631..fd14878 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/QQMusic/JsonModel/SongSearchResponse.cs +++ b/src/ZonyLrcTools.Common/Lyrics/Providers/QQMusic/JsonModel/SongSearchResponse.cs @@ -1,7 +1,6 @@ -using System.Collections.Generic; using Newtonsoft.Json; -namespace ZonyLrcTools.Cli.Infrastructure.Lyric.QQMusic.JsonModel +namespace ZonyLrcTools.Common.Lyrics.Providers.QQMusic.JsonModel { public class SongSearchResponse { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/QQMusic/QQLyricDownloader.cs b/src/ZonyLrcTools.Common/Lyrics/Providers/QQMusic/QQLyricDownloader.cs similarity index 95% rename from src/ZonyLrcTools.Cli/Infrastructure/Lyric/QQMusic/QQLyricDownloader.cs rename to src/ZonyLrcTools.Common/Lyrics/Providers/QQMusic/QQLyricDownloader.cs index a8ffc24..292ff30 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Lyric/QQMusic/QQLyricDownloader.cs +++ b/src/ZonyLrcTools.Common/Lyrics/Providers/QQMusic/QQLyricDownloader.cs @@ -1,14 +1,11 @@ -using System; -using System.Linq; using System.Text; -using System.Threading.Tasks; using System.Web; using Newtonsoft.Json.Linq; -using ZonyLrcTools.Cli.Infrastructure.Lyric.QQMusic.JsonModel; using ZonyLrcTools.Common.Infrastructure.Exceptions; using ZonyLrcTools.Common.Infrastructure.Network; +using ZonyLrcTools.Common.Lyrics.Providers.QQMusic.JsonModel; -namespace ZonyLrcTools.Cli.Infrastructure.Lyric.QQMusic +namespace ZonyLrcTools.Common.Lyrics.Providers.QQMusic { public class QQLyricDownloader : LyricDownloader { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/MusicDecryption/DecryptionResult.cs b/src/ZonyLrcTools.Common/MusicDecryption/DecryptionResult.cs similarity index 73% rename from src/ZonyLrcTools.Cli/Infrastructure/MusicDecryption/DecryptionResult.cs rename to src/ZonyLrcTools.Common/MusicDecryption/DecryptionResult.cs index 67b5c1c..a5e53fc 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/MusicDecryption/DecryptionResult.cs +++ b/src/ZonyLrcTools.Common/MusicDecryption/DecryptionResult.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; - -namespace ZonyLrcTools.Cli.Infrastructure.MusicDecryption +namespace ZonyLrcTools.Common.MusicDecryption { public class DecryptionResult { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/MusicDecryption/IMusicDecryptor.cs b/src/ZonyLrcTools.Common/MusicDecryption/IMusicDecryptor.cs similarity index 84% rename from src/ZonyLrcTools.Cli/Infrastructure/MusicDecryption/IMusicDecryptor.cs rename to src/ZonyLrcTools.Common/MusicDecryption/IMusicDecryptor.cs index 6e5036e..0e3a707 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/MusicDecryption/IMusicDecryptor.cs +++ b/src/ZonyLrcTools.Common/MusicDecryption/IMusicDecryptor.cs @@ -1,6 +1,4 @@ -using System.Threading.Tasks; - -namespace ZonyLrcTools.Cli.Infrastructure.MusicDecryption +namespace ZonyLrcTools.Common.MusicDecryption { /// /// 音乐解密器,用于将加密的歌曲数据,转换为可识别的歌曲格式。 diff --git a/src/ZonyLrcTools.Cli/Infrastructure/MusicDecryption/NcmMusicDecryptor.cs b/src/ZonyLrcTools.Common/MusicDecryption/NcmMusicDecryptor.cs similarity index 96% rename from src/ZonyLrcTools.Cli/Infrastructure/MusicDecryption/NcmMusicDecryptor.cs rename to src/ZonyLrcTools.Common/MusicDecryption/NcmMusicDecryptor.cs index 329d35d..96154de 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/MusicDecryption/NcmMusicDecryptor.cs +++ b/src/ZonyLrcTools.Common/MusicDecryption/NcmMusicDecryptor.cs @@ -1,13 +1,9 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Security.Cryptography; +using System.Security.Cryptography; using System.Text; -using System.Threading.Tasks; using Newtonsoft.Json.Linq; using ZonyLrcTools.Common.Infrastructure.DependencyInject; -namespace ZonyLrcTools.Cli.Infrastructure.MusicDecryption +namespace ZonyLrcTools.Common.MusicDecryption { /// /// NCM 音乐转换器,用于将 NCM 格式的音乐转换为可播放的格式。 diff --git a/src/ZonyLrcTools.Cli/Infrastructure/MusicInfo.cs b/src/ZonyLrcTools.Common/MusicInfo.cs similarity index 95% rename from src/ZonyLrcTools.Cli/Infrastructure/MusicInfo.cs rename to src/ZonyLrcTools.Common/MusicInfo.cs index a0cb5b9..1c3da9d 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/MusicInfo.cs +++ b/src/ZonyLrcTools.Common/MusicInfo.cs @@ -1,6 +1,4 @@ -using System; - -namespace ZonyLrcTools.Cli.Infrastructure +namespace ZonyLrcTools.Common { /// /// 歌曲信息的承载类,携带歌曲的相关数据。 diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Tag/BlockWordDictionary.cs b/src/ZonyLrcTools.Common/TagInfo/BlockWordDictionary.cs similarity index 100% rename from src/ZonyLrcTools.Cli/Infrastructure/Tag/BlockWordDictionary.cs rename to src/ZonyLrcTools.Common/TagInfo/BlockWordDictionary.cs diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Tag/DefaultTagLoader.cs b/src/ZonyLrcTools.Common/TagInfo/DefaultTagLoader.cs similarity index 99% rename from src/ZonyLrcTools.Cli/Infrastructure/Tag/DefaultTagLoader.cs rename to src/ZonyLrcTools.Common/TagInfo/DefaultTagLoader.cs index c88a030..3d1130c 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Tag/DefaultTagLoader.cs +++ b/src/ZonyLrcTools.Common/TagInfo/DefaultTagLoader.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using ZonyLrcTools.Common; using ZonyLrcTools.Common.Configuration; using ZonyLrcTools.Common.Infrastructure.DependencyInject; using ZonyLrcTools.Common.Infrastructure.Exceptions; diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Tag/FileNameTagInfoProvider.cs b/src/ZonyLrcTools.Common/TagInfo/FileNameTagInfoProvider.cs similarity index 98% rename from src/ZonyLrcTools.Cli/Infrastructure/Tag/FileNameTagInfoProvider.cs rename to src/ZonyLrcTools.Common/TagInfo/FileNameTagInfoProvider.cs index 287146a..b93e188 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Tag/FileNameTagInfoProvider.cs +++ b/src/ZonyLrcTools.Common/TagInfo/FileNameTagInfoProvider.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Text.RegularExpressions; using System.Threading.Tasks; using Microsoft.Extensions.Options; +using ZonyLrcTools.Common; using ZonyLrcTools.Common.Configuration; using ZonyLrcTools.Common.Infrastructure.DependencyInject; diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Tag/IBlockWordDictionary.cs b/src/ZonyLrcTools.Common/TagInfo/IBlockWordDictionary.cs similarity index 100% rename from src/ZonyLrcTools.Cli/Infrastructure/Tag/IBlockWordDictionary.cs rename to src/ZonyLrcTools.Common/TagInfo/IBlockWordDictionary.cs diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Tag/ITagInfoProvider.cs b/src/ZonyLrcTools.Common/TagInfo/ITagInfoProvider.cs similarity index 95% rename from src/ZonyLrcTools.Cli/Infrastructure/Tag/ITagInfoProvider.cs rename to src/ZonyLrcTools.Common/TagInfo/ITagInfoProvider.cs index e479196..39e097b 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Tag/ITagInfoProvider.cs +++ b/src/ZonyLrcTools.Common/TagInfo/ITagInfoProvider.cs @@ -1,4 +1,5 @@ using System.Threading.Tasks; +using ZonyLrcTools.Common; namespace ZonyLrcTools.Cli.Infrastructure.Tag { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Tag/ITagLoader.cs b/src/ZonyLrcTools.Common/TagInfo/ITagLoader.cs similarity index 95% rename from src/ZonyLrcTools.Cli/Infrastructure/Tag/ITagLoader.cs rename to src/ZonyLrcTools.Common/TagInfo/ITagLoader.cs index a5e0006..cfa4f00 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Tag/ITagLoader.cs +++ b/src/ZonyLrcTools.Common/TagInfo/ITagLoader.cs @@ -1,4 +1,5 @@ using System.Threading.Tasks; +using ZonyLrcTools.Common; namespace ZonyLrcTools.Cli.Infrastructure.Tag { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Tag/TaglibTagInfoProvider.cs b/src/ZonyLrcTools.Common/TagInfo/TaglibTagInfoProvider.cs similarity index 98% rename from src/ZonyLrcTools.Cli/Infrastructure/Tag/TaglibTagInfoProvider.cs rename to src/ZonyLrcTools.Common/TagInfo/TaglibTagInfoProvider.cs index e20d58a..a16dff3 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Tag/TaglibTagInfoProvider.cs +++ b/src/ZonyLrcTools.Common/TagInfo/TaglibTagInfoProvider.cs @@ -1,5 +1,6 @@ using System; using System.Threading.Tasks; +using ZonyLrcTools.Common; using ZonyLrcTools.Common.Infrastructure.DependencyInject; using ZonyLrcTools.Common.Infrastructure.Exceptions; diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Updater/DefaultUpdater.cs b/src/ZonyLrcTools.Common/Updater/DefaultUpdater.cs similarity index 90% rename from src/ZonyLrcTools.Cli/Infrastructure/Updater/DefaultUpdater.cs rename to src/ZonyLrcTools.Common/Updater/DefaultUpdater.cs index 4b38225..c79d7db 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Updater/DefaultUpdater.cs +++ b/src/ZonyLrcTools.Common/Updater/DefaultUpdater.cs @@ -1,14 +1,11 @@ -using System; -using System.Diagnostics; -using System.Linq; +using System.Diagnostics; using System.Reflection; -using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using ZonyLrcTools.Cli.Infrastructure.Updater.JsonModel; using ZonyLrcTools.Common.Infrastructure.DependencyInject; using ZonyLrcTools.Common.Infrastructure.Network; +using ZonyLrcTools.Common.Updater.JsonModel; -namespace ZonyLrcTools.Cli.Infrastructure.Updater; +namespace ZonyLrcTools.Common.Updater; public class DefaultUpdater : ISingletonDependency { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Updater/JsonModel/NewVersionItem.cs b/src/ZonyLrcTools.Common/Updater/JsonModel/NewVersionItem.cs similarity index 66% rename from src/ZonyLrcTools.Cli/Infrastructure/Updater/JsonModel/NewVersionItem.cs rename to src/ZonyLrcTools.Common/Updater/JsonModel/NewVersionItem.cs index f183b0e..23773ee 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Updater/JsonModel/NewVersionItem.cs +++ b/src/ZonyLrcTools.Common/Updater/JsonModel/NewVersionItem.cs @@ -1,4 +1,4 @@ -namespace ZonyLrcTools.Cli.Infrastructure.Updater.JsonModel; +namespace ZonyLrcTools.Common.Updater.JsonModel; public class NewVersionItem { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Updater/JsonModel/NewVersionItemType.cs b/src/ZonyLrcTools.Common/Updater/JsonModel/NewVersionItemType.cs similarity index 53% rename from src/ZonyLrcTools.Cli/Infrastructure/Updater/JsonModel/NewVersionItemType.cs rename to src/ZonyLrcTools.Common/Updater/JsonModel/NewVersionItemType.cs index b68b36a..4aa502c 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Updater/JsonModel/NewVersionItemType.cs +++ b/src/ZonyLrcTools.Common/Updater/JsonModel/NewVersionItemType.cs @@ -1,4 +1,4 @@ -namespace ZonyLrcTools.Cli.Infrastructure.Updater.JsonModel; +namespace ZonyLrcTools.Common.Updater.JsonModel; public enum NewVersionItemType { diff --git a/src/ZonyLrcTools.Cli/Infrastructure/Updater/JsonModel/NewVersionResponse.cs b/src/ZonyLrcTools.Common/Updater/JsonModel/NewVersionResponse.cs similarity index 68% rename from src/ZonyLrcTools.Cli/Infrastructure/Updater/JsonModel/NewVersionResponse.cs rename to src/ZonyLrcTools.Common/Updater/JsonModel/NewVersionResponse.cs index b5d0b9e..7fa9eb9 100644 --- a/src/ZonyLrcTools.Cli/Infrastructure/Updater/JsonModel/NewVersionResponse.cs +++ b/src/ZonyLrcTools.Common/Updater/JsonModel/NewVersionResponse.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; - -namespace ZonyLrcTools.Cli.Infrastructure.Updater.JsonModel; +namespace ZonyLrcTools.Common.Updater.JsonModel; public class NewVersionResponse { diff --git a/src/ZonyLrcTools.Common/ZonyLrcTools.Common.csproj b/src/ZonyLrcTools.Common/ZonyLrcTools.Common.csproj index c287067..d5e15c5 100644 --- a/src/ZonyLrcTools.Common/ZonyLrcTools.Common.csproj +++ b/src/ZonyLrcTools.Common/ZonyLrcTools.Common.csproj @@ -12,6 +12,11 @@ + + + + + diff --git a/tests/ZonyLrcTools.Tests/FileScannerTests.cs b/tests/ZonyLrcTools.Tests/FileScannerTests.cs index 748b9a7..fd25654 100644 --- a/tests/ZonyLrcTools.Tests/FileScannerTests.cs +++ b/tests/ZonyLrcTools.Tests/FileScannerTests.cs @@ -1,11 +1,10 @@ -using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Shouldly; using Xunit; -using ZonyLrcTools.Cli.Infrastructure.IO; +using ZonyLrcTools.Common.Infrastructure.IO; namespace ZonyLrcTools.Tests { @@ -21,7 +20,7 @@ namespace ZonyLrcTools.Tests var fileScanner = ServiceProvider.GetRequiredService(); var result = await fileScanner.ScanAsync( Path.GetDirectoryName(tempMusicFilePath), - new[] {"*.mp3", "*.flac"}); + new[] { "*.mp3", "*.flac" }); result.Count.ShouldBe(2); result.First(e => e.ExtensionName == ".mp3").FilePaths.Count.ShouldNotBe(0); diff --git a/tests/ZonyLrcTools.Tests/Infrastructure/Album/NetEaseAlbumDownloader_Tests.cs b/tests/ZonyLrcTools.Tests/Infrastructure/Album/NetEaseAlbumDownloader_Tests.cs index 6ebbe21..8cdd31f 100644 --- a/tests/ZonyLrcTools.Tests/Infrastructure/Album/NetEaseAlbumDownloader_Tests.cs +++ b/tests/ZonyLrcTools.Tests/Infrastructure/Album/NetEaseAlbumDownloader_Tests.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Shouldly; using Xunit; -using ZonyLrcTools.Cli.Infrastructure.Album; +using ZonyLrcTools.Common.Album; namespace ZonyLrcTools.Tests.Infrastructure.Album { diff --git a/tests/ZonyLrcTools.Tests/Infrastructure/Album/QQMusicAlbumDownloaderTests.cs b/tests/ZonyLrcTools.Tests/Infrastructure/Album/QQMusicAlbumDownloaderTests.cs index 819250c..529d863 100644 --- a/tests/ZonyLrcTools.Tests/Infrastructure/Album/QQMusicAlbumDownloaderTests.cs +++ b/tests/ZonyLrcTools.Tests/Infrastructure/Album/QQMusicAlbumDownloaderTests.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Shouldly; -using ZonyLrcTools.Cli.Infrastructure.Album; +using ZonyLrcTools.Common.Album; namespace ZonyLrcTools.Tests.Infrastructure.Album { diff --git a/tests/ZonyLrcTools.Tests/Infrastructure/Lyric/KuGouLyricDownloaderTests.cs b/tests/ZonyLrcTools.Tests/Infrastructure/Lyric/KuGouLyricDownloaderTests.cs index dd9ddca..5016393 100644 --- a/tests/ZonyLrcTools.Tests/Infrastructure/Lyric/KuGouLyricDownloaderTests.cs +++ b/tests/ZonyLrcTools.Tests/Infrastructure/Lyric/KuGouLyricDownloaderTests.cs @@ -1,10 +1,9 @@ using System.Collections.Generic; using System.Linq; -using System.Text.RegularExpressions; using System.Threading.Tasks; using Shouldly; using Xunit; -using ZonyLrcTools.Cli.Infrastructure.Lyric; +using ZonyLrcTools.Common.Lyrics; namespace ZonyLrcTools.Tests.Infrastructure.Lyric { diff --git a/tests/ZonyLrcTools.Tests/Infrastructure/Lyric/LyricCollectionTests.cs b/tests/ZonyLrcTools.Tests/Infrastructure/Lyric/LyricCollectionTests.cs index 470403b..d127455 100644 --- a/tests/ZonyLrcTools.Tests/Infrastructure/Lyric/LyricCollectionTests.cs +++ b/tests/ZonyLrcTools.Tests/Infrastructure/Lyric/LyricCollectionTests.cs @@ -1,6 +1,5 @@ using Shouldly; using Xunit; -using ZonyLrcTools.Cli.Infrastructure.Lyric; using ZonyLrcTools.Common.Configuration; using ZonyLrcTools.Common.Lyrics; diff --git a/tests/ZonyLrcTools.Tests/Infrastructure/Lyric/NetEaseLyricDownloaderTests.cs b/tests/ZonyLrcTools.Tests/Infrastructure/Lyric/NetEaseLyricDownloaderTests.cs index 01c58a6..56471f3 100644 --- a/tests/ZonyLrcTools.Tests/Infrastructure/Lyric/NetEaseLyricDownloaderTests.cs +++ b/tests/ZonyLrcTools.Tests/Infrastructure/Lyric/NetEaseLyricDownloaderTests.cs @@ -5,8 +5,8 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using Shouldly; using Xunit; -using ZonyLrcTools.Cli.Infrastructure.Lyric; using ZonyLrcTools.Common.Configuration; +using ZonyLrcTools.Common.Lyrics; namespace ZonyLrcTools.Tests.Infrastructure.Lyric { diff --git a/tests/ZonyLrcTools.Tests/Infrastructure/Lyric/QQLyricDownloaderTests.cs b/tests/ZonyLrcTools.Tests/Infrastructure/Lyric/QQLyricDownloaderTests.cs index dc89f1f..70d6ae7 100644 --- a/tests/ZonyLrcTools.Tests/Infrastructure/Lyric/QQLyricDownloaderTests.cs +++ b/tests/ZonyLrcTools.Tests/Infrastructure/Lyric/QQLyricDownloaderTests.cs @@ -1,10 +1,9 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using Microsoft.Extensions.DependencyInjection; using Shouldly; using Xunit; -using ZonyLrcTools.Cli.Infrastructure.Lyric; +using ZonyLrcTools.Common.Lyrics; namespace ZonyLrcTools.Tests.Infrastructure.Lyric { diff --git a/tests/ZonyLrcTools.Tests/Infrastructure/MusicDecryption/NcmMusicDecryptor_Tests.cs b/tests/ZonyLrcTools.Tests/Infrastructure/MusicDecryption/NcmMusicDecryptor_Tests.cs index d361f25..5ce79d2 100644 --- a/tests/ZonyLrcTools.Tests/Infrastructure/MusicDecryption/NcmMusicDecryptor_Tests.cs +++ b/tests/ZonyLrcTools.Tests/Infrastructure/MusicDecryption/NcmMusicDecryptor_Tests.cs @@ -3,7 +3,7 @@ using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Newtonsoft.Json.Linq; using Xunit; -using ZonyLrcTools.Cli.Infrastructure.MusicDecryption; +using ZonyLrcTools.Common.MusicDecryption; namespace ZonyLrcTools.Tests.Infrastructure.MusicDecryption {