mirror of
https://github.com/jayfunc/BetterLyrics.git
synced 2026-01-12 10:54:55 +08:00
- 将 `Package.appxmanifest` 的版本号更新为 `1.0.71.0`。 - 移除 `BetterLyrics.WinUI3.csproj` 中对 `TinyPinyin.Net` 的引用。 - 在 `PlaybackSettingsControl.xaml` 中更新目标语言选择,移除中文选项并添加多个新语言。 - 新增 Apple Music 令牌输入框和按钮,允许用户保存令牌。 - 在 `LyricsSearchProviderToDisplayNameConverter.cs` 和 `TranslationSearchProviderToDisplayNameConverter.cs` 中添加对 Apple Music 的支持。 - 在 `LyricsSearchProvider.cs` 中新增 `AppleMusic` 作为歌词搜索提供者,并添加相关缓存目录和格式。 - 更新 `LanguageHelper.cs` 中的目标语言列表。 - 将 `TranslationSettings.cs` 中的 `SelectedTargetLanguageIndex` 属性更改为 `SelectedTargetLanguageCode`。 - 在 `LyricsSearchService.cs` 中添加 Apple Music 的歌词搜索功能。 - 更新 `MediaSessionsService.cs` 中的翻译和歌词更新逻辑。 - 移除 `SettingsPageViewModel.cs` 中的库信息支持,添加对媒体会话服务的引用。 - 新增 `AppleMusic.cs` 文件,包含与 Apple Music API 交互的逻辑。
39 lines
1.6 KiB
C#
39 lines
1.6 KiB
C#
// 2025/6/23 by Zhe Fang
|
|
|
|
using System;
|
|
using BetterLyrics.WinUI3.Enums;
|
|
using Microsoft.UI.Xaml.Data;
|
|
|
|
namespace BetterLyrics.WinUI3.Converter
|
|
{
|
|
public partial class LyricsSearchProviderToDisplayNameConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, string language)
|
|
{
|
|
if (value is LyricsSearchProvider provider)
|
|
{
|
|
return provider switch
|
|
{
|
|
LyricsSearchProvider.LrcLib => "LrcLib",
|
|
LyricsSearchProvider.QQ => "QQ 音乐",
|
|
LyricsSearchProvider.Netease => "网易云音乐",
|
|
LyricsSearchProvider.Kugou => "酷狗音乐",
|
|
LyricsSearchProvider.AmllTtmlDb => "amll-ttml-db",
|
|
LyricsSearchProvider.AppleMusic => "Apple Music",
|
|
LyricsSearchProvider.LocalLrcFile => App.ResourceLoader!.GetString("LyricsSearchProviderLocalLrcFile"),
|
|
LyricsSearchProvider.LocalMusicFile => App.ResourceLoader!.GetString("LyricsSearchProviderLocalMusicFile"),
|
|
LyricsSearchProvider.LocalEslrcFile => App.ResourceLoader!.GetString("LyricsSearchProviderEslrcFile"),
|
|
LyricsSearchProvider.LocalTtmlFile => App.ResourceLoader!.GetString("LyricsSearchProviderTtmlFile"),
|
|
_ => "N/A",
|
|
};
|
|
}
|
|
return "N/A";
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, string language)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|