Compare commits
56 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c43b69b4cb | ||
|
|
94b22552e5 | ||
|
|
6deb16f6cb | ||
|
|
e467ab9c73 | ||
|
|
ea038c9c56 | ||
|
|
560250ad30 | ||
|
|
536acc69a5 | ||
|
|
0bbb379912 | ||
|
|
1f4d29e6f2 | ||
|
|
5d1d7476c9 | ||
|
|
e016baefe1 | ||
|
|
70b6194788 | ||
|
|
9f103b0ea3 | ||
|
|
2924140f95 | ||
|
|
3d3f168926 | ||
|
|
63b2285a36 | ||
|
|
780689fa05 | ||
|
|
01384717c4 | ||
|
|
e18d78170a | ||
|
|
023bf77afc | ||
|
|
2877ac2101 | ||
|
|
16d82109bb | ||
|
|
c703f04119 | ||
|
|
998853f9d2 | ||
|
|
f560735da0 | ||
|
|
ab9da73b49 | ||
|
|
dc364edf75 | ||
|
|
7fbc8fbfe7 | ||
|
|
4a00bb2ddf | ||
|
|
7472aa048f | ||
|
|
49b0f7a692 | ||
|
|
4d0602ebef | ||
|
|
626395d93a | ||
|
|
0ab5602569 | ||
|
|
37a7528762 | ||
|
|
3ca391a509 | ||
|
|
f5e542d2f3 | ||
|
|
107bdf8bee | ||
|
|
3e9e56f5cc | ||
|
|
b0fd43ead5 | ||
|
|
81c59495c0 | ||
|
|
7c5f1a804e | ||
|
|
13ee4227f7 | ||
|
|
c1360ac972 | ||
|
|
c72aa8a58f | ||
|
|
9545ed610b | ||
|
|
1c4515acb9 | ||
|
|
92a6fe46de | ||
|
|
2f9fa02214 | ||
|
|
c174363c07 | ||
|
|
8506062c9a | ||
|
|
52711cba1f | ||
|
|
7eda076920 | ||
|
|
282c2f5ac0 | ||
|
|
94e76a6ac9 | ||
|
|
516d388009 |
2
.github/FUNDING.yml
vendored
@@ -12,4 +12,4 @@ lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cl
|
|||||||
polar: # Replace with a single Polar username
|
polar: # Replace with a single Polar username
|
||||||
buy_me_a_coffee: founchoo
|
buy_me_a_coffee: founchoo
|
||||||
thanks_dev: # Replace with a single thanks.dev username
|
thanks_dev: # Replace with a single thanks.dev username
|
||||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
custom: ['https://paypal.me/zhefangpay']
|
||||||
|
|||||||
@@ -12,13 +12,13 @@
|
|||||||
<Identity
|
<Identity
|
||||||
Name="37412.BetterLyrics"
|
Name="37412.BetterLyrics"
|
||||||
Publisher="CN=E1428B0E-DC1D-4EA4-ACB1-4556569D5BA9"
|
Publisher="CN=E1428B0E-DC1D-4EA4-ACB1-4556569D5BA9"
|
||||||
Version="1.0.56.0" />
|
Version="1.0.76.0" />
|
||||||
|
|
||||||
<mp:PhoneIdentity PhoneProductId="ca4a4830-fc19-40d9-b823-53e2bff3d816" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
<mp:PhoneIdentity PhoneProductId="ca4a4830-fc19-40d9-b823-53e2bff3d816" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||||
|
|
||||||
<Properties>
|
<Properties>
|
||||||
<DisplayName>BetterLyrics</DisplayName>
|
<DisplayName>BetterLyrics</DisplayName>
|
||||||
<PublisherDisplayName>founchoo</PublisherDisplayName>
|
<PublisherDisplayName>Zhe Fang</PublisherDisplayName>
|
||||||
<Logo>Images\StoreLogo.png</Logo>
|
<Logo>Images\StoreLogo.png</Logo>
|
||||||
</Properties>
|
</Properties>
|
||||||
|
|
||||||
|
|||||||
@@ -51,10 +51,14 @@
|
|||||||
<converter:TranslationSearchProviderToDisplayNameConverter x:Key="TranslationSearchProviderToDisplayNameConverter" />
|
<converter:TranslationSearchProviderToDisplayNameConverter x:Key="TranslationSearchProviderToDisplayNameConverter" />
|
||||||
<converter:AlbumArtSearchProviderToDisplayNameConverter x:Key="AlbumArtSearchProviderToDisplayNameConverter" />
|
<converter:AlbumArtSearchProviderToDisplayNameConverter x:Key="AlbumArtSearchProviderToDisplayNameConverter" />
|
||||||
<converter:SecondsToFormattedTimeConverter x:Key="SecondsToFormattedTimeConverter" />
|
<converter:SecondsToFormattedTimeConverter x:Key="SecondsToFormattedTimeConverter" />
|
||||||
|
<converter:MillisecondsToFormattedTimeConverter x:Key="MillisecondsToFormattedTimeConverter" />
|
||||||
<converter:MediaSourceProviderToLogoUriConverter x:Key="MediaSourceProviderToLogoUriConverter" />
|
<converter:MediaSourceProviderToLogoUriConverter x:Key="MediaSourceProviderToLogoUriConverter" />
|
||||||
<converter:MediaSourceProviderToDisplayedNameConverter x:Key="MediaSourceProviderToDisplayedNameConverter" />
|
<converter:MediaSourceProviderToDisplayedNameConverter x:Key="MediaSourceProviderToDisplayedNameConverter" />
|
||||||
<converter:FPSToTimeSpanConverter x:Key="FPSToTimeSpanConverter" />
|
<converter:FPSToTimeSpanConverter x:Key="FPSToTimeSpanConverter" />
|
||||||
<converter:ShortcutToStringConverter x:Key="ShortcutToStringConverter" />
|
<converter:ShortcutToStringConverter x:Key="ShortcutToStringConverter" />
|
||||||
|
<converter:BoolNegationToVisibilityConverter x:Key="BoolNegationToVisibilityConverter" />
|
||||||
|
<converter:BoolToOpacityConverter x:Key="BoolToOpacityConverter" />
|
||||||
|
<converter:RectToMarginConverter x:Key="RectToMarginConverter" />
|
||||||
|
|
||||||
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
|
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
|
||||||
<converters:BoolNegationConverter x:Key="BoolNegationConverter" />
|
<converters:BoolNegationConverter x:Key="BoolNegationConverter" />
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ namespace BetterLyrics.WinUI3
|
|||||||
.AddSingleton<PlaybackSettingsControlViewModel>()
|
.AddSingleton<PlaybackSettingsControlViewModel>()
|
||||||
.AddSingleton<MediaSettingsControlViewModel>()
|
.AddSingleton<MediaSettingsControlViewModel>()
|
||||||
.AddSingleton<AllLyricsSettingsControlViewModel>()
|
.AddSingleton<AllLyricsSettingsControlViewModel>()
|
||||||
|
.AddSingleton<LyricsSearchControlViewModel>()
|
||||||
.AddSingleton<LyricsWindowViewModel>()
|
.AddSingleton<LyricsWindowViewModel>()
|
||||||
.AddSingleton<SettingsWindowViewModel>()
|
.AddSingleton<SettingsWindowViewModel>()
|
||||||
.AddSingleton<SystemTrayViewModel>()
|
.AddSingleton<SystemTrayViewModel>()
|
||||||
|
|||||||
BIN
BetterLyrics.WinUI3/BetterLyrics.WinUI3/Assets/Alipay.jpg
Normal file
|
After Width: | Height: | Size: 140 KiB |
|
Before Width: | Height: | Size: 14 KiB |
BIN
BetterLyrics.WinUI3/BetterLyrics.WinUI3/Assets/Empty.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
BetterLyrics.WinUI3/BetterLyrics.WinUI3/Assets/Page.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 166 KiB |
|
Before Width: | Height: | Size: 192 KiB |
BIN
BetterLyrics.WinUI3/BetterLyrics.WinUI3/Assets/WeChatReward.png
Normal file
|
After Width: | Height: | Size: 209 KiB |
@@ -26,12 +26,13 @@
|
|||||||
<None Remove="Controls\AllLyricsSettingsControl.xaml" />
|
<None Remove="Controls\AllLyricsSettingsControl.xaml" />
|
||||||
<None Remove="Controls\AppSettingsControl.xaml" />
|
<None Remove="Controls\AppSettingsControl.xaml" />
|
||||||
<None Remove="Controls\ExtendedSlider.xaml" />
|
<None Remove="Controls\ExtendedSlider.xaml" />
|
||||||
<None Remove="Controls\LyricsBavkgroundSettingsControl.xaml" />
|
<None Remove="Controls\LyricsSearchControl.xaml" />
|
||||||
<None Remove="Controls\LyricsSettingsControl.xaml" />
|
<None Remove="Controls\LyricsSettingsControl.xaml" />
|
||||||
<None Remove="Controls\MediaSettingsControl.xaml" />
|
<None Remove="Controls\MediaSettingsControl.xaml" />
|
||||||
<None Remove="Controls\PlaybackSettingsControl.xaml" />
|
<None Remove="Controls\PlaybackSettingsControl.xaml" />
|
||||||
<None Remove="Controls\ShortcutTextBox.xaml" />
|
<None Remove="Controls\ShortcutTextBox.xaml" />
|
||||||
<None Remove="Controls\SystemTray.xaml" />
|
<None Remove="Controls\SystemTray.xaml" />
|
||||||
|
<None Remove="Views\LyricsSearchWindow.xaml" />
|
||||||
<None Remove="Views\MusicGalleryPage.xaml" />
|
<None Remove="Views\MusicGalleryPage.xaml" />
|
||||||
<None Remove="Views\MusicGalleryWindow.xaml" />
|
<None Remove="Views\MusicGalleryWindow.xaml" />
|
||||||
<None Remove="Views\SettingsWindow.xaml" />
|
<None Remove="Views\SettingsWindow.xaml" />
|
||||||
@@ -59,8 +60,10 @@
|
|||||||
<PackageReference Include="CommunityToolkit.WinUI.Extensions" Version="8.2.250402" />
|
<PackageReference Include="CommunityToolkit.WinUI.Extensions" Version="8.2.250402" />
|
||||||
<PackageReference Include="CommunityToolkit.WinUI.Helpers" Version="8.2.250402" />
|
<PackageReference Include="CommunityToolkit.WinUI.Helpers" Version="8.2.250402" />
|
||||||
<PackageReference Include="CommunityToolkit.WinUI.Media" Version="8.2.250402" />
|
<PackageReference Include="CommunityToolkit.WinUI.Media" Version="8.2.250402" />
|
||||||
|
<PackageReference Include="csharp-pinyin" Version="1.0.1" />
|
||||||
<PackageReference Include="Dubya.WindowsMediaController" Version="2.5.5" />
|
<PackageReference Include="Dubya.WindowsMediaController" Version="2.5.5" />
|
||||||
<PackageReference Include="H.NotifyIcon.WinUI" Version="2.3.0" />
|
<PackageReference Include="H.NotifyIcon.WinUI" Version="2.3.0" />
|
||||||
|
<PackageReference Include="Hqub.Last.fm" Version="2.5.1" />
|
||||||
<PackageReference Include="Lyricify.Lyrics.Helper-NativeAot" Version="0.1.4-alpha.5" />
|
<PackageReference Include="Lyricify.Lyrics.Helper-NativeAot" Version="0.1.4-alpha.5" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.8" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.8" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.8" />
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.8" />
|
||||||
@@ -70,6 +73,7 @@
|
|||||||
<PackageReference Include="Nito.AsyncEx" Version="5.1.2" />
|
<PackageReference Include="Nito.AsyncEx" Version="5.1.2" />
|
||||||
<PackageReference Include="Nito.AsyncEx.Tasks" Version="5.1.2" />
|
<PackageReference Include="Nito.AsyncEx.Tasks" Version="5.1.2" />
|
||||||
<PackageReference Include="NTextCat" Version="0.3.65" />
|
<PackageReference Include="NTextCat" Version="0.3.65" />
|
||||||
|
<PackageReference Include="RomajiConverter.Core" Version="1.0.9" />
|
||||||
<PackageReference Include="Serilog.Extensions.Logging" Version="9.0.3-dev-02320" />
|
<PackageReference Include="Serilog.Extensions.Logging" Version="9.0.3-dev-02320" />
|
||||||
<PackageReference Include="Serilog.Sinks.File" Version="7.0.0" />
|
<PackageReference Include="Serilog.Sinks.File" Version="7.0.0" />
|
||||||
<PackageReference Include="ShadowViewer.Controls.Notification" Version="1.2.1" />
|
<PackageReference Include="ShadowViewer.Controls.Notification" Version="1.2.1" />
|
||||||
@@ -77,7 +81,6 @@
|
|||||||
<PackageReference Include="System.Drawing.Common" Version="9.0.8" />
|
<PackageReference Include="System.Drawing.Common" Version="9.0.8" />
|
||||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="9.0.8" />
|
<PackageReference Include="System.Text.Encoding.CodePages" Version="9.0.8" />
|
||||||
<PackageReference Include="TagLibSharp" Version="2.3.0" />
|
<PackageReference Include="TagLibSharp" Version="2.3.0" />
|
||||||
<PackageReference Include="TinyPinyin.Net" Version="1.0.2" />
|
|
||||||
<PackageReference Include="Ude.NetStandard" Version="1.2.0" />
|
<PackageReference Include="Ude.NetStandard" Version="1.2.0" />
|
||||||
<PackageReference Include="Vanara.PInvoke.CoreAudio" Version="4.1.6" />
|
<PackageReference Include="Vanara.PInvoke.CoreAudio" Version="4.1.6" />
|
||||||
<PackageReference Include="Vanara.PInvoke.DwmApi" Version="4.1.6" />
|
<PackageReference Include="Vanara.PInvoke.DwmApi" Version="4.1.6" />
|
||||||
@@ -87,11 +90,6 @@
|
|||||||
<PackageReference Include="WinUIEx" Version="2.6.0" />
|
<PackageReference Include="WinUIEx" Version="2.6.0" />
|
||||||
<PackageReference Include="z440.atl.core" Version="7.2.0" />
|
<PackageReference Include="z440.atl.core" Version="7.2.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="Hqub.Lastfm">
|
|
||||||
<HintPath>..\..\..\Last.fm\src\Hqub.Lastfm\bin\Release\netstandard2.0\Hqub.Lastfm.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Page Update="Rendering\InAppLyricsRenderer.xaml">
|
<Page Update="Rendering\InAppLyricsRenderer.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -116,10 +114,10 @@
|
|||||||
<Content Update="Assets\Chrome.png">
|
<Content Update="Assets\Chrome.png">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Update="Assets\Discord.png">
|
<Content Update="Assets\Edge.png">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Update="Assets\Edge.png">
|
<Content Update="Assets\Empty.png">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Update="Assets\EmptyBox.png">
|
<Content Update="Assets\EmptyBox.png">
|
||||||
@@ -161,10 +159,10 @@
|
|||||||
<Content Update="Assets\NetEaseCloudMusic.png">
|
<Content Update="Assets\NetEaseCloudMusic.png">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Update="Assets\PotPlayer.png">
|
<Content Update="Assets\Page.png">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Update="Assets\QQ.png">
|
<Content Update="Assets\PotPlayer.png">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Update="Assets\QQMusic.png">
|
<Content Update="Assets\QQMusic.png">
|
||||||
@@ -179,13 +177,20 @@
|
|||||||
<Content Update="Assets\Spotify.png">
|
<Content Update="Assets\Spotify.png">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Update="Assets\Telegram.png">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Update="Assets\Wiki82.profile.xml">
|
<Content Update="Assets\Wiki82.profile.xml">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Page Update="Views\LyricsSearchWindow.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Page Update="Controls\LyricsSearchControl.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Page Update="Controls\ShortcutTextBox.xaml">
|
<Page Update="Controls\ShortcutTextBox.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -222,7 +227,7 @@
|
|||||||
</Page>
|
</Page>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Page Update="Controls\LyricsBavkgroundSettingsControl.xaml">
|
<Page Update="Controls\LyricsBackgroundSettingsControl.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace BetterLyrics.WinUI3.Constants
|
||||||
|
{
|
||||||
|
public static class AppleMusic
|
||||||
|
{
|
||||||
|
public const string MediaUserTokenKey = "AppleMusicMediaUserToken";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,6 +8,6 @@ namespace BetterLyrics.WinUI3.Constants
|
|||||||
{
|
{
|
||||||
public static class LXMusic
|
public static class LXMusic
|
||||||
{
|
{
|
||||||
public const string QuerySuffix = "/subscribe-player-status?filter=progress,duration";
|
public const string QuerySuffix = "/subscribe-player-status?filter=progress,duration,picUrl";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ namespace BetterLyrics.WinUI3.Constants
|
|||||||
{
|
{
|
||||||
public static class Link
|
public static class Link
|
||||||
{
|
{
|
||||||
public const string GithubUrl = "https://github.com/jayfunc/BetterLyrics";
|
public const string GitHubUrl = "https://github.com/jayfunc/BetterLyrics";
|
||||||
|
public const string FAQUrl = $"{GitHubUrl}/blob/dev/FAQ/FAQ.md";
|
||||||
public const string QQGroupUrl = "https://qun.qq.com/universal-share/share?ac=1&authKey=4Q%2BYTq3wZldYpF5SbS5c19ECFsiYoLZFAIcBNNzYpBUtiEjaZ8sZ%2F%2BnFN0qw3lad&busi_data=eyJncm91cENvZGUiOiIxMDU0NzAwMzg4IiwidG9rZW4iOiJiVnhqemVYN0N5QVc3b1ZkR24wWmZOTUtvUkJoWm1JRWlaWW5iZnlBcXJtZUtGc2FFTHNlUlFZMi9iRm03cWF5IiwidWluIjoiMTM5NTczOTY2MCJ9&data=39UmAihyH_o6CZaOs7nk2mO_lz2ruODoDou6pxxh7utcxP4WF5sbDBDOPvZ_Wqfzeey4441anegsLYQJxkrBAA&svctype=4&tempid=h5_group_info";
|
public const string QQGroupUrl = "https://qun.qq.com/universal-share/share?ac=1&authKey=4Q%2BYTq3wZldYpF5SbS5c19ECFsiYoLZFAIcBNNzYpBUtiEjaZ8sZ%2F%2BnFN0qw3lad&busi_data=eyJncm91cENvZGUiOiIxMDU0NzAwMzg4IiwidG9rZW4iOiJiVnhqemVYN0N5QVc3b1ZkR24wWmZOTUtvUkJoWm1JRWlaWW5iZnlBcXJtZUtGc2FFTHNlUlFZMi9iRm03cWF5IiwidWluIjoiMTM5NTczOTY2MCJ9&data=39UmAihyH_o6CZaOs7nk2mO_lz2ruODoDou6pxxh7utcxP4WF5sbDBDOPvZ_Wqfzeey4441anegsLYQJxkrBAA&svctype=4&tempid=h5_group_info";
|
||||||
public const string DiscordUrl = "https://discord.gg/5yAQPnyCKv";
|
public const string DiscordUrl = "https://discord.gg/5yAQPnyCKv";
|
||||||
public const string TelegramUrl = "https://t.me/+svhSLZ7awPsxNGY1";
|
public const string TelegramUrl = "https://t.me/+svhSLZ7awPsxNGY1";
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ namespace BetterLyrics.WinUI3.Constants
|
|||||||
public const string PotPlayer = "PotPlayerMini64.exe";
|
public const string PotPlayer = "PotPlayerMini64.exe";
|
||||||
public const string Spotify = "Spotify.exe";
|
public const string Spotify = "Spotify.exe";
|
||||||
public const string AppleMusic = "AppleInc.AppleMusicWin_nzyj5cx40ttqa!App";
|
public const string AppleMusic = "AppleInc.AppleMusicWin_nzyj5cx40ttqa!App";
|
||||||
|
public const string AppleMusicAlternative = "AppleMusic.exe";
|
||||||
public const string NetEaseCloudMusic = "cloudmusic.exe";
|
public const string NetEaseCloudMusic = "cloudmusic.exe";
|
||||||
public const string KugouMusic = "kugou";
|
public const string KugouMusic = "kugou";
|
||||||
public const string QQMusic = "QQMusic.exe";
|
public const string QQMusic = "QQMusic.exe";
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ namespace BetterLyrics.WinUI3.Constants
|
|||||||
public const string PotPlayer = "PotPlayer";
|
public const string PotPlayer = "PotPlayer";
|
||||||
public const string Spotify = "Spotify";
|
public const string Spotify = "Spotify";
|
||||||
public const string AppleMusic = "Apple Music";
|
public const string AppleMusic = "Apple Music";
|
||||||
|
public const string AppleMusicAlternative = "Apple Music";
|
||||||
public const string NetEaseCloudMusic = "网易云音乐";
|
public const string NetEaseCloudMusic = "网易云音乐";
|
||||||
public const string KugouMusic = "酷狗音乐";
|
public const string KugouMusic = "酷狗音乐";
|
||||||
public const string QQMusic = "QQ 音乐";
|
public const string QQMusic = "QQ 音乐";
|
||||||
|
|||||||
@@ -46,6 +46,15 @@
|
|||||||
</ComboBox>
|
</ComboBox>
|
||||||
</controls:SettingsCard>
|
</controls:SettingsCard>
|
||||||
|
|
||||||
|
<controls:SettingsCard x:Uid="SettingsPageLyricsFontSize" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
|
<local:ExtendedSlider
|
||||||
|
Default="18"
|
||||||
|
Frequency="2"
|
||||||
|
Maximum="48"
|
||||||
|
Minimum="12"
|
||||||
|
Value="{x:Bind ViewModel.AppSettings.AlbumArtLayoutSettings.SongInfoFontSize, Mode=TwoWay}" />
|
||||||
|
</controls:SettingsCard>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|||||||
@@ -11,184 +11,375 @@
|
|||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<ScrollViewer Style="{StaticResource SettingsScrollViewerStyle}">
|
<controls:SwitchPresenter Margin="0,72,0,0" Value="{Binding SelectedItem.Tag, ElementName=SegmentedControl}">
|
||||||
<Grid Style="{StaticResource SettingsGridStyle}">
|
|
||||||
<StackPanel Spacing="{StaticResource SettingsCardSpacing}">
|
|
||||||
|
|
||||||
<!-- App appearance -->
|
<controls:Case Value="General">
|
||||||
|
<ScrollViewer Style="{StaticResource SettingsScrollViewerStyle}">
|
||||||
|
<Grid Style="{StaticResource SettingsGridStyle}">
|
||||||
|
<StackPanel Spacing="{StaticResource SettingsCardSpacing}">
|
||||||
|
|
||||||
<TextBlock x:Uid="SettingsPageAppAppearance" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" />
|
<!-- App appearance -->
|
||||||
|
|
||||||
<controls:SettingsExpander
|
<TextBlock x:Uid="SettingsPageAppAppearance" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" />
|
||||||
x:Uid="SettingsPageLanguage"
|
|
||||||
HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily},
|
<controls:SettingsExpander
|
||||||
Glyph=}"
|
x:Uid="SettingsPageLanguage"
|
||||||
IsExpanded="True">
|
HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily},
|
||||||
<ComboBox SelectedIndex="{x:Bind ViewModel.AppSettings.GeneralSettings.Language, Mode=TwoWay, Converter={StaticResource EnumToIntConverter}}">
|
Glyph=}"
|
||||||
<ComboBoxItem x:Uid="SettingsPageSystemLanguage" />
|
IsExpanded="True">
|
||||||
<ComboBoxItem x:Uid="SettingsPageEN" />
|
<ComboBox SelectedIndex="{x:Bind ViewModel.AppSettings.GeneralSettings.Language, Mode=TwoWay, Converter={StaticResource EnumToIntConverter}}">
|
||||||
<ComboBoxItem x:Uid="SettingsPageSC" />
|
<ComboBoxItem x:Uid="SettingsPageSystemLanguage" />
|
||||||
<ComboBoxItem x:Uid="SettingsPageTC" />
|
<ComboBoxItem x:Uid="SettingsPageEN" />
|
||||||
<ComboBoxItem x:Uid="SettingsPageJA" />
|
<ComboBoxItem x:Uid="SettingsPageSC" />
|
||||||
<ComboBoxItem x:Uid="SettingsPageKO" />
|
<ComboBoxItem x:Uid="SettingsPageTC" />
|
||||||
</ComboBox>
|
<ComboBoxItem x:Uid="SettingsPageJA" />
|
||||||
<controls:SettingsExpander.Items>
|
<ComboBoxItem x:Uid="SettingsPageKO" />
|
||||||
<controls:SettingsCard>
|
</ComboBox>
|
||||||
<Button x:Uid="SettingsPageRestart" Command="{x:Bind ViewModel.RestartAppCommand}" />
|
<controls:SettingsExpander.Items>
|
||||||
|
<controls:SettingsCard>
|
||||||
|
<Button x:Uid="SettingsPageRestart" Command="{x:Bind ViewModel.RestartAppCommand}" />
|
||||||
|
</controls:SettingsCard>
|
||||||
|
</controls:SettingsExpander.Items>
|
||||||
|
</controls:SettingsExpander>
|
||||||
|
|
||||||
|
<!-- App behavior -->
|
||||||
|
|
||||||
|
<TextBlock x:Uid="SettingsPageAppBehavior" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" />
|
||||||
|
|
||||||
|
<controls:SettingsCard x:Uid="SettingsPageAutoStart" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
|
<ToggleSwitch
|
||||||
|
x:Name="AutoStartupToggleSwitch"
|
||||||
|
Loaded="AutoStartupToggleSwitch_Loaded"
|
||||||
|
Unloaded="AutoStartupToggleSwitch_Unloaded" />
|
||||||
</controls:SettingsCard>
|
</controls:SettingsCard>
|
||||||
</controls:SettingsExpander.Items>
|
|
||||||
</controls:SettingsExpander>
|
|
||||||
|
|
||||||
<!-- App behavior -->
|
<controls:SettingsCard x:Uid="SettingsPageAutoStartWindow" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
|
<ComboBox SelectedIndex="{x:Bind ViewModel.AppSettings.GeneralSettings.AutoStartWindowType, Mode=TwoWay, Converter={StaticResource EnumToIntConverter}}">
|
||||||
|
<ComboBoxItem x:Uid="SettingsPageAutoStartInAppLyrics" />
|
||||||
|
<ComboBoxItem x:Uid="SettingsPageAutoStartDockLyrics" />
|
||||||
|
<ComboBoxItem x:Uid="SettingsPageAutoStartDesktopLyrics" />
|
||||||
|
<ComboBoxItem x:Uid="SettingsPageAutoStartPIPLyrics" />
|
||||||
|
</ComboBox>
|
||||||
|
</controls:SettingsCard>
|
||||||
|
|
||||||
<TextBlock x:Uid="SettingsPageAppBehavior" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" />
|
<controls:SettingsExpander
|
||||||
|
x:Name="LyricsWindowManagerExpander"
|
||||||
|
x:Uid="SettingsPageLyricsWindowManager"
|
||||||
|
HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily},
|
||||||
|
Glyph=}"
|
||||||
|
IsExpanded="True" />
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="SettingsPageAutoStart" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
<Grid
|
||||||
<ToggleSwitch
|
Margin="0,-20,0,0"
|
||||||
x:Name="AutoStartupToggleSwitch"
|
Padding="60,16"
|
||||||
Loaded="AutoStartupToggleSwitch_Loaded"
|
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||||
Unloaded="AutoStartupToggleSwitch_Unloaded" />
|
CornerRadius="4"
|
||||||
</controls:SettingsCard>
|
Visibility="{Binding ElementName=LyricsWindowManagerExpander, Path=IsExpanded, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||||
|
<StackPanel Spacing="16">
|
||||||
|
<TextBlock x:Uid="SettingsPageCurrentLyricsWindowStatus" />
|
||||||
|
<StackPanel HorizontalAlignment="Left" Spacing="4">
|
||||||
|
<Grid
|
||||||
|
Width="{x:Bind ViewModel.LiveStates.DemoLyricsWindowMonitorBounds.Width, Mode=OneWay}"
|
||||||
|
Height="{x:Bind ViewModel.LiveStates.DemoLyricsWindowMonitorBounds.Height, Mode=OneWay}"
|
||||||
|
Background="{ThemeResource CardBackgroundFillColorSecondaryBrush}">
|
||||||
|
<Grid
|
||||||
|
Width="{x:Bind ViewModel.LiveStates.DemoLyricsWindowBounds.Width, Mode=OneWay}"
|
||||||
|
Height="{x:Bind ViewModel.LiveStates.DemoLyricsWindowBounds.Height, Mode=OneWay}"
|
||||||
|
Margin="{x:Bind ViewModel.LiveStates.DemoLyricsWindowBounds, Converter={StaticResource RectToMarginConverter}, Mode=OneWay}"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
Background="{ThemeResource AccentFillColorDefaultBrush}"
|
||||||
|
CornerRadius="4" />
|
||||||
|
<TextBlock
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontWeight="ExtraBlack"
|
||||||
|
Opacity="0.7"
|
||||||
|
Text="{x:Bind ViewModel.LiveStates.LyricsWindowMonitorName, Mode=OneWay}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</Grid>
|
||||||
|
<Grid>
|
||||||
|
<Button
|
||||||
|
x:Uid="SettingsPageRecord"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Command="{x:Bind ViewModel.RecordCurrentWindowBoundsCommand}"
|
||||||
|
Style="{StaticResource AccentButtonStyle}" />
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="SettingsPageAutoStartWindow" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
<StackPanel
|
||||||
<ComboBox SelectedIndex="{x:Bind ViewModel.AppSettings.GeneralSettings.AutoStartWindowType, Mode=TwoWay, Converter={StaticResource EnumToIntConverter}}">
|
Margin="0,-3,0,0"
|
||||||
<ComboBoxItem x:Uid="SettingsPageAutoStartInAppLyrics" />
|
Padding="60,16"
|
||||||
<ComboBoxItem x:Uid="SettingsPageAutoStartDockLyrics" />
|
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||||
<ComboBoxItem x:Uid="SettingsPageAutoStartDesktopLyrics" />
|
CornerRadius="4"
|
||||||
</ComboBox>
|
Spacing="16"
|
||||||
</controls:SettingsCard>
|
Visibility="{Binding ElementName=LyricsWindowManagerExpander, Path=IsExpanded, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||||
|
<TextBlock x:Uid="SettingsPageRecordedWindowStatus" />
|
||||||
|
<GridView
|
||||||
|
Margin="-2"
|
||||||
|
CornerRadius="4"
|
||||||
|
ItemsSource="{x:Bind ViewModel.AppSettings.WindowBoundsRecords, Mode=OneWay}"
|
||||||
|
SelectionMode="None">
|
||||||
|
<GridView.ItemContainerStyle>
|
||||||
|
<Style BasedOn="{StaticResource DefaultGridViewItemStyle}" TargetType="GridViewItem">
|
||||||
|
<Setter Property="Margin" Value="5,5,5,5" />
|
||||||
|
</Style>
|
||||||
|
</GridView.ItemContainerStyle>
|
||||||
|
<GridView.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<ItemsWrapGrid Orientation="Horizontal" />
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</GridView.ItemsPanel>
|
||||||
|
<GridView.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid>
|
||||||
|
<StackPanel Spacing="4">
|
||||||
|
<Grid
|
||||||
|
Width="{Binding DemoMonitorBounds.Width}"
|
||||||
|
Height="{Binding DemoMonitorBounds.Height}"
|
||||||
|
Background="{ThemeResource CardBackgroundFillColorSecondaryBrush}">
|
||||||
|
<Grid
|
||||||
|
Width="{Binding DemoWindowBounds.Width}"
|
||||||
|
Height="{Binding DemoWindowBounds.Height}"
|
||||||
|
Margin="{Binding DemoWindowBounds, Converter={StaticResource RectToMarginConverter}}"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
Background="{ThemeResource AccentFillColorDefaultBrush}"
|
||||||
|
CornerRadius="4" />
|
||||||
|
<TextBlock
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontWeight="ExtraBlack"
|
||||||
|
Opacity="0.7"
|
||||||
|
Text="{Binding MonitorDeviceName}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</Grid>
|
||||||
|
<Grid ColumnSpacing="4">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button
|
||||||
|
x:Uid="SettingsPageDelete"
|
||||||
|
Grid.Column="0"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Click="DeleteWindowBoundsRecordButton_Click" />
|
||||||
|
<Button
|
||||||
|
x:Uid="SettingsPageApply"
|
||||||
|
Grid.Column="1"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Click="ApplyWindowBoundsRecordButton_Click"
|
||||||
|
Style="{StaticResource AccentButtonStyle}" />
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</GridView.ItemTemplate>
|
||||||
|
</GridView>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="SettingsPageIgnoreFullscreenWindow" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
<controls:SettingsCard x:Uid="SettingsPageIgnoreFullscreenWindow" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
<ToggleSwitch IsOn="{x:Bind ViewModel.AppSettings.GeneralSettings.IgnoreFullscreenWindow, Mode=TwoWay}" />
|
<ToggleSwitch IsOn="{x:Bind ViewModel.AppSettings.GeneralSettings.IgnoreFullscreenWindow, Mode=TwoWay}" />
|
||||||
</controls:SettingsCard>
|
</controls:SettingsCard>
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="SettingsPageHideWindow" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
<controls:SettingsCard x:Uid="SettingsPageHideWindow" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
<ToggleSwitch IsOn="{x:Bind ViewModel.AppSettings.GeneralSettings.HideWindowWhenNotPlaying, Mode=TwoWay}" />
|
<ToggleSwitch IsOn="{x:Bind ViewModel.AppSettings.GeneralSettings.HideWindowWhenNotPlaying, Mode=TwoWay}" />
|
||||||
</controls:SettingsCard>
|
</controls:SettingsCard>
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="SettingsPageGlobalDrag" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
<controls:SettingsCard x:Uid="SettingsPageShowHideHotKey" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
<ToggleSwitch IsOn="{x:Bind ViewModel.AppSettings.GeneralSettings.IsDragEverywhereEnabled, Mode=TwoWay}" />
|
<local:ShortcutTextBox Shortcut="{x:Bind ViewModel.AppSettings.GeneralSettings.ShowOrHideLyricsWindowShortcut, Mode=TwoWay}" />
|
||||||
</controls:SettingsCard>
|
</controls:SettingsCard>
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="SettingsPageExitOnLyricsWindowClosed" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
<controls:SettingsCard x:Uid="SettingsPageGlobalDrag" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
<ToggleSwitch IsOn="{x:Bind ViewModel.AppSettings.GeneralSettings.ExitOnLyricsWindowClosed, Mode=TwoWay}" />
|
<ToggleSwitch IsOn="{x:Bind ViewModel.AppSettings.GeneralSettings.IsDragEverywhereEnabled, Mode=TwoWay}" />
|
||||||
</controls:SettingsCard>
|
</controls:SettingsCard>
|
||||||
|
|
||||||
<!-- Standard mode -->
|
<controls:SettingsCard x:Uid="SettingsPageExitOnLyricsWindowClosed" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
|
<ToggleSwitch IsOn="{x:Bind ViewModel.AppSettings.GeneralSettings.ExitOnLyricsWindowClosed, Mode=TwoWay}" />
|
||||||
|
</controls:SettingsCard>
|
||||||
|
|
||||||
<TextBlock x:Uid="SettingsPageAppStandard" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" />
|
<!-- Playback shortcut -->
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="SettingsPageDisplayTypeSwitcher" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
<TextBlock x:Uid="SettingsPagePlaybackShortcut" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" />
|
||||||
<ComboBox SelectedIndex="{x:Bind ViewModel.AppSettings.StandardModeSettings.LyricsDisplayType, Mode=TwoWay, Converter={StaticResource EnumToIntConverter}}">
|
|
||||||
<ComboBoxItem x:Uid="MainPageAlbumArtOnly" />
|
|
||||||
<ComboBoxItem x:Uid="MainPageLyriscOnly" />
|
|
||||||
<ComboBoxItem x:Uid="MainPageSplitView" />
|
|
||||||
</ComboBox>
|
|
||||||
</controls:SettingsCard>
|
|
||||||
|
|
||||||
<!-- Desktop mode -->
|
<controls:SettingsCard x:Uid="SettingsPagePlayOrPauseSongHotKey" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
|
<local:ShortcutTextBox Shortcut="{x:Bind ViewModel.AppSettings.GeneralSettings.PlayOrPauseShortcut, Mode=TwoWay}" />
|
||||||
|
</controls:SettingsCard>
|
||||||
|
|
||||||
<TextBlock x:Uid="SettingsPageAppDesktop" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" />
|
<controls:SettingsCard x:Uid="SettingsPageNextSongHotKey" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
|
<local:ShortcutTextBox Shortcut="{x:Bind ViewModel.AppSettings.GeneralSettings.NextSongShortcut, Mode=TwoWay}" />
|
||||||
|
</controls:SettingsCard>
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="SettingsPageToggleHotKey" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
<controls:SettingsCard x:Uid="SettingsPagePreviousSongHotKey" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
<local:ShortcutTextBox Shortcut="{x:Bind ViewModel.AppSettings.DesktopModeSettings.ToggleShortcut, Mode=TwoWay}" />
|
<local:ShortcutTextBox Shortcut="{x:Bind ViewModel.AppSettings.GeneralSettings.PreviousSongShortcut, Mode=TwoWay}" />
|
||||||
</controls:SettingsCard>
|
</controls:SettingsCard>
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="SettingsPageDisplayTypeSwitcher" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
|
||||||
<ComboBox SelectedIndex="{x:Bind ViewModel.AppSettings.DesktopModeSettings.LyricsDisplayType, Mode=TwoWay, Converter={StaticResource EnumToIntConverter}}">
|
|
||||||
<ComboBoxItem x:Uid="MainPageAlbumArtOnly" />
|
|
||||||
<ComboBoxItem x:Uid="MainPageLyriscOnly" />
|
|
||||||
<ComboBoxItem x:Uid="MainPageSplitView" />
|
|
||||||
</ComboBox>
|
|
||||||
</controls:SettingsCard>
|
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="SettingsPageAutoLock" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
|
||||||
<ToggleSwitch IsOn="{x:Bind ViewModel.AppSettings.DesktopModeSettings.AutoLockOnDesktopMode, Mode=TwoWay}" />
|
|
||||||
</controls:SettingsCard>
|
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="SettingsPageLockHotKey" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
|
||||||
<local:ShortcutTextBox Shortcut="{x:Bind ViewModel.AppSettings.DesktopModeSettings.LockShortcut, Mode=TwoWay}" />
|
|
||||||
</controls:SettingsCard>
|
|
||||||
|
|
||||||
<!-- Dock mode -->
|
|
||||||
|
|
||||||
<TextBlock x:Uid="SettingsPageAppDock" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" />
|
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="SettingsPageToggleHotKey" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
|
||||||
<local:ShortcutTextBox Shortcut="{x:Bind ViewModel.AppSettings.DockModeSettings.ToggleShortcut, Mode=TwoWay}" />
|
|
||||||
</controls:SettingsCard>
|
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="SettingsPageDisplayTypeSwitcher" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
|
||||||
<ComboBox SelectedIndex="{x:Bind ViewModel.AppSettings.DockModeSettings.LyricsDisplayType, Mode=TwoWay, Converter={StaticResource EnumToIntConverter}}">
|
|
||||||
<ComboBoxItem x:Uid="MainPageAlbumArtOnly" />
|
|
||||||
<ComboBoxItem x:Uid="MainPageLyriscOnly" />
|
|
||||||
<ComboBoxItem x:Uid="MainPageSplitView" />
|
|
||||||
</ComboBox>
|
|
||||||
</controls:SettingsCard>
|
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="SettingsPageDockMonitor" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
|
||||||
<StackPanel Orientation="Horizontal" Spacing="6">
|
|
||||||
<ComboBox ItemsSource="{x:Bind ViewModel.MonitorDeviceNames, Mode=OneWay}" SelectedItem="{x:Bind ViewModel.AppSettings.DockModeSettings.DockMonitorDeviceName, Mode=TwoWay}" />
|
|
||||||
<Button
|
|
||||||
Command="{x:Bind ViewModel.RefreshMonitorDeviceNamesCommand}"
|
|
||||||
Content="{ui:FontIcon FontFamily={StaticResource IconFontFamily},
|
|
||||||
FontSize=12,
|
|
||||||
Glyph=}"
|
|
||||||
Style="{StaticResource GhostButtonStyle}" />
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</controls:SettingsCard>
|
</Grid>
|
||||||
|
</ScrollViewer>
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="SettingsPageDockWindowHeight" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
</controls:Case>
|
||||||
<local:ExtendedSlider
|
|
||||||
Default="64"
|
|
||||||
Frequency="1"
|
|
||||||
Maximum="200"
|
|
||||||
Minimum="64"
|
|
||||||
Unit="px"
|
|
||||||
Value="{x:Bind ViewModel.AppSettings.DockModeSettings.DockWindowHeight, Mode=TwoWay}" />
|
|
||||||
</controls:SettingsCard>
|
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="SettingsPageDockPlacement" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
<controls:Case Value="Standard">
|
||||||
<ComboBox SelectedIndex="{x:Bind ViewModel.AppSettings.DockModeSettings.DockPlacement, Mode=TwoWay, Converter={StaticResource EnumToIntConverter}}">
|
<ScrollViewer Style="{StaticResource SettingsScrollViewerStyle}">
|
||||||
<ComboBoxItem x:Uid="SettingsPageDockPlacementTop" />
|
<Grid Style="{StaticResource SettingsGridStyle}">
|
||||||
<ComboBoxItem x:Uid="SettingsPageDockPlacementBottom" />
|
<StackPanel Spacing="{StaticResource SettingsCardSpacing}">
|
||||||
</ComboBox>
|
|
||||||
</controls:SettingsCard>
|
|
||||||
|
|
||||||
<!-- Picture in picture mode -->
|
<!-- Standard mode -->
|
||||||
|
|
||||||
<TextBlock x:Uid="SettingsPageAppPictureInPicture" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" />
|
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" />
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="SettingsPageToggleHotKey" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
<controls:SettingsCard x:Uid="SettingsPageDisplayTypeSwitcher" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
<local:ShortcutTextBox Shortcut="{x:Bind ViewModel.AppSettings.PictureInPictureModeSettings.ToggleShortcut, Mode=TwoWay}" />
|
<ComboBox SelectedIndex="{x:Bind ViewModel.AppSettings.StandardModeSettings.LyricsDisplayType, Mode=TwoWay, Converter={StaticResource EnumToIntConverter}}">
|
||||||
</controls:SettingsCard>
|
<ComboBoxItem x:Uid="MainPageAlbumArtOnly" />
|
||||||
|
<ComboBoxItem x:Uid="MainPageLyriscOnly" />
|
||||||
|
<ComboBoxItem x:Uid="MainPageSplitView" />
|
||||||
|
</ComboBox>
|
||||||
|
</controls:SettingsCard>
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="SettingsPageDisplayTypeSwitcher" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
<controls:SettingsCard x:Uid="SettingsPageAOT" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
<ComboBox SelectedIndex="{x:Bind ViewModel.AppSettings.PictureInPictureModeSettings.LyricsDisplayType, Mode=TwoWay, Converter={StaticResource EnumToIntConverter}}">
|
<ToggleSwitch IsOn="{x:Bind ViewModel.AppSettings.StandardModeSettings.IsAlwaysOnTop, Mode=TwoWay}" />
|
||||||
<ComboBoxItem x:Uid="MainPageAlbumArtOnly" />
|
</controls:SettingsCard>
|
||||||
<ComboBoxItem x:Uid="MainPageLyriscOnly" />
|
|
||||||
<ComboBoxItem x:Uid="MainPageSplitView" />
|
|
||||||
</ComboBox>
|
|
||||||
</controls:SettingsCard>
|
|
||||||
|
|
||||||
<!-- Playback shortcut -->
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</ScrollViewer>
|
||||||
|
</controls:Case>
|
||||||
|
|
||||||
<TextBlock x:Uid="SettingsPagePlaybackShortcut" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" />
|
<controls:Case Value="Desktop">
|
||||||
|
<ScrollViewer Style="{StaticResource SettingsScrollViewerStyle}">
|
||||||
|
<Grid Style="{StaticResource SettingsGridStyle}">
|
||||||
|
<StackPanel Spacing="{StaticResource SettingsCardSpacing}">
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="SettingsPagePlayOrPauseSongHotKey" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
<!-- Desktop mode -->
|
||||||
<local:ShortcutTextBox Shortcut="{x:Bind ViewModel.AppSettings.GeneralSettings.PlayOrPauseShortcut, Mode=TwoWay}" />
|
|
||||||
</controls:SettingsCard>
|
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="SettingsPageNextSongHotKey" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" />
|
||||||
<local:ShortcutTextBox Shortcut="{x:Bind ViewModel.AppSettings.GeneralSettings.NextSongShortcut, Mode=TwoWay}" />
|
|
||||||
</controls:SettingsCard>
|
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="SettingsPagePreviousSongHotKey" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
<controls:SettingsCard x:Uid="SettingsPageDisplayTypeSwitcher" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
<local:ShortcutTextBox Shortcut="{x:Bind ViewModel.AppSettings.GeneralSettings.PreviousSongShortcut, Mode=TwoWay}" />
|
<ComboBox SelectedIndex="{x:Bind ViewModel.AppSettings.DesktopModeSettings.LyricsDisplayType, Mode=TwoWay, Converter={StaticResource EnumToIntConverter}}">
|
||||||
</controls:SettingsCard>
|
<ComboBoxItem x:Uid="MainPageAlbumArtOnly" />
|
||||||
|
<ComboBoxItem x:Uid="MainPageLyriscOnly" />
|
||||||
|
<ComboBoxItem x:Uid="MainPageSplitView" />
|
||||||
|
</ComboBox>
|
||||||
|
</controls:SettingsCard>
|
||||||
|
|
||||||
|
<controls:SettingsCard x:Uid="SettingsPageAOT" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
|
<ToggleSwitch IsOn="{x:Bind ViewModel.AppSettings.DesktopModeSettings.IsAlwaysOnTop, Mode=TwoWay}" />
|
||||||
|
</controls:SettingsCard>
|
||||||
|
|
||||||
|
<controls:SettingsCard x:Uid="SettingsPageToggleHotKey" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
|
<local:ShortcutTextBox Shortcut="{x:Bind ViewModel.AppSettings.DesktopModeSettings.ToggleShortcut, Mode=TwoWay}" />
|
||||||
|
</controls:SettingsCard>
|
||||||
|
|
||||||
|
<controls:SettingsCard x:Uid="SettingsPageAutoLock" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
|
<ToggleSwitch IsOn="{x:Bind ViewModel.AppSettings.DesktopModeSettings.AutoLockOnDesktopMode, Mode=TwoWay}" />
|
||||||
|
</controls:SettingsCard>
|
||||||
|
|
||||||
|
<controls:SettingsCard x:Uid="SettingsPageLockHotKey" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
|
<local:ShortcutTextBox Shortcut="{x:Bind ViewModel.AppSettings.DesktopModeSettings.LockShortcut, Mode=TwoWay}" />
|
||||||
|
</controls:SettingsCard>
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</ScrollViewer>
|
||||||
|
</controls:Case>
|
||||||
|
|
||||||
|
<controls:Case Value="Dock">
|
||||||
|
<ScrollViewer Style="{StaticResource SettingsScrollViewerStyle}">
|
||||||
|
<Grid Style="{StaticResource SettingsGridStyle}">
|
||||||
|
<StackPanel Spacing="{StaticResource SettingsCardSpacing}">
|
||||||
|
|
||||||
|
<!-- Dock mode -->
|
||||||
|
|
||||||
|
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" />
|
||||||
|
|
||||||
|
<controls:SettingsCard x:Uid="SettingsPageDisplayTypeSwitcher" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
|
<ComboBox SelectedIndex="{x:Bind ViewModel.AppSettings.DockModeSettings.LyricsDisplayType, Mode=TwoWay, Converter={StaticResource EnumToIntConverter}}">
|
||||||
|
<ComboBoxItem x:Uid="MainPageAlbumArtOnly" />
|
||||||
|
<ComboBoxItem x:Uid="MainPageLyriscOnly" />
|
||||||
|
<ComboBoxItem x:Uid="MainPageSplitView" />
|
||||||
|
</ComboBox>
|
||||||
|
</controls:SettingsCard>
|
||||||
|
|
||||||
|
<controls:SettingsCard x:Uid="SettingsPageToggleHotKey" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
|
<local:ShortcutTextBox Shortcut="{x:Bind ViewModel.AppSettings.DockModeSettings.ToggleShortcut, Mode=TwoWay}" />
|
||||||
|
</controls:SettingsCard>
|
||||||
|
|
||||||
|
<controls:SettingsCard x:Uid="SettingsPageDockMonitor" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="6">
|
||||||
|
<ComboBox ItemsSource="{x:Bind ViewModel.MonitorDeviceNames, Mode=OneWay}" SelectedItem="{x:Bind ViewModel.AppSettings.DockModeSettings.DockMonitorDeviceName, Mode=TwoWay}" />
|
||||||
|
<Button
|
||||||
|
Command="{x:Bind ViewModel.RefreshMonitorDeviceNamesCommand}"
|
||||||
|
Content="{ui:FontIcon FontFamily={StaticResource IconFontFamily},
|
||||||
|
FontSize=12,
|
||||||
|
Glyph=}"
|
||||||
|
Style="{StaticResource GhostButtonStyle}" />
|
||||||
|
</StackPanel>
|
||||||
|
</controls:SettingsCard>
|
||||||
|
|
||||||
|
<controls:SettingsCard x:Uid="SettingsPageDockWindowHeight" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
|
<local:ExtendedSlider
|
||||||
|
Default="64"
|
||||||
|
Frequency="1"
|
||||||
|
Maximum="200"
|
||||||
|
Minimum="64"
|
||||||
|
Unit="px"
|
||||||
|
Value="{x:Bind ViewModel.AppSettings.DockModeSettings.DockWindowHeight, Mode=TwoWay}" />
|
||||||
|
</controls:SettingsCard>
|
||||||
|
|
||||||
|
<controls:SettingsCard x:Uid="SettingsPageDockPlacement" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
|
<ComboBox SelectedIndex="{x:Bind ViewModel.AppSettings.DockModeSettings.DockPlacement, Mode=TwoWay, Converter={StaticResource EnumToIntConverter}}">
|
||||||
|
<ComboBoxItem x:Uid="SettingsPageDockPlacementTop" />
|
||||||
|
<ComboBoxItem x:Uid="SettingsPageDockPlacementBottom" />
|
||||||
|
</ComboBox>
|
||||||
|
</controls:SettingsCard>
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</ScrollViewer>
|
||||||
|
</controls:Case>
|
||||||
|
|
||||||
|
<controls:Case Value="PictureInPicture">
|
||||||
|
<ScrollViewer Style="{StaticResource SettingsScrollViewerStyle}">
|
||||||
|
<Grid Style="{StaticResource SettingsGridStyle}">
|
||||||
|
<StackPanel Spacing="{StaticResource SettingsCardSpacing}">
|
||||||
|
|
||||||
|
<!-- Picture in picture mode -->
|
||||||
|
|
||||||
|
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" />
|
||||||
|
|
||||||
|
<controls:SettingsCard x:Uid="SettingsPageDisplayTypeSwitcher" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
|
<ComboBox SelectedIndex="{x:Bind ViewModel.AppSettings.PictureInPictureModeSettings.LyricsDisplayType, Mode=TwoWay, Converter={StaticResource EnumToIntConverter}}">
|
||||||
|
<ComboBoxItem x:Uid="MainPageAlbumArtOnly" />
|
||||||
|
<ComboBoxItem x:Uid="MainPageLyriscOnly" />
|
||||||
|
<ComboBoxItem x:Uid="MainPageSplitView" />
|
||||||
|
</ComboBox>
|
||||||
|
</controls:SettingsCard>
|
||||||
|
|
||||||
|
<controls:SettingsCard x:Uid="SettingsPageToggleHotKey" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
|
<local:ShortcutTextBox Shortcut="{x:Bind ViewModel.AppSettings.PictureInPictureModeSettings.ToggleShortcut, Mode=TwoWay}" />
|
||||||
|
</controls:SettingsCard>
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</ScrollViewer>
|
||||||
|
</controls:Case>
|
||||||
|
|
||||||
|
</controls:SwitchPresenter>
|
||||||
|
<controls:Segmented
|
||||||
|
x:Name="SegmentedControl"
|
||||||
|
Margin="36,36,36,0"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
SelectedIndex="0">
|
||||||
|
<controls:SegmentedItem x:Uid="AppSettingsControlGeneral" Tag="General" />
|
||||||
|
<controls:SegmentedItem x:Uid="AllLyricsSettingsControlStandard" Tag="Standard" />
|
||||||
|
<controls:SegmentedItem x:Uid="AllLyricsSettingsControlDock" Tag="Dock" />
|
||||||
|
<controls:SegmentedItem x:Uid="AllLyricsSettingsControlDesktop" Tag="Desktop" />
|
||||||
|
<controls:SegmentedItem x:Uid="AllLyricsSettingsControlPictureInPicture" Tag="PictureInPicture" />
|
||||||
|
</controls:Segmented>
|
||||||
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
</ScrollViewer>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
|
using BetterLyrics.WinUI3.Helper;
|
||||||
|
using BetterLyrics.WinUI3.Models;
|
||||||
using BetterLyrics.WinUI3.Models.Settings;
|
using BetterLyrics.WinUI3.Models.Settings;
|
||||||
using BetterLyrics.WinUI3.ViewModels;
|
using BetterLyrics.WinUI3.ViewModels;
|
||||||
|
using BetterLyrics.WinUI3.Views;
|
||||||
using CommunityToolkit.Mvvm.DependencyInjection;
|
using CommunityToolkit.Mvvm.DependencyInjection;
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Controls;
|
using Microsoft.UI.Xaml.Controls;
|
||||||
@@ -46,5 +49,33 @@ namespace BetterLyrics.WinUI3.Controls
|
|||||||
{
|
{
|
||||||
AutoStartupToggleSwitch.Toggled -= AutoStartupToggleSwitch_Toggled;
|
AutoStartupToggleSwitch.Toggled -= AutoStartupToggleSwitch_Toggled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void DeleteWindowBoundsRecordButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (sender is Button button)
|
||||||
|
{
|
||||||
|
var data = button.DataContext as WindowBoundsRecord;
|
||||||
|
if (data != null)
|
||||||
|
{
|
||||||
|
ViewModel.AppSettings.WindowBoundsRecords.Remove(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ApplyWindowBoundsRecordButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (sender is Button button)
|
||||||
|
{
|
||||||
|
var data = button.DataContext as WindowBoundsRecord;
|
||||||
|
if (data != null)
|
||||||
|
{
|
||||||
|
var lyricsWindow = WindowHelper.GetWindowByWindowType<LyricsWindow>();
|
||||||
|
if (lyricsWindow != null)
|
||||||
|
{
|
||||||
|
lyricsWindow.AppWindow.MoveAndResize(data.WindowBounds.ToRectInt32());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<UserControl
|
<UserControl
|
||||||
x:Class="BetterLyrics.WinUI3.Controls.LyricsBavkgroundSettingsControl"
|
x:Class="BetterLyrics.WinUI3.Controls.LyricsBackgroundSettingsControl"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
|
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
|
||||||
@@ -20,11 +20,11 @@ using Windows.Foundation.Collections;
|
|||||||
|
|
||||||
namespace BetterLyrics.WinUI3.Controls
|
namespace BetterLyrics.WinUI3.Controls
|
||||||
{
|
{
|
||||||
public sealed partial class LyricsBavkgroundSettingsControl : UserControl
|
public sealed partial class LyricsBackgroundSettingsControl : UserControl
|
||||||
{
|
{
|
||||||
public LyricsBackgroundSettingsControlViewModel ViewModel => (LyricsBackgroundSettingsControlViewModel)DataContext;
|
public LyricsBackgroundSettingsControlViewModel ViewModel => (LyricsBackgroundSettingsControlViewModel)DataContext;
|
||||||
|
|
||||||
public LyricsBavkgroundSettingsControl()
|
public LyricsBackgroundSettingsControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
DataContext = Ioc.Default.GetRequiredService<LyricsBackgroundSettingsControlViewModel>();
|
DataContext = Ioc.Default.GetRequiredService<LyricsBackgroundSettingsControlViewModel>();
|
||||||
@@ -0,0 +1,227 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<UserControl
|
||||||
|
x:Class="BetterLyrics.WinUI3.Controls.LyricsSearchControl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
|
||||||
|
xmlns:local="using:BetterLyrics.WinUI3.Controls"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:ui="using:CommunityToolkit.WinUI"
|
||||||
|
mc:Ignorable="d">
|
||||||
|
|
||||||
|
<Grid Padding="16" RowSpacing="6">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid Grid.Row="0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid Grid.Column="0">
|
||||||
|
<StackPanel Spacing="{StaticResource SettingsCardSpacing}">
|
||||||
|
<controls:SettingsExpander x:Uid="LyricsSearchControlSongInfoMapping" IsExpanded="True">
|
||||||
|
<controls:SettingsExpander.Items>
|
||||||
|
<controls:SettingsCard x:Uid="LyricsSearchControlTitle" Description="{x:Bind ViewModel.MappedSongSearchQuery.OriginalTitle, Mode=OneWay}">
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="6">
|
||||||
|
<TextBlock x:Uid="LyricsSearchControlMappedAs" VerticalAlignment="Center" />
|
||||||
|
<TextBox Text="{x:Bind ViewModel.MappedSongSearchQuery.MappedTitle, Mode=TwoWay}" TextWrapping="Wrap" />
|
||||||
|
<Button
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Command="{x:Bind ViewModel.ResetMappedTitleCommand}"
|
||||||
|
Content="{ui:FontIcon FontFamily={StaticResource IconFontFamily},
|
||||||
|
FontSize=12,
|
||||||
|
Glyph=}"
|
||||||
|
Style="{StaticResource GhostButtonStyle}" />
|
||||||
|
</StackPanel>
|
||||||
|
</controls:SettingsCard>
|
||||||
|
<controls:SettingsCard x:Uid="LyricsSearchControlArtist" Description="{x:Bind ViewModel.MappedSongSearchQuery.OriginalArtist, Mode=OneWay}">
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="6">
|
||||||
|
<TextBlock x:Uid="LyricsSearchControlMappedAs" VerticalAlignment="Center" />
|
||||||
|
<TextBox Text="{x:Bind ViewModel.MappedSongSearchQuery.MappedArtist, Mode=TwoWay}" TextWrapping="Wrap" />
|
||||||
|
<Button
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Command="{x:Bind ViewModel.ResetMappedArtistCommand}"
|
||||||
|
Content="{ui:FontIcon FontFamily={StaticResource IconFontFamily},
|
||||||
|
FontSize=12,
|
||||||
|
Glyph=}"
|
||||||
|
Style="{StaticResource GhostButtonStyle}" />
|
||||||
|
</StackPanel>
|
||||||
|
</controls:SettingsCard>
|
||||||
|
<controls:SettingsCard>
|
||||||
|
<CheckBox x:Uid="LyricsSearchControlMarkAsPureMusic" IsChecked="{x:Bind ViewModel.MappedSongSearchQuery.IsMarkedAsPureMusic, Mode=TwoWay}" />
|
||||||
|
</controls:SettingsCard>
|
||||||
|
</controls:SettingsExpander.Items>
|
||||||
|
</controls:SettingsExpander>
|
||||||
|
|
||||||
|
<controls:SettingsCard x:Uid="LyricsSearchControlTargetSearchProvider">
|
||||||
|
<Button
|
||||||
|
x:Uid="LyricsSearchControlSearch"
|
||||||
|
Command="{x:Bind ViewModel.SearchCommand}"
|
||||||
|
Style="{StaticResource AccentButtonStyle}" />
|
||||||
|
</controls:SettingsCard>
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
<Grid Grid.Column="1">
|
||||||
|
<ListView ItemsSource="{x:Bind ViewModel.LyricsSearchResults, Mode=OneWay}" SelectedItem="{x:Bind ViewModel.SelectedLyricsSearchResult, Mode=TwoWay}">
|
||||||
|
<ListView.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<ListViewItem IsEnabled="{Binding IsFound}">
|
||||||
|
<Grid Opacity="{Binding IsFound, Converter={StaticResource BoolToOpacityConverter}}">
|
||||||
|
<RelativePanel Padding="0,6">
|
||||||
|
<TextBlock
|
||||||
|
x:Name="SearchedTitle"
|
||||||
|
RelativePanel.AlignLeftWithPanel="True"
|
||||||
|
Text="{Binding Title}"
|
||||||
|
Visibility="{Binding IsFound, Converter={StaticResource BoolToVisibilityConverter}}" />
|
||||||
|
<TextBlock
|
||||||
|
x:Name="SearchedArtists"
|
||||||
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||||
|
RelativePanel.AlignLeftWithPanel="True"
|
||||||
|
RelativePanel.Below="SearchedTitle"
|
||||||
|
Text="{Binding Artist}"
|
||||||
|
Visibility="{Binding IsFound, Converter={StaticResource BoolToVisibilityConverter}}" />
|
||||||
|
<TextBlock
|
||||||
|
x:Name="SearchedProvider"
|
||||||
|
RelativePanel.AlignRightWithPanel="True"
|
||||||
|
RelativePanel.AlignVerticalCenterWithPanel="True"
|
||||||
|
Text="{Binding Provider, Converter={StaticResource LyricsSearchProviderToDisplayNameConverter}}" />
|
||||||
|
</RelativePanel>
|
||||||
|
<TextBlock
|
||||||
|
x:Uid="LyricsSearchControlNotFound"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Text="Not found"
|
||||||
|
Visibility="{Binding IsFound, Converter={StaticResource BoolNegationToVisibilityConverter}}" />
|
||||||
|
</Grid>
|
||||||
|
</ListViewItem>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListView.ItemTemplate>
|
||||||
|
<interactivity:Interaction.Behaviors>
|
||||||
|
<interactivity:DataTriggerBehavior
|
||||||
|
Binding="{x:Bind ViewModel.LyricsSearchResults.Count, Mode=OneWay}"
|
||||||
|
ComparisonCondition="Equal"
|
||||||
|
Value="0">
|
||||||
|
<interactivity:ChangePropertyAction PropertyName="Visibility" Value="Collapsed" />
|
||||||
|
</interactivity:DataTriggerBehavior>
|
||||||
|
<interactivity:DataTriggerBehavior
|
||||||
|
Binding="{x:Bind ViewModel.LyricsSearchResults.Count, Mode=OneWay}"
|
||||||
|
ComparisonCondition="NotEqual"
|
||||||
|
Value="0">
|
||||||
|
<interactivity:ChangePropertyAction PropertyName="Visibility" Value="Visible" />
|
||||||
|
</interactivity:DataTriggerBehavior>
|
||||||
|
</interactivity:Interaction.Behaviors>
|
||||||
|
</ListView>
|
||||||
|
<StackPanel
|
||||||
|
Padding="0,36"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Spacing="12">
|
||||||
|
<Image MaxWidth="100" Source="/Assets/Empty.png" />
|
||||||
|
<interactivity:Interaction.Behaviors>
|
||||||
|
<interactivity:DataTriggerBehavior
|
||||||
|
Binding="{x:Bind ViewModel.LyricsSearchResults.Count, Mode=OneWay}"
|
||||||
|
ComparisonCondition="NotEqual"
|
||||||
|
Value="0">
|
||||||
|
<interactivity:ChangePropertyAction PropertyName="Visibility" Value="Collapsed" />
|
||||||
|
</interactivity:DataTriggerBehavior>
|
||||||
|
<interactivity:DataTriggerBehavior
|
||||||
|
Binding="{x:Bind ViewModel.LyricsSearchResults.Count, Mode=OneWay}"
|
||||||
|
ComparisonCondition="Equal"
|
||||||
|
Value="0">
|
||||||
|
<interactivity:ChangePropertyAction PropertyName="Visibility" Value="Visible" />
|
||||||
|
</interactivity:DataTriggerBehavior>
|
||||||
|
</interactivity:Interaction.Behaviors>
|
||||||
|
</StackPanel>
|
||||||
|
<ProgressBar
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
IsIndeterminate="True"
|
||||||
|
ShowError="False"
|
||||||
|
ShowPaused="False"
|
||||||
|
Visibility="{x:Bind ViewModel.IsSearching, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay}" />
|
||||||
|
</Grid>
|
||||||
|
<Grid Grid.Column="2">
|
||||||
|
<ListView ItemsSource="{x:Bind ViewModel.LyricsData.LyricsLines, Mode=OneWay}" SelectedItem="{x:Bind ViewModel.SelectedLyricsLine, Mode=TwoWay}">
|
||||||
|
<interactivity:Interaction.Behaviors>
|
||||||
|
<interactivity:DataTriggerBehavior
|
||||||
|
Binding="{x:Bind ViewModel.LyricsData, Mode=OneWay}"
|
||||||
|
ComparisonCondition="Equal"
|
||||||
|
Value="{x:Null}">
|
||||||
|
<interactivity:ChangePropertyAction PropertyName="Visibility" Value="Collapsed" />
|
||||||
|
</interactivity:DataTriggerBehavior>
|
||||||
|
<interactivity:DataTriggerBehavior
|
||||||
|
Binding="{x:Bind ViewModel.LyricsData, Mode=OneWay}"
|
||||||
|
ComparisonCondition="NotEqual"
|
||||||
|
Value="{x:Null}">
|
||||||
|
<interactivity:ChangePropertyAction PropertyName="Visibility" Value="Visible" />
|
||||||
|
</interactivity:DataTriggerBehavior>
|
||||||
|
</interactivity:Interaction.Behaviors>
|
||||||
|
<ListView.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Foreground="{ThemeResource SystemFillColorNeutralBrush}" Text="{Binding StartMs, Converter={StaticResource MillisecondsToFormattedTimeConverter}}" />
|
||||||
|
<TextBlock
|
||||||
|
Margin="1,0"
|
||||||
|
Foreground="{ThemeResource SystemFillColorNeutralBrush}"
|
||||||
|
Text="-" />
|
||||||
|
<TextBlock Foreground="{ThemeResource SystemFillColorNeutralBrush}" Text="{Binding EndMs, Converter={StaticResource MillisecondsToFormattedTimeConverter}}" />
|
||||||
|
<TextBlock Margin="6,0" Text="{Binding OriginalText}" />
|
||||||
|
</StackPanel>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListView.ItemTemplate>
|
||||||
|
</ListView>
|
||||||
|
<StackPanel
|
||||||
|
Padding="0,36"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Spacing="12">
|
||||||
|
<Image MaxWidth="100" Source="/Assets/Page.png" />
|
||||||
|
<interactivity:Interaction.Behaviors>
|
||||||
|
<interactivity:DataTriggerBehavior
|
||||||
|
Binding="{x:Bind ViewModel.LyricsData, Mode=OneWay}"
|
||||||
|
ComparisonCondition="NotEqual"
|
||||||
|
Value="{x:Null}">
|
||||||
|
<interactivity:ChangePropertyAction PropertyName="Visibility" Value="Collapsed" />
|
||||||
|
</interactivity:DataTriggerBehavior>
|
||||||
|
<interactivity:DataTriggerBehavior
|
||||||
|
Binding="{x:Bind ViewModel.LyricsData, Mode=OneWay}"
|
||||||
|
ComparisonCondition="Equal"
|
||||||
|
Value="{x:Null}">
|
||||||
|
<interactivity:ChangePropertyAction PropertyName="Visibility" Value="Visible" />
|
||||||
|
</interactivity:DataTriggerBehavior>
|
||||||
|
</interactivity:Interaction.Behaviors>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
<Grid Grid.Row="1">
|
||||||
|
<RelativePanel>
|
||||||
|
<TextBlock
|
||||||
|
x:Uid="LyricsSearchControlHelp"
|
||||||
|
Margin="0,0,24,0"
|
||||||
|
FontSize="12"
|
||||||
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||||
|
RelativePanel.AlignVerticalCenterWithPanel="True"
|
||||||
|
RelativePanel.LeftOf="Reset"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
<Button
|
||||||
|
x:Name="Reset"
|
||||||
|
x:Uid="LyricsSearchControlReset"
|
||||||
|
Margin="0,0,6,0"
|
||||||
|
Command="{x:Bind ViewModel.ResetCommand}"
|
||||||
|
RelativePanel.AlignVerticalCenterWithPanel="True"
|
||||||
|
RelativePanel.LeftOf="SaveChanges" />
|
||||||
|
<Button
|
||||||
|
x:Name="SaveChanges"
|
||||||
|
x:Uid="LyricsSearchControlSaveChanges"
|
||||||
|
Command="{x:Bind ViewModel.SaveCommand}"
|
||||||
|
RelativePanel.AlignRightWithPanel="True"
|
||||||
|
RelativePanel.AlignVerticalCenterWithPanel="True"
|
||||||
|
Style="{StaticResource AccentButtonStyle}" />
|
||||||
|
</RelativePanel>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
using BetterLyrics.WinUI3.Models;
|
||||||
|
using BetterLyrics.WinUI3.ViewModels;
|
||||||
|
using CommunityToolkit.Mvvm.DependencyInjection;
|
||||||
|
using Microsoft.UI.Xaml;
|
||||||
|
using Microsoft.UI.Xaml.Controls;
|
||||||
|
using Microsoft.UI.Xaml.Controls.Primitives;
|
||||||
|
using Microsoft.UI.Xaml.Data;
|
||||||
|
using Microsoft.UI.Xaml.Input;
|
||||||
|
using Microsoft.UI.Xaml.Media;
|
||||||
|
using Microsoft.UI.Xaml.Navigation;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.InteropServices.WindowsRuntime;
|
||||||
|
using Ude.Core;
|
||||||
|
using Windows.Foundation;
|
||||||
|
using Windows.Foundation.Collections;
|
||||||
|
|
||||||
|
// To learn more about WinUI, the WinUI project structure,
|
||||||
|
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
||||||
|
|
||||||
|
namespace BetterLyrics.WinUI3.Controls
|
||||||
|
{
|
||||||
|
public sealed partial class LyricsSearchControl : UserControl
|
||||||
|
{
|
||||||
|
public LyricsSearchControlViewModel ViewModel => (LyricsSearchControlViewModel)DataContext;
|
||||||
|
|
||||||
|
public LyricsSearchControl()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
DataContext = Ioc.Default.GetRequiredService<LyricsSearchControlViewModel>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -175,14 +175,25 @@
|
|||||||
</interactivity:Interaction.Behaviors>
|
</interactivity:Interaction.Behaviors>
|
||||||
</ColorPicker>
|
</ColorPicker>
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="SettingsPageLyricsFontSize" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
<controls:SettingsExpander
|
||||||
<local:ExtendedSlider
|
x:Uid="SettingsPageLyricsFontSize"
|
||||||
Frequency="2"
|
HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily},
|
||||||
Maximum="96"
|
Glyph=}"
|
||||||
Minimum="12"
|
IsExpanded="True">
|
||||||
ResetButtonVisibility="Collapsed"
|
<controls:SettingsExpander.Items>
|
||||||
Value="{x:Bind LyricsStyleSettings.LyricsFontSize, Mode=TwoWay}" />
|
<controls:SettingsCard x:Uid="SettingsPageDynamicLyricsFontSize">
|
||||||
</controls:SettingsCard>
|
<ToggleSwitch IsOn="{x:Bind LyricsStyleSettings.IsDynamicLyricsFontSize, Mode=TwoWay}" />
|
||||||
|
</controls:SettingsCard>
|
||||||
|
<controls:SettingsCard IsEnabled="{x:Bind LyricsStyleSettings.IsDynamicLyricsFontSize, Converter={StaticResource BoolNegationConverter}, Mode=OneWay}">
|
||||||
|
<local:ExtendedSlider
|
||||||
|
Frequency="2"
|
||||||
|
Maximum="96"
|
||||||
|
Minimum="12"
|
||||||
|
ResetButtonVisibility="Collapsed"
|
||||||
|
Value="{x:Bind LyricsStyleSettings.LyricsFontSize, Mode=TwoWay}" />
|
||||||
|
</controls:SettingsCard>
|
||||||
|
</controls:SettingsExpander.Items>
|
||||||
|
</controls:SettingsExpander>
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="SettingsPageLyricsLineSpacingFactor" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
<controls:SettingsCard x:Uid="SettingsPageLyricsLineSpacingFactor" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
||||||
<local:ExtendedSlider
|
<local:ExtendedSlider
|
||||||
@@ -234,14 +245,46 @@
|
|||||||
<ToggleSwitch IsOn="{x:Bind LyricsEffectSettings.IsLyricsLineFadeEnabled, Mode=TwoWay}" />
|
<ToggleSwitch IsOn="{x:Bind LyricsEffectSettings.IsLyricsLineFadeEnabled, Mode=TwoWay}" />
|
||||||
</controls:SettingsCard>
|
</controls:SettingsCard>
|
||||||
|
|
||||||
<!-- 高亮 -->
|
<!-- 译文高亮 -->
|
||||||
<controls:SettingsCard x:Uid="SettingsPageLyricsHighlightScope" HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily}, Glyph=}">
|
<controls:SettingsExpander
|
||||||
|
x:Uid="SettingsPageLyricsTranslationHighlight"
|
||||||
|
HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily},
|
||||||
|
Glyph=}"
|
||||||
|
IsExpanded="True">
|
||||||
|
<controls:SettingsExpander.Items>
|
||||||
|
<controls:SettingsCard x:Uid="SettingsPageAmount">
|
||||||
|
<local:ExtendedSlider
|
||||||
|
Default="60"
|
||||||
|
Frequency="5"
|
||||||
|
Maximum="100"
|
||||||
|
Minimum="0"
|
||||||
|
Value="{x:Bind LyricsEffectSettings.LyricsTranslationHighlightAmount, Mode=TwoWay}" />
|
||||||
|
</controls:SettingsCard>
|
||||||
|
</controls:SettingsExpander.Items>
|
||||||
|
</controls:SettingsExpander>
|
||||||
|
|
||||||
|
<!-- 原文高亮 -->
|
||||||
|
<controls:SettingsExpander
|
||||||
|
x:Uid="SettingsPageLyricsHighlightScope"
|
||||||
|
HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily},
|
||||||
|
Glyph=}"
|
||||||
|
IsExpanded="True">
|
||||||
<ComboBox SelectedIndex="{x:Bind LyricsEffectSettings.LyricsHighlightScope, Mode=TwoWay, Converter={StaticResource EnumToIntConverter}}">
|
<ComboBox SelectedIndex="{x:Bind LyricsEffectSettings.LyricsHighlightScope, Mode=TwoWay, Converter={StaticResource EnumToIntConverter}}">
|
||||||
<ComboBoxItem x:Uid="SettingsPageLyricsRendingScopeCurrentChar" />
|
<ComboBoxItem x:Uid="SettingsPageLyricsRendingScopeCurrentChar" />
|
||||||
<ComboBoxItem x:Uid="SettingsPageLyricsRendingScopeLineStartToCurrentChar" />
|
<ComboBoxItem x:Uid="SettingsPageLyricsRendingScopeLineStartToCurrentChar" />
|
||||||
<ComboBoxItem x:Uid="SettingsPageLyricsRendingScopeCurrentLine" />
|
<ComboBoxItem x:Uid="SettingsPageLyricsRendingScopeCurrentLine" />
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
</controls:SettingsCard>
|
<controls:SettingsExpander.Items>
|
||||||
|
<controls:SettingsCard x:Uid="SettingsPageAmount">
|
||||||
|
<local:ExtendedSlider
|
||||||
|
Default="100"
|
||||||
|
Frequency="5"
|
||||||
|
Maximum="100"
|
||||||
|
Minimum="0"
|
||||||
|
Value="{x:Bind LyricsEffectSettings.LyricsHighlightAmount, Mode=TwoWay}" />
|
||||||
|
</controls:SettingsCard>
|
||||||
|
</controls:SettingsExpander.Items>
|
||||||
|
</controls:SettingsExpander>
|
||||||
|
|
||||||
<!-- 阴影 -->
|
<!-- 阴影 -->
|
||||||
<controls:SettingsExpander
|
<controls:SettingsExpander
|
||||||
@@ -319,6 +362,7 @@
|
|||||||
<ToggleSwitch IsOn="{x:Bind LyricsEffectSettings.IsFanLyricsEnabled, Mode=TwoWay}" />
|
<ToggleSwitch IsOn="{x:Bind LyricsEffectSettings.IsFanLyricsEnabled, Mode=TwoWay}" />
|
||||||
</controls:SettingsCard>
|
</controls:SettingsCard>
|
||||||
|
|
||||||
|
<!-- 滚动动画 -->
|
||||||
<controls:SettingsExpander
|
<controls:SettingsExpander
|
||||||
x:Uid="SettingsPageScrollEasing"
|
x:Uid="SettingsPageScrollEasing"
|
||||||
HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily},
|
HeaderIcon="{ui:FontIcon FontFamily={StaticResource IconFontFamily},
|
||||||
@@ -341,7 +385,6 @@
|
|||||||
<controls:SettingsExpander.Items>
|
<controls:SettingsExpander.Items>
|
||||||
<controls:SettingsCard x:Uid="SettingsPageScrollTopDuration">
|
<controls:SettingsCard x:Uid="SettingsPageScrollTopDuration">
|
||||||
<local:ExtendedSlider
|
<local:ExtendedSlider
|
||||||
x:Uid="SettingsPageLyricsScrollTopDurationExtendedSlider"
|
|
||||||
Default="500"
|
Default="500"
|
||||||
Frequency="50"
|
Frequency="50"
|
||||||
Maximum="1000"
|
Maximum="1000"
|
||||||
@@ -351,7 +394,6 @@
|
|||||||
</controls:SettingsCard>
|
</controls:SettingsCard>
|
||||||
<controls:SettingsCard x:Uid="SettingsPageScrollDuration">
|
<controls:SettingsCard x:Uid="SettingsPageScrollDuration">
|
||||||
<local:ExtendedSlider
|
<local:ExtendedSlider
|
||||||
x:Uid="SettingsPageLyricsScrollDurationExtendedSlider"
|
|
||||||
Default="500"
|
Default="500"
|
||||||
Frequency="50"
|
Frequency="50"
|
||||||
Maximum="1000"
|
Maximum="1000"
|
||||||
@@ -361,7 +403,6 @@
|
|||||||
</controls:SettingsCard>
|
</controls:SettingsCard>
|
||||||
<controls:SettingsCard x:Uid="SettingsPageScrollBottomDuration">
|
<controls:SettingsCard x:Uid="SettingsPageScrollBottomDuration">
|
||||||
<local:ExtendedSlider
|
<local:ExtendedSlider
|
||||||
x:Uid="SettingsPageLyricsScrollBottomDurationExtendedSlider"
|
|
||||||
Default="500"
|
Default="500"
|
||||||
Frequency="50"
|
Frequency="50"
|
||||||
Maximum="1000"
|
Maximum="1000"
|
||||||
@@ -369,6 +410,24 @@
|
|||||||
Unit="ms"
|
Unit="ms"
|
||||||
Value="{x:Bind LyricsEffectSettings.LyricsScrollBottomDuration, Mode=TwoWay}" />
|
Value="{x:Bind LyricsEffectSettings.LyricsScrollBottomDuration, Mode=TwoWay}" />
|
||||||
</controls:SettingsCard>
|
</controls:SettingsCard>
|
||||||
|
<controls:SettingsCard x:Uid="SettingsPageScrollTopDelay">
|
||||||
|
<local:ExtendedSlider
|
||||||
|
Default="0"
|
||||||
|
Frequency="50"
|
||||||
|
Maximum="2000"
|
||||||
|
Minimum="0"
|
||||||
|
Unit="ms"
|
||||||
|
Value="{x:Bind LyricsEffectSettings.LyricsScrollTopDelay, Mode=TwoWay}" />
|
||||||
|
</controls:SettingsCard>
|
||||||
|
<controls:SettingsCard x:Uid="SettingsPageScrollBottomDelay">
|
||||||
|
<local:ExtendedSlider
|
||||||
|
Default="0"
|
||||||
|
Frequency="50"
|
||||||
|
Maximum="2000"
|
||||||
|
Minimum="0"
|
||||||
|
Unit="ms"
|
||||||
|
Value="{x:Bind LyricsEffectSettings.LyricsScrollBottomDelay, Mode=TwoWay}" />
|
||||||
|
</controls:SettingsCard>
|
||||||
</controls:SettingsExpander.Items>
|
</controls:SettingsExpander.Items>
|
||||||
</controls:SettingsExpander>
|
</controls:SettingsExpander>
|
||||||
|
|
||||||
|
|||||||
@@ -31,16 +31,20 @@
|
|||||||
</controls:SettingsCard>
|
</controls:SettingsCard>
|
||||||
|
|
||||||
<!-- 时间轴相关配置 -->
|
<!-- 时间轴相关配置 -->
|
||||||
<controls:SettingsCard x:Uid="SettingsPageLyricsTimelineThreshold">
|
<controls:SettingsExpander x:Uid="SettingsPageLyricsTimeline" IsExpanded="True">
|
||||||
<local:ExtendedSlider
|
<ToggleSwitch IsOn="{x:Bind ViewModel.SelectedMediaSourceProvider.IsTimelineSyncEnabled, Mode=TwoWay}" />
|
||||||
x:Uid="SettingsPageLyricsTimelineThresholdReset"
|
<controls:SettingsExpander.Items>
|
||||||
Frequency="100"
|
<controls:SettingsCard x:Uid="SettingsPageLyricsTimelineThreshold" IsEnabled="{x:Bind ViewModel.SelectedMediaSourceProvider.IsTimelineSyncEnabled, Mode=OneWay}">
|
||||||
Maximum="1000"
|
<local:ExtendedSlider
|
||||||
Minimum="0"
|
Frequency="100"
|
||||||
ResetButtonVisibility="Collapsed"
|
Maximum="1000"
|
||||||
Unit="ms"
|
Minimum="0"
|
||||||
Value="{x:Bind ViewModel.SelectedMediaSourceProvider.TimelineSyncThreshold, Mode=TwoWay}" />
|
ResetButtonVisibility="Collapsed"
|
||||||
</controls:SettingsCard>
|
Unit="ms"
|
||||||
|
Value="{x:Bind ViewModel.SelectedMediaSourceProvider.TimelineSyncThreshold, Mode=TwoWay}" />
|
||||||
|
</controls:SettingsCard>
|
||||||
|
</controls:SettingsExpander.Items>
|
||||||
|
</controls:SettingsExpander>
|
||||||
<controls:SettingsExpander x:Uid="MainPagePositionOffsetSlider" IsExpanded="True">
|
<controls:SettingsExpander x:Uid="MainPagePositionOffsetSlider" IsExpanded="True">
|
||||||
<local:ExtendedSlider
|
<local:ExtendedSlider
|
||||||
x:Uid="SettingsPagePositionOffsetReset"
|
x:Uid="SettingsPagePositionOffsetReset"
|
||||||
@@ -227,42 +231,60 @@
|
|||||||
IsExpanded="True">
|
IsExpanded="True">
|
||||||
<ToggleSwitch IsOn="{x:Bind ViewModel.AppSettings.TranslationSettings.IsTranslationEnabled, Mode=TwoWay}" />
|
<ToggleSwitch IsOn="{x:Bind ViewModel.AppSettings.TranslationSettings.IsTranslationEnabled, Mode=TwoWay}" />
|
||||||
<controls:SettingsExpander.Items>
|
<controls:SettingsExpander.Items>
|
||||||
<controls:SettingsCard x:Uid="SettingsPageTargetLanguage">
|
<controls:SettingsCard x:Uid="SettingsPageTargetLanguage" IsEnabled="{x:Bind ViewModel.AppSettings.TranslationSettings.IsTranslationEnabled, Mode=OneWay}">
|
||||||
<ComboBox SelectedIndex="{x:Bind ViewModel.AppSettings.TranslationSettings.SelectedTargetLanguageIndex, Mode=TwoWay}">
|
<ComboBox SelectedIndex="{x:Bind ViewModel.SelectedTargetLanguageIndex, Mode=TwoWay}">
|
||||||
<ComboBoxItem Content="العربية" Tag="ar" />
|
<ComboBoxItem Content="العربية" Tag="ar" />
|
||||||
<ComboBoxItem Content="Azərbaycan dili" Tag="az" />
|
<ComboBoxItem Content="Azərbaycan dili" Tag="az" />
|
||||||
<ComboBoxItem Content="简体中文" Tag="zh-Hans" />
|
<ComboBoxItem Content="Български" Tag="bg" />
|
||||||
<ComboBoxItem Content="繁體中文" Tag="zh-Hant" />
|
<ComboBoxItem Content="বাংলা" Tag="bn" />
|
||||||
|
<ComboBoxItem Content="Català" Tag="ca" />
|
||||||
<ComboBoxItem Content="Čeština" Tag="cs" />
|
<ComboBoxItem Content="Čeština" Tag="cs" />
|
||||||
<ComboBoxItem Content="Dansk" Tag="da" />
|
<ComboBoxItem Content="Dansk" Tag="da" />
|
||||||
<ComboBoxItem Content="Nederlands" Tag="nl" />
|
|
||||||
<ComboBoxItem Content="English" Tag="en" />
|
|
||||||
<ComboBoxItem Content="Esperanto" Tag="eo" />
|
|
||||||
<ComboBoxItem Content="Suomi" Tag="fi" />
|
|
||||||
<ComboBoxItem Content="Français" Tag="fr" />
|
|
||||||
<ComboBoxItem Content="Deutsch" Tag="de" />
|
<ComboBoxItem Content="Deutsch" Tag="de" />
|
||||||
<ComboBoxItem Content="Ελληνικά" Tag="el" />
|
<ComboBoxItem Content="Ελληνικά" Tag="el" />
|
||||||
|
<ComboBoxItem Content="English" Tag="en" />
|
||||||
|
<ComboBoxItem Content="Esperanto" Tag="eo" />
|
||||||
|
<ComboBoxItem Content="Español" Tag="es" />
|
||||||
|
<ComboBoxItem Content="Eesti" Tag="et" />
|
||||||
|
<ComboBoxItem Content="Euskara" Tag="eu" />
|
||||||
|
<ComboBoxItem Content="فارسی" Tag="fa" />
|
||||||
|
<ComboBoxItem Content="Suomi" Tag="fi" />
|
||||||
|
<ComboBoxItem Content="Français" Tag="fr" />
|
||||||
|
<ComboBoxItem Content="Gaeilge" Tag="ga" />
|
||||||
|
<ComboBoxItem Content="Galego" Tag="gl" />
|
||||||
<ComboBoxItem Content="עברית" Tag="he" />
|
<ComboBoxItem Content="עברית" Tag="he" />
|
||||||
<ComboBoxItem Content="हिन्दी" Tag="hi" />
|
<ComboBoxItem Content="हिन्दी" Tag="hi" />
|
||||||
<ComboBoxItem Content="Magyar" Tag="hu" />
|
<ComboBoxItem Content="Magyar" Tag="hu" />
|
||||||
<ComboBoxItem Content="Bahasa Indonesia" Tag="id" />
|
<ComboBoxItem Content="Bahasa Indonesia" Tag="id" />
|
||||||
<ComboBoxItem Content="Gaeilge" Tag="ga" />
|
|
||||||
<ComboBoxItem Content="Italiano" Tag="it" />
|
<ComboBoxItem Content="Italiano" Tag="it" />
|
||||||
<ComboBoxItem Content="日本語" Tag="ja" />
|
<ComboBoxItem Content="日本語" Tag="ja" />
|
||||||
<ComboBoxItem Content="한국어" Tag="ko" />
|
<ComboBoxItem Content="한국어" Tag="ko" />
|
||||||
<ComboBoxItem Content="فارسی" Tag="fa" />
|
<ComboBoxItem Content="Кыргызча" Tag="ky" />
|
||||||
|
<ComboBoxItem Content="Lietuvių" Tag="lt" />
|
||||||
|
<ComboBoxItem Content="Latviešu" Tag="lv" />
|
||||||
|
<ComboBoxItem Content="Bahasa Melayu" Tag="ms" />
|
||||||
|
<ComboBoxItem Content="Norsk bokmål" Tag="nb" />
|
||||||
|
<ComboBoxItem Content="Nederlands" Tag="nl" />
|
||||||
|
<ComboBoxItem Content="Português (Brasil)" Tag="pt-BR" />
|
||||||
<ComboBoxItem Content="Polski" Tag="pl" />
|
<ComboBoxItem Content="Polski" Tag="pl" />
|
||||||
<ComboBoxItem Content="Português" Tag="pt" />
|
<ComboBoxItem Content="Português" Tag="pt" />
|
||||||
|
<ComboBoxItem Content="Română" Tag="ro" />
|
||||||
<ComboBoxItem Content="Русский" Tag="ru" />
|
<ComboBoxItem Content="Русский" Tag="ru" />
|
||||||
<ComboBoxItem Content="Slovenčina" Tag="sk" />
|
<ComboBoxItem Content="Slovenčina" Tag="sk" />
|
||||||
<ComboBoxItem Content="Español" Tag="es" />
|
<ComboBoxItem Content="Slovenščina" Tag="sl" />
|
||||||
|
<ComboBoxItem Content="Shqip" Tag="sq" />
|
||||||
|
<ComboBoxItem Content="Српски" Tag="sr" />
|
||||||
<ComboBoxItem Content="Svenska" Tag="sv" />
|
<ComboBoxItem Content="Svenska" Tag="sv" />
|
||||||
|
<ComboBoxItem Content="ไทย" Tag="th" />
|
||||||
|
<ComboBoxItem Content="Filipino" Tag="tl" />
|
||||||
<ComboBoxItem Content="Türkçe" Tag="tr" />
|
<ComboBoxItem Content="Türkçe" Tag="tr" />
|
||||||
<ComboBoxItem Content="Українська" Tag="uk" />
|
<ComboBoxItem Content="Українська" Tag="uk" />
|
||||||
|
<ComboBoxItem Content="اردو" Tag="ur" />
|
||||||
<ComboBoxItem Content="Tiếng Việt" Tag="vi" />
|
<ComboBoxItem Content="Tiếng Việt" Tag="vi" />
|
||||||
|
<ComboBoxItem Content="中文" Tag="zh" />
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
</controls:SettingsCard>
|
</controls:SettingsCard>
|
||||||
<controls:SettingsCard x:Uid="SettingsPageTranslationConfig">
|
<controls:SettingsCard x:Uid="SettingsPageTranslationConfig" IsEnabled="{x:Bind ViewModel.AppSettings.TranslationSettings.IsTranslationEnabled, Mode=OneWay}">
|
||||||
<controls:SettingsCard.Description>
|
<controls:SettingsCard.Description>
|
||||||
<HyperlinkButton Margin="0,6,0,0" NavigateUri="https://github.com/LibreTranslate/LibreTranslate">
|
<HyperlinkButton Margin="0,6,0,0" NavigateUri="https://github.com/LibreTranslate/LibreTranslate">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
@@ -291,6 +313,29 @@
|
|||||||
</controls:SettingsCard>
|
</controls:SettingsCard>
|
||||||
</controls:SettingsExpander.Items>
|
</controls:SettingsExpander.Items>
|
||||||
</controls:SettingsExpander>
|
</controls:SettingsExpander>
|
||||||
|
<!-- Lyrics phonetic -->
|
||||||
|
<controls:SettingsExpander
|
||||||
|
x:Uid="SettingsPageChinese"
|
||||||
|
IsEnabled="{x:Bind ViewModel.AppSettings.TranslationSettings.IsTranslationEnabled, Mode=OneWay}"
|
||||||
|
IsExpanded="True">
|
||||||
|
<ToggleSwitch IsOn="{x:Bind ViewModel.AppSettings.TranslationSettings.IsChineseRomanizationEnabled, Mode=TwoWay}" />
|
||||||
|
<controls:SettingsExpander.Items>
|
||||||
|
<controls:SettingsCard>
|
||||||
|
<ComboBox SelectedIndex="{x:Bind ViewModel.AppSettings.TranslationSettings.ChineseRomanization, Converter={StaticResource EnumToIntConverter}, Mode=TwoWay}">
|
||||||
|
<ComboBoxItem x:Uid="SettingsPagePinyin" />
|
||||||
|
<ComboBoxItem x:Uid="SettingsPageJyutping" />
|
||||||
|
</ComboBox>
|
||||||
|
</controls:SettingsCard>
|
||||||
|
</controls:SettingsExpander.Items>
|
||||||
|
</controls:SettingsExpander>
|
||||||
|
<controls:SettingsCard x:Uid="SettingsPageJapanese" IsEnabled="{x:Bind ViewModel.AppSettings.TranslationSettings.IsTranslationEnabled, Mode=OneWay}">
|
||||||
|
<ToggleSwitch IsOn="{x:Bind ViewModel.AppSettings.TranslationSettings.IsJapaneseRomanizationEnabled, Mode=TwoWay}" />
|
||||||
|
</controls:SettingsCard>
|
||||||
|
<!-- 中文简体繁体偏好 -->
|
||||||
|
<controls:SettingsCard x:Uid="SettingsPageChinesePreference">
|
||||||
|
<ToggleSwitch IsOn="{x:Bind ViewModel.AppSettings.TranslationSettings.IsTraditionalChineseEnabled, Mode=TwoWay}" />
|
||||||
|
</controls:SettingsCard>
|
||||||
|
<!-- Provider info -->
|
||||||
<controls:SettingsCard x:Uid="LyricsPageLyricsProviderPrefix">
|
<controls:SettingsCard x:Uid="LyricsPageLyricsProviderPrefix">
|
||||||
<TextBlock Foreground="{ThemeResource TextFillColorSecondaryBrush}" Text="{x:Bind ViewModel.LyricsSearchProvider, Mode=OneWay, Converter={StaticResource LyricsSearchProviderToDisplayNameConverter}}" />
|
<TextBlock Foreground="{ThemeResource TextFillColorSecondaryBrush}" Text="{x:Bind ViewModel.LyricsSearchProvider, Mode=OneWay, Converter={StaticResource LyricsSearchProviderToDisplayNameConverter}}" />
|
||||||
</controls:SettingsCard>
|
</controls:SettingsCard>
|
||||||
@@ -311,6 +356,26 @@
|
|||||||
IsEnabled="{x:Bind ViewModel.IsLXMusicServerTesting, Converter={StaticResource BoolNegationConverter}, Mode=OneWay}" />
|
IsEnabled="{x:Bind ViewModel.IsLXMusicServerTesting, Converter={StaticResource BoolNegationConverter}, Mode=OneWay}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</controls:SettingsCard>
|
</controls:SettingsCard>
|
||||||
|
<!-- Apple Music token -->
|
||||||
|
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" Text="media-user-token (for Apple Muisc)" />
|
||||||
|
<controls:SettingsCard
|
||||||
|
Background="{ThemeResource SystemFillColorCautionBackgroundBrush}"
|
||||||
|
Foreground="{ThemeResource SystemFillColorCautionBrush}"
|
||||||
|
Header="Use at your own risk">
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="6">
|
||||||
|
<TextBox
|
||||||
|
MaxWidth="250"
|
||||||
|
PlaceholderText="media-user-token"
|
||||||
|
Text="{x:Bind ViewModel.AppleMusicMediaUserToken, Mode=TwoWay}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
<Button
|
||||||
|
Command="{x:Bind ViewModel.SaveAppleMusicMediaUserTokenCommand}"
|
||||||
|
Content="{ui:FontIcon FontFamily={StaticResource IconFontFamily},
|
||||||
|
FontSize=12,
|
||||||
|
Glyph=}"
|
||||||
|
Style="{StaticResource GhostButtonStyle}" />
|
||||||
|
</StackPanel>
|
||||||
|
</controls:SettingsCard>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|||||||
@@ -24,6 +24,14 @@
|
|||||||
FontSize=12,
|
FontSize=12,
|
||||||
Glyph=}"
|
Glyph=}"
|
||||||
Style="{StaticResource GhostButtonStyle}" />
|
Style="{StaticResource GhostButtonStyle}" />
|
||||||
|
<Button
|
||||||
|
Margin="3,0,0,0"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Click="CheckButton_Click"
|
||||||
|
Content="{ui:FontIcon FontFamily={StaticResource IconFontFamily},
|
||||||
|
FontSize=12,
|
||||||
|
Glyph=}"
|
||||||
|
Style="{StaticResource GhostButtonStyle}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using BetterLyrics.WinUI3.Helper;
|
||||||
using Microsoft.UI.Input;
|
using Microsoft.UI.Input;
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Controls;
|
using Microsoft.UI.Xaml.Controls;
|
||||||
@@ -91,5 +92,22 @@ namespace BetterLyrics.WinUI3.Controls
|
|||||||
Shortcut = [];
|
Shortcut = [];
|
||||||
UpdateTextBox();
|
UpdateTextBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void CheckButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
bool registered = GlobalHotKeyHelper.IsHotKeyRegistered(Shortcut);
|
||||||
|
if (registered)
|
||||||
|
{
|
||||||
|
App.Current.SettingsWindowNotificationPanel?.Notify(
|
||||||
|
App.ResourceLoader!.GetString("SettingsPageShortcutRegSuccessInfo"),
|
||||||
|
InfoBarSeverity.Success);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
App.Current.SettingsWindowNotificationPanel?.Notify(
|
||||||
|
App.ResourceLoader!.GetString("SettingsPageShortcutRegFailInfo"),
|
||||||
|
InfoBarSeverity.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
using Microsoft.UI.Xaml;
|
||||||
|
using Microsoft.UI.Xaml.Data;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace BetterLyrics.WinUI3.Converter
|
||||||
|
{
|
||||||
|
public partial class BoolNegationToVisibilityConverter : IValueConverter
|
||||||
|
{
|
||||||
|
public object Convert(object value, Type targetType, object parameter, string language)
|
||||||
|
{
|
||||||
|
if (value is bool boolValue)
|
||||||
|
{
|
||||||
|
return boolValue ? Visibility.Collapsed : Visibility.Visible;
|
||||||
|
}
|
||||||
|
return Visibility.Visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter, string language)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
using Microsoft.UI.Xaml.Data;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace BetterLyrics.WinUI3.Converter
|
||||||
|
{
|
||||||
|
public class BoolToOpacityConverter : IValueConverter
|
||||||
|
{
|
||||||
|
public object Convert(object value, Type targetType, object parameter, string language)
|
||||||
|
{
|
||||||
|
if (value is bool boolValue)
|
||||||
|
{
|
||||||
|
return boolValue ? 1.0 : 0.3;
|
||||||
|
}
|
||||||
|
return 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter, string language)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -19,6 +19,7 @@ namespace BetterLyrics.WinUI3.Converter
|
|||||||
LyricsSearchProvider.Netease => "网易云音乐",
|
LyricsSearchProvider.Netease => "网易云音乐",
|
||||||
LyricsSearchProvider.Kugou => "酷狗音乐",
|
LyricsSearchProvider.Kugou => "酷狗音乐",
|
||||||
LyricsSearchProvider.AmllTtmlDb => "amll-ttml-db",
|
LyricsSearchProvider.AmllTtmlDb => "amll-ttml-db",
|
||||||
|
LyricsSearchProvider.AppleMusic => "Apple Music",
|
||||||
LyricsSearchProvider.LocalLrcFile => App.ResourceLoader!.GetString("LyricsSearchProviderLocalLrcFile"),
|
LyricsSearchProvider.LocalLrcFile => App.ResourceLoader!.GetString("LyricsSearchProviderLocalLrcFile"),
|
||||||
LyricsSearchProvider.LocalMusicFile => App.ResourceLoader!.GetString("LyricsSearchProviderLocalMusicFile"),
|
LyricsSearchProvider.LocalMusicFile => App.ResourceLoader!.GetString("LyricsSearchProviderLocalMusicFile"),
|
||||||
LyricsSearchProvider.LocalEslrcFile => App.ResourceLoader!.GetString("LyricsSearchProviderEslrcFile"),
|
LyricsSearchProvider.LocalEslrcFile => App.ResourceLoader!.GetString("LyricsSearchProviderEslrcFile"),
|
||||||
|
|||||||
@@ -2,10 +2,6 @@
|
|||||||
using BetterLyrics.WinUI3.Helper;
|
using BetterLyrics.WinUI3.Helper;
|
||||||
using Microsoft.UI.Xaml.Data;
|
using Microsoft.UI.Xaml.Data;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace BetterLyrics.WinUI3.Converter
|
namespace BetterLyrics.WinUI3.Converter
|
||||||
{
|
{
|
||||||
@@ -19,6 +15,7 @@ namespace BetterLyrics.WinUI3.Converter
|
|||||||
{
|
{
|
||||||
PlayerID.Spotify => PathHelper.SpotifyLogoPath,
|
PlayerID.Spotify => PathHelper.SpotifyLogoPath,
|
||||||
PlayerID.AppleMusic => PathHelper.AppleMusicLogoPath,
|
PlayerID.AppleMusic => PathHelper.AppleMusicLogoPath,
|
||||||
|
PlayerID.AppleMusicAlternative => PathHelper.AppleMusicLogoPath,
|
||||||
PlayerID.iTunes => PathHelper.iTunesLogoPath,
|
PlayerID.iTunes => PathHelper.iTunesLogoPath,
|
||||||
PlayerID.KugouMusic => PathHelper.KugouMusicLogoPath,
|
PlayerID.KugouMusic => PathHelper.KugouMusicLogoPath,
|
||||||
PlayerID.NetEaseCloudMusic => PathHelper.NetEaseCloudMusicLogoPath,
|
PlayerID.NetEaseCloudMusic => PathHelper.NetEaseCloudMusicLogoPath,
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
using Microsoft.UI.Xaml.Data;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace BetterLyrics.WinUI3.Converter
|
||||||
|
{
|
||||||
|
public class MillisecondsToFormattedTimeConverter : IValueConverter
|
||||||
|
{
|
||||||
|
public object Convert(object value, Type targetType, object parameter, string language)
|
||||||
|
{
|
||||||
|
if (value is int milliseconds)
|
||||||
|
{
|
||||||
|
return TimeSpan.FromMilliseconds(milliseconds).ToString(@"mm\:ss\.fff");
|
||||||
|
}
|
||||||
|
else if (value is double doubleMilliseconds)
|
||||||
|
{
|
||||||
|
return TimeSpan.FromMilliseconds(doubleMilliseconds).ToString(@"mm\:ss\.fff");
|
||||||
|
}
|
||||||
|
return value?.ToString() ?? "";
|
||||||
|
}
|
||||||
|
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter, string language)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
using Microsoft.UI.Xaml.Data;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace BetterLyrics.WinUI3.Converter
|
||||||
|
{
|
||||||
|
public class RectToMarginConverter : IValueConverter
|
||||||
|
{
|
||||||
|
public object Convert(object value, Type targetType, object parameter, string language)
|
||||||
|
{
|
||||||
|
if (value is Windows.Foundation.Rect rect)
|
||||||
|
{
|
||||||
|
return new Microsoft.UI.Xaml.Thickness(rect.X, rect.Y, 0, 0);
|
||||||
|
}
|
||||||
|
return new Microsoft.UI.Xaml.Thickness(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter, string language)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -19,6 +19,7 @@ namespace BetterLyrics.WinUI3.Converter
|
|||||||
TranslationSearchProvider.Netease => "网易云音乐",
|
TranslationSearchProvider.Netease => "网易云音乐",
|
||||||
TranslationSearchProvider.Kugou => "酷狗音乐",
|
TranslationSearchProvider.Kugou => "酷狗音乐",
|
||||||
TranslationSearchProvider.AmllTtmlDb => "amll-ttml-db",
|
TranslationSearchProvider.AmllTtmlDb => "amll-ttml-db",
|
||||||
|
TranslationSearchProvider.AppleMusic => "Apple Music",
|
||||||
TranslationSearchProvider.LocalLrcFile => App.ResourceLoader!.GetString("LyricsSearchProviderLocalLrcFile"),
|
TranslationSearchProvider.LocalLrcFile => App.ResourceLoader!.GetString("LyricsSearchProviderLocalLrcFile"),
|
||||||
TranslationSearchProvider.LocalMusicFile => App.ResourceLoader!.GetString("LyricsSearchProviderLocalMusicFile"),
|
TranslationSearchProvider.LocalMusicFile => App.ResourceLoader!.GetString("LyricsSearchProviderLocalMusicFile"),
|
||||||
TranslationSearchProvider.LocalEslrcFile => App.ResourceLoader!.GetString("LyricsSearchProviderEslrcFile"),
|
TranslationSearchProvider.LocalEslrcFile => App.ResourceLoader!.GetString("LyricsSearchProviderEslrcFile"),
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace BetterLyrics.WinUI3.Enums
|
||||||
|
{
|
||||||
|
public enum ChineseRomanization
|
||||||
|
{
|
||||||
|
Pinyin,
|
||||||
|
Jyutping,
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -67,5 +67,16 @@ namespace BetterLyrics.WinUI3.Enums
|
|||||||
_ => ".*",
|
_ => ".*",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static LyricsSearchProvider? ToLyricsSearchProvider(this LyricsFormat format)
|
||||||
|
{
|
||||||
|
return format switch
|
||||||
|
{
|
||||||
|
LyricsFormat.Lrc => LyricsSearchProvider.LocalLrcFile,
|
||||||
|
LyricsFormat.Eslrc => LyricsSearchProvider.LocalEslrcFile,
|
||||||
|
LyricsFormat.Ttml => LyricsSearchProvider.LocalTtmlFile,
|
||||||
|
_ => null,
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ namespace BetterLyrics.WinUI3.Enums
|
|||||||
LocalLrcFile,
|
LocalLrcFile,
|
||||||
LocalEslrcFile,
|
LocalEslrcFile,
|
||||||
LocalTtmlFile,
|
LocalTtmlFile,
|
||||||
|
AppleMusic,
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class LyricsSearchProviderExtensions
|
public static class LyricsSearchProviderExtensions
|
||||||
@@ -28,6 +29,7 @@ namespace BetterLyrics.WinUI3.Enums
|
|||||||
LyricsSearchProvider.Netease => PathHelper.NeteaseLyricsCacheDirectory,
|
LyricsSearchProvider.Netease => PathHelper.NeteaseLyricsCacheDirectory,
|
||||||
LyricsSearchProvider.Kugou => PathHelper.KugouLyricsCacheDirectory,
|
LyricsSearchProvider.Kugou => PathHelper.KugouLyricsCacheDirectory,
|
||||||
LyricsSearchProvider.AmllTtmlDb => PathHelper.AmllTtmlDbLyricsCacheDirectory,
|
LyricsSearchProvider.AmllTtmlDb => PathHelper.AmllTtmlDbLyricsCacheDirectory,
|
||||||
|
LyricsSearchProvider.AppleMusic => PathHelper.AppleMusicCacheDirectory,
|
||||||
_ => throw new System.ArgumentOutOfRangeException(nameof(provider)),
|
_ => throw new System.ArgumentOutOfRangeException(nameof(provider)),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -41,6 +43,7 @@ namespace BetterLyrics.WinUI3.Enums
|
|||||||
LyricsSearchProvider.Kugou => LyricsFormat.Krc,
|
LyricsSearchProvider.Kugou => LyricsFormat.Krc,
|
||||||
LyricsSearchProvider.Netease => LyricsFormat.Lrc,
|
LyricsSearchProvider.Netease => LyricsFormat.Lrc,
|
||||||
LyricsSearchProvider.AmllTtmlDb => LyricsFormat.Ttml,
|
LyricsSearchProvider.AmllTtmlDb => LyricsFormat.Ttml,
|
||||||
|
LyricsSearchProvider.AppleMusic => LyricsFormat.Ttml,
|
||||||
LyricsSearchProvider.LocalLrcFile => LyricsFormat.Lrc,
|
LyricsSearchProvider.LocalLrcFile => LyricsFormat.Lrc,
|
||||||
LyricsSearchProvider.LocalEslrcFile => LyricsFormat.Eslrc,
|
LyricsSearchProvider.LocalEslrcFile => LyricsFormat.Eslrc,
|
||||||
LyricsSearchProvider.LocalTtmlFile => LyricsFormat.Ttml,
|
LyricsSearchProvider.LocalTtmlFile => LyricsFormat.Ttml,
|
||||||
@@ -71,6 +74,7 @@ namespace BetterLyrics.WinUI3.Enums
|
|||||||
LyricsSearchProvider.Kugou => TranslationSearchProvider.Kugou,
|
LyricsSearchProvider.Kugou => TranslationSearchProvider.Kugou,
|
||||||
LyricsSearchProvider.Netease => TranslationSearchProvider.Netease,
|
LyricsSearchProvider.Netease => TranslationSearchProvider.Netease,
|
||||||
LyricsSearchProvider.AmllTtmlDb => TranslationSearchProvider.AmllTtmlDb,
|
LyricsSearchProvider.AmllTtmlDb => TranslationSearchProvider.AmllTtmlDb,
|
||||||
|
LyricsSearchProvider.AppleMusic => TranslationSearchProvider.AppleMusic,
|
||||||
LyricsSearchProvider.LocalMusicFile => TranslationSearchProvider.LocalMusicFile,
|
LyricsSearchProvider.LocalMusicFile => TranslationSearchProvider.LocalMusicFile,
|
||||||
LyricsSearchProvider.LocalLrcFile => TranslationSearchProvider.LocalLrcFile,
|
LyricsSearchProvider.LocalLrcFile => TranslationSearchProvider.LocalLrcFile,
|
||||||
LyricsSearchProvider.LocalEslrcFile => TranslationSearchProvider.LocalEslrcFile,
|
LyricsSearchProvider.LocalEslrcFile => TranslationSearchProvider.LocalEslrcFile,
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ namespace BetterLyrics.WinUI3.Enums
|
|||||||
{
|
{
|
||||||
public enum ShortcutID
|
public enum ShortcutID
|
||||||
{
|
{
|
||||||
DesktopLock,
|
LyricsWindowShowOrHide,
|
||||||
|
DesktopLockOrUnlock,
|
||||||
DesktopToggle,
|
DesktopToggle,
|
||||||
DockToggle,
|
DockToggle,
|
||||||
PictureInPictureToggle,
|
PictureInPictureToggle,
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ namespace BetterLyrics.WinUI3.Enums
|
|||||||
Netease,
|
Netease,
|
||||||
LrcLib,
|
LrcLib,
|
||||||
AmllTtmlDb,
|
AmllTtmlDb,
|
||||||
|
AppleMusic,
|
||||||
LocalMusicFile,
|
LocalMusicFile,
|
||||||
LocalLrcFile,
|
LocalLrcFile,
|
||||||
LocalEslrcFile,
|
LocalEslrcFile,
|
||||||
|
|||||||
126
BetterLyrics.WinUI3/BetterLyrics.WinUI3/Helper/AppleMusic.cs
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
using BetterLyrics.WinUI3.Constants;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.Json;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace BetterLyrics.WinUI3.Helper
|
||||||
|
{
|
||||||
|
public class AppleMusic
|
||||||
|
{
|
||||||
|
private readonly HttpClient _client;
|
||||||
|
private string _accessToken = "";
|
||||||
|
private string _storefront = "";
|
||||||
|
private string _language = "";
|
||||||
|
|
||||||
|
public AppleMusic()
|
||||||
|
{
|
||||||
|
_client = new HttpClient();
|
||||||
|
_client.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36");
|
||||||
|
_client.DefaultRequestHeaders.Add("Accept", "application/json");
|
||||||
|
_client.DefaultRequestHeaders.Add("Origin", "https://music.apple.com");
|
||||||
|
_client.DefaultRequestHeaders.Add("Referer", "https://music.apple.com/");
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<bool> InitAsync()
|
||||||
|
{
|
||||||
|
await GetAccessTokenAsync();
|
||||||
|
await SetMediaUserTokenAsync();
|
||||||
|
return
|
||||||
|
!string.IsNullOrEmpty(_accessToken) &&
|
||||||
|
!string.IsNullOrEmpty(PasswordVaultHelper.Get(Constants.App.AppName, Constants.AppleMusic.MediaUserTokenKey));
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task GetAccessTokenAsync()
|
||||||
|
{
|
||||||
|
var resp = await _client.GetStringAsync("https://music.apple.com/us/browse");
|
||||||
|
var jsMatch = Regex.Match(resp, "(?<=index)(.*?)(?=\\.js\")");
|
||||||
|
if (!jsMatch.Success) throw new Exception("Failed to find index.js");
|
||||||
|
var jsUrl = $"https://music.apple.com/assets/index{jsMatch.Value}.js";
|
||||||
|
var jsResp = await _client.GetStringAsync(jsUrl);
|
||||||
|
var tokenMatch = Regex.Match(jsResp, "(?=eyJh)(.*?)(?=\")");
|
||||||
|
if (!tokenMatch.Success) throw new Exception("Failed to find access token");
|
||||||
|
_accessToken = tokenMatch.Value;
|
||||||
|
_client.DefaultRequestHeaders.Remove("Authorization");
|
||||||
|
_client.DefaultRequestHeaders.Add("Authorization", $"Bearer {_accessToken}");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task SetMediaUserTokenAsync()
|
||||||
|
{
|
||||||
|
_client.DefaultRequestHeaders.Remove("media-user-token");
|
||||||
|
_client.DefaultRequestHeaders.Add("media-user-token",
|
||||||
|
PasswordVaultHelper.Get(Constants.App.AppName, Constants.AppleMusic.MediaUserTokenKey));
|
||||||
|
var resp = await _client.GetStringAsync("https://amp-api.music.apple.com/v1/me/storefront");
|
||||||
|
var json = JsonSerializer.Deserialize(resp, Serialization.SourceGenerationContext.Default.JsonElement);
|
||||||
|
_storefront = json.GetProperty("data")[0].GetProperty("id").ToString();
|
||||||
|
_language = json.GetProperty("data")[0].GetProperty("attributes").GetProperty("defaultLanguageTag").ToString();
|
||||||
|
_client.DefaultRequestHeaders.Remove("Accept-Language");
|
||||||
|
_client.DefaultRequestHeaders.Add("Accept-Language", $"{_language},en;q=0.9");
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<string?> GetLyricsAsync(string title, string artist)
|
||||||
|
{
|
||||||
|
string id = await SearchSongInfoAsync(artist, title);
|
||||||
|
|
||||||
|
var apiUrl = $"https://amp-api.music.apple.com/v1/catalog/{_storefront}/songs/{id}";
|
||||||
|
var url = apiUrl + $"?include[songs]=lyrics,syllable-lyrics&l={_language}";
|
||||||
|
var resp = await _client.GetStringAsync(url);
|
||||||
|
var json = JsonSerializer.Deserialize(resp, Serialization.SourceGenerationContext.Default.JsonElement);
|
||||||
|
var data = json.GetProperty("data");
|
||||||
|
if (data.GetArrayLength() == 0) return string.Empty;
|
||||||
|
var song = data[0];
|
||||||
|
|
||||||
|
if (!song.TryGetProperty("relationships", out var relationships))
|
||||||
|
return string.Empty;
|
||||||
|
|
||||||
|
if (relationships.TryGetProperty("syllable-lyrics", out var syllableLyrics) &&
|
||||||
|
syllableLyrics.GetProperty("data").GetArrayLength() > 0)
|
||||||
|
{
|
||||||
|
var syllableLyric = syllableLyrics.GetProperty("data")[0];
|
||||||
|
if (syllableLyric.TryGetProperty("attributes", out var attributes) &&
|
||||||
|
attributes.TryGetProperty("ttml", out var ttml))
|
||||||
|
{
|
||||||
|
string? raw = ttml.GetString();
|
||||||
|
if (raw != null && raw.Contains("begin=") && raw.Contains("end="))
|
||||||
|
{
|
||||||
|
return raw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//if (relationships.TryGetProperty("lyrics", out var lyrics) &&
|
||||||
|
// lyrics.GetProperty("data").GetArrayLength() > 0)
|
||||||
|
//{
|
||||||
|
// var lyric = lyrics.GetProperty("data")[0];
|
||||||
|
// if (lyric.TryGetProperty("attributes", out var attributes) &&
|
||||||
|
// attributes.TryGetProperty("ttml", out var ttml))
|
||||||
|
// {
|
||||||
|
// return ttml.GetString();
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task<string> SearchSongInfoAsync(string artist, string title)
|
||||||
|
{
|
||||||
|
var query = $"{artist} {title}";
|
||||||
|
var apiUrl = $"https://amp-api.music.apple.com/v1/catalog/{_storefront}/search";
|
||||||
|
var url = apiUrl + $"?term={WebUtility.UrlEncode(query)}&types=songs&limit=1&l={_language}";
|
||||||
|
var resp = await _client.GetStringAsync(url);
|
||||||
|
var json = JsonSerializer.Deserialize(resp, Serialization.SourceGenerationContext.Default.JsonElement);
|
||||||
|
var results = json.GetProperty("results");
|
||||||
|
if (results.TryGetProperty("songs", out var songs) && songs.GetProperty("data").GetArrayLength() > 0)
|
||||||
|
{
|
||||||
|
var song = songs.GetProperty("data")[0];
|
||||||
|
return song.GetProperty("id").ToString();
|
||||||
|
}
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -74,9 +74,17 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
using var ds = list.CreateDrawingSession();
|
using var ds = list.CreateDrawingSession();
|
||||||
if (strokeWidth > 0)
|
if (strokeWidth > 0)
|
||||||
{
|
{
|
||||||
|
if (lyricsLine.TextGeometry == null)
|
||||||
|
{
|
||||||
|
return list;
|
||||||
|
}
|
||||||
ds.DrawGeometry(lyricsLine.TextGeometry, lyricsLine.Position, strokeColor, strokeWidth); // 描边
|
ds.DrawGeometry(lyricsLine.TextGeometry, lyricsLine.Position, strokeColor, strokeWidth); // 描边
|
||||||
}
|
}
|
||||||
ds.FillGeometry(lyricsLine.TextGeometry, lyricsLine.Position, fontColor); // 填充
|
if (lyricsLine.CanvasTextLayout == null)
|
||||||
|
{
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
ds.DrawTextLayout(lyricsLine.CanvasTextLayout, lyricsLine.Position, fontColor); // 绘制文本(填充)
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -262,17 +270,50 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static CanvasCommandList CreateTranslationHighlightMask(ICanvasAnimatedControl control, LyricsLine lyricsLine)
|
||||||
|
{
|
||||||
|
var mask = new CanvasCommandList(control);
|
||||||
|
using var ds = mask.CreateDrawingSession();
|
||||||
|
|
||||||
|
if (lyricsLine.CanvasTextLayout == null)
|
||||||
|
{
|
||||||
|
return mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
var regions = lyricsLine.CanvasTextLayout.GetCharacterRegions(lyricsLine.OriginalText.Length, lyricsLine.DisplayedText.Length - lyricsLine.OriginalText.Length);
|
||||||
|
if (regions.Length > 0)
|
||||||
|
{
|
||||||
|
for (int j = 0; j < regions.Length; j++)
|
||||||
|
{
|
||||||
|
var region = regions[j];
|
||||||
|
var rect = new Rect(
|
||||||
|
region.LayoutBounds.X,
|
||||||
|
region.LayoutBounds.Y + lyricsLine.Position.Y,
|
||||||
|
region.LayoutBounds.Width,
|
||||||
|
region.LayoutBounds.Height
|
||||||
|
);
|
||||||
|
ds.FillRectangle(rect, Colors.White);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return mask;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建高亮效果层
|
/// 创建高亮效果层
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="control"></param>
|
/// <param name="control"></param>
|
||||||
/// <param name="lineRenderingType"></param>
|
/// <param name="lineRenderingType"></param>
|
||||||
public static AlphaMaskEffect CreateForegroundHighlightEffect(CanvasCommandList foregroundFontEffect, IGraphicsEffectSource mask)
|
public static OpacityEffect CreateForegroundHighlightEffect(CanvasCommandList foregroundFontEffect, IGraphicsEffectSource mask, double opacity)
|
||||||
{
|
{
|
||||||
return new AlphaMaskEffect
|
return new OpacityEffect
|
||||||
{
|
{
|
||||||
Source = foregroundFontEffect,
|
Source = new AlphaMaskEffect
|
||||||
AlphaMask = mask,
|
{
|
||||||
|
Source = foregroundFontEffect,
|
||||||
|
AlphaMask = mask,
|
||||||
|
},
|
||||||
|
Opacity = (float)opacity,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -291,6 +332,19 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static OpacityEffect CreateForegroundTranslationEffect(CanvasCommandList foregroundFontEffect, IGraphicsEffectSource mask, double opacity)
|
||||||
|
{
|
||||||
|
return new OpacityEffect
|
||||||
|
{
|
||||||
|
Source = new AlphaMaskEffect
|
||||||
|
{
|
||||||
|
Source = foregroundFontEffect,
|
||||||
|
AlphaMask = mask,
|
||||||
|
},
|
||||||
|
Opacity = (float)opacity,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
public static IGraphicsEffectSource GetAlphaMask(ICanvasAnimatedControl control, IGraphicsEffectSource charMask, IGraphicsEffectSource lineStartToCharMask, IGraphicsEffectSource lineMask, LineRenderingType lineRenderingType)
|
public static IGraphicsEffectSource GetAlphaMask(ICanvasAnimatedControl control, IGraphicsEffectSource charMask, IGraphicsEffectSource lineStartToCharMask, IGraphicsEffectSource lineMask, LineRenderingType lineRenderingType)
|
||||||
{
|
{
|
||||||
var result = lineRenderingType switch
|
var result = lineRenderingType switch
|
||||||
|
|||||||
@@ -94,6 +94,11 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
return Color.FromArgb(alpha, color.R, color.G, color.B);
|
return Color.FromArgb(alpha, color.R, color.G, color.B);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Color WithOpacity(this Color color, float opacity)
|
||||||
|
{
|
||||||
|
return Color.FromArgb((byte)(opacity * 255), color.R, color.G, color.B);
|
||||||
|
}
|
||||||
|
|
||||||
public static Color WithBrightness(this Color color, double brightness)
|
public static Color WithBrightness(this Color color, double brightness)
|
||||||
{
|
{
|
||||||
// 确保亮度因子在合理范围内
|
// 确保亮度因子在合理范围内
|
||||||
@@ -116,15 +121,11 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
{
|
{
|
||||||
case WindowPixelSampleMode.BelowWindow:
|
case WindowPixelSampleMode.BelowWindow:
|
||||||
{
|
{
|
||||||
int sampleHeight = 1;
|
return GetAverageColorFromScreenRegion(myRect.Left, myRect.Bottom + 2, screenWidth, 1);
|
||||||
int sampleY = myRect.Bottom + 1;
|
|
||||||
return GetAverageColorFromScreenRegion(myRect.Left, sampleY, screenWidth, sampleHeight);
|
|
||||||
}
|
}
|
||||||
case WindowPixelSampleMode.AboveWindow:
|
case WindowPixelSampleMode.AboveWindow:
|
||||||
{
|
{
|
||||||
int sampleHeight = 1;
|
return GetAverageColorFromScreenRegion(myRect.Left, myRect.Top - 3, screenWidth, 1);
|
||||||
int sampleY = myRect.Top - 1;
|
|
||||||
return GetAverageColorFromScreenRegion(myRect.Left, sampleY, screenWidth, sampleHeight);
|
|
||||||
}
|
}
|
||||||
case WindowPixelSampleMode.WindowArea:
|
case WindowPixelSampleMode.WindowArea:
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,6 +11,6 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
{
|
{
|
||||||
public static class FontHelper
|
public static class FontHelper
|
||||||
{
|
{
|
||||||
public static string[] SystemFontFamilies => CanvasTextFormat.GetSystemFontFamilies();
|
public static string[] SystemFontFamilies => CanvasTextFormat.GetSystemFontFamilies().Order().ToArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
{
|
{
|
||||||
public class GlobalHotKeyHelper
|
public class GlobalHotKeyHelper
|
||||||
{
|
{
|
||||||
private static Dictionary<int, Action> _hotKeyActions = [];
|
private static Dictionary<int, Action> _actions = [];
|
||||||
|
private static Dictionary<int, List<string>> _keys = [];
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Register a global hotkey for a specific window type
|
/// Register a global hotkey for a specific window type
|
||||||
@@ -22,7 +23,7 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
/// <param name="id"></param>
|
/// <param name="id"></param>
|
||||||
/// <param name="keys"></param>
|
/// <param name="keys"></param>
|
||||||
/// <param name="action"></param>
|
/// <param name="action"></param>
|
||||||
public static void RegisterHotKey<T>(ShortcutID id, List<string> keys, Action action)
|
private static void RegisterHotKey<T>(ShortcutID id, List<string> keys, Action action)
|
||||||
{
|
{
|
||||||
if (keys.Count == 0) return;
|
if (keys.Count == 0) return;
|
||||||
|
|
||||||
@@ -55,18 +56,23 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
key = (VirtualKey)Enum.Parse(typeof(VirtualKey), item, true);
|
key = (VirtualKey)Enum.Parse(typeof(VirtualKey), item, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
User32.RegisterHotKey(hwnd, (int)id, modifiers, (uint)key);
|
bool success = User32.RegisterHotKey(hwnd, (int)id, modifiers, (uint)key);
|
||||||
_hotKeyActions[(int)id] = action;
|
if (success)
|
||||||
|
{
|
||||||
|
_actions[(int)id] = action;
|
||||||
|
_keys[(int)id] = keys;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void UnregisterHotKey<T>(ShortcutID id)
|
private static void UnregisterHotKey<T>(ShortcutID id)
|
||||||
{
|
{
|
||||||
var window = WindowHelper.GetWindowByWindowType<T>();
|
var window = WindowHelper.GetWindowByWindowType<T>();
|
||||||
if (window == null) return;
|
if (window == null) return;
|
||||||
|
|
||||||
HWND hwnd = WindowNative.GetWindowHandle(window);
|
HWND hwnd = WindowNative.GetWindowHandle(window);
|
||||||
User32.UnregisterHotKey(hwnd, (int)id);
|
User32.UnregisterHotKey(hwnd, (int)id);
|
||||||
_hotKeyActions.Remove((int)id);
|
_actions.Remove((int)id);
|
||||||
|
_keys.Remove((int)id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void UpdateHotKey<T>(ShortcutID id, List<string> keys, Action action)
|
public static void UpdateHotKey<T>(ShortcutID id, List<string> keys, Action action)
|
||||||
@@ -75,6 +81,16 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
RegisterHotKey<T>(id, keys, action);
|
RegisterHotKey<T>(id, keys, action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsHotKeyRegistered(ShortcutID id)
|
||||||
|
{
|
||||||
|
return _actions.ContainsKey((int)id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool IsHotKeyRegistered(List<string> keys)
|
||||||
|
{
|
||||||
|
return _keys.ContainsValue(keys);
|
||||||
|
}
|
||||||
|
|
||||||
public static bool TryInvokeAction(ShortcutID id)
|
public static bool TryInvokeAction(ShortcutID id)
|
||||||
{
|
{
|
||||||
return TryInvokeAction((int)id);
|
return TryInvokeAction((int)id);
|
||||||
@@ -82,7 +98,7 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
|
|
||||||
public static bool TryInvokeAction(int id)
|
public static bool TryInvokeAction(int id)
|
||||||
{
|
{
|
||||||
if (_hotKeyActions.TryGetValue(id, out var action))
|
if (_actions.TryGetValue(id, out var action))
|
||||||
{
|
{
|
||||||
action?.Invoke();
|
action?.Invoke();
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Net.Http;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using System.Runtime.InteropServices.WindowsRuntime;
|
using System.Runtime.InteropServices.WindowsRuntime;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -219,5 +220,68 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
}
|
}
|
||||||
return pixelData;
|
return pixelData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static async Task<byte[]> DownloadImageAsByteArrayAsync(string url)
|
||||||
|
{
|
||||||
|
using var httpClient = new HttpClient();
|
||||||
|
return await httpClient.GetByteArrayAsync(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte[]? DataUrlToByteArray(string dataUrl)
|
||||||
|
{
|
||||||
|
const string base64Marker = ";base64,";
|
||||||
|
int base64Index = dataUrl.IndexOf(base64Marker, StringComparison.OrdinalIgnoreCase);
|
||||||
|
if (base64Index >= 0)
|
||||||
|
{
|
||||||
|
string base64Data = dataUrl.Substring(base64Index + base64Marker.Length);
|
||||||
|
return Convert.FromBase64String(base64Data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 非 base64,直接取逗号后内容并解码
|
||||||
|
int commaIndex = dataUrl.IndexOf(',');
|
||||||
|
if (commaIndex >= 0)
|
||||||
|
{
|
||||||
|
string rawData = dataUrl.Substring(commaIndex + 1);
|
||||||
|
return System.Text.Encoding.UTF8.GetBytes(Uri.UnescapeDataString(rawData));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static async Task<byte[]?> GetImageBytesFromUrlAsync(string url)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(url))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (url.StartsWith("data:", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
// data URL,直接解析
|
||||||
|
return DataUrlToByteArray(url);
|
||||||
|
}
|
||||||
|
else if (Uri.TryCreate(url, UriKind.Absolute, out var uri) &&
|
||||||
|
(uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps))
|
||||||
|
{
|
||||||
|
// 普通网络图片,下载
|
||||||
|
return await DownloadImageAsByteArrayAsync(url);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 其他类型暂不支持
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,7 @@
|
|||||||
using BetterLyrics.WinUI3.Helper;
|
using BetterLyrics.WinUI3.Helper;
|
||||||
using BetterLyrics.WinUI3.Services.SettingsService;
|
|
||||||
using CommunityToolkit.Mvvm.DependencyInjection;
|
|
||||||
using Lyricify.Lyrics.Helpers.General;
|
|
||||||
using NTextCat;
|
using NTextCat;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Globalization;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using TinyPinyin;
|
|
||||||
using Windows.Globalization;
|
using Windows.Globalization;
|
||||||
|
|
||||||
namespace BetterLyrics.WinUI3.Services
|
namespace BetterLyrics.WinUI3.Services
|
||||||
@@ -18,49 +11,83 @@ namespace BetterLyrics.WinUI3.Services
|
|||||||
private static readonly RankedLanguageIdentifierFactory _factory = new();
|
private static readonly RankedLanguageIdentifierFactory _factory = new();
|
||||||
private static readonly RankedLanguageIdentifier _identifier;
|
private static readonly RankedLanguageIdentifier _identifier;
|
||||||
|
|
||||||
public static List<Models.LanguageInfo> SupportedTargetLanguages =>
|
public static List<Models.LanguageInfo> SupportedTargetLanguages { get; set; } =
|
||||||
[
|
[
|
||||||
new Models.LanguageInfo("ar", "العربية"),
|
new Models.LanguageInfo("ar", "العربية"),
|
||||||
new Models.LanguageInfo("az", "Azərbaycan dili"),
|
new Models.LanguageInfo("az", "Azərbaycan dili"),
|
||||||
new Models.LanguageInfo("zh-Hans", "简体中文"),
|
|
||||||
new Models.LanguageInfo("zh-Hant", "繁體中文"),
|
new Models.LanguageInfo("bg", "Български"),
|
||||||
|
new Models.LanguageInfo("bn", "বাংলা"),
|
||||||
|
|
||||||
|
new Models.LanguageInfo("ca", "Català"),
|
||||||
new Models.LanguageInfo("cs", "Čeština"),
|
new Models.LanguageInfo("cs", "Čeština"),
|
||||||
|
|
||||||
new Models.LanguageInfo("da", "Dansk"),
|
new Models.LanguageInfo("da", "Dansk"),
|
||||||
new Models.LanguageInfo("nl", "Nederlands"),
|
new Models.LanguageInfo("de", "Deutsch"),
|
||||||
|
|
||||||
|
new Models.LanguageInfo("el", "Ελληνικά"),
|
||||||
new Models.LanguageInfo("en", "English"),
|
new Models.LanguageInfo("en", "English"),
|
||||||
new Models.LanguageInfo("eo", "Esperanto"),
|
new Models.LanguageInfo("eo", "Esperanto"),
|
||||||
|
new Models.LanguageInfo("es", "Español"),
|
||||||
|
new Models.LanguageInfo("et", "Eesti"),
|
||||||
|
new Models.LanguageInfo("eu", "Euskara"),
|
||||||
|
|
||||||
|
new Models.LanguageInfo("fa", "فارسی"),
|
||||||
new Models.LanguageInfo("fi", "Suomi"),
|
new Models.LanguageInfo("fi", "Suomi"),
|
||||||
new Models.LanguageInfo("fr", "Français"),
|
new Models.LanguageInfo("fr", "Français"),
|
||||||
new Models.LanguageInfo("de", "Deutsch"),
|
|
||||||
new Models.LanguageInfo("el", "Ελληνικά"),
|
new Models.LanguageInfo("ga", "Gaeilge"),
|
||||||
|
new Models.LanguageInfo("gl", "Galego"),
|
||||||
|
|
||||||
new Models.LanguageInfo("he", "עברית"),
|
new Models.LanguageInfo("he", "עברית"),
|
||||||
new Models.LanguageInfo("hi", "हिन्दी"),
|
new Models.LanguageInfo("hi", "हिन्दी"),
|
||||||
new Models.LanguageInfo("hu", "Magyar"),
|
new Models.LanguageInfo("hu", "Magyar"),
|
||||||
|
|
||||||
new Models.LanguageInfo("id", "Bahasa Indonesia"),
|
new Models.LanguageInfo("id", "Bahasa Indonesia"),
|
||||||
new Models.LanguageInfo("ga", "Gaeilge"),
|
|
||||||
new Models.LanguageInfo("it", "Italiano"),
|
new Models.LanguageInfo("it", "Italiano"),
|
||||||
|
|
||||||
new Models.LanguageInfo("ja", "日本語"),
|
new Models.LanguageInfo("ja", "日本語"),
|
||||||
|
|
||||||
new Models.LanguageInfo("ko", "한국어"),
|
new Models.LanguageInfo("ko", "한국어"),
|
||||||
new Models.LanguageInfo("fa", "فارسی"),
|
new Models.LanguageInfo("ky", "Кыргызча"),
|
||||||
|
|
||||||
|
new Models.LanguageInfo("lt", "Lietuvių"),
|
||||||
|
new Models.LanguageInfo("lv", "Latviešu"),
|
||||||
|
|
||||||
|
new Models.LanguageInfo("ms", "Bahasa Melayu"),
|
||||||
|
|
||||||
|
new Models.LanguageInfo("nb", "Norsk bokmål"),
|
||||||
|
new Models.LanguageInfo("nl", "Nederlands"),
|
||||||
|
|
||||||
|
new Models.LanguageInfo("pt-BR", "Português (Brasil)"),
|
||||||
new Models.LanguageInfo("pl", "Polski"),
|
new Models.LanguageInfo("pl", "Polski"),
|
||||||
new Models.LanguageInfo("pt", "Português"),
|
new Models.LanguageInfo("pt", "Português"),
|
||||||
|
|
||||||
|
new Models.LanguageInfo("ro", "Română"),
|
||||||
new Models.LanguageInfo("ru", "Русский"),
|
new Models.LanguageInfo("ru", "Русский"),
|
||||||
|
|
||||||
new Models.LanguageInfo("sk", "Slovenčina"),
|
new Models.LanguageInfo("sk", "Slovenčina"),
|
||||||
new Models.LanguageInfo("es", "Español"),
|
new Models.LanguageInfo("sl", "Slovenščina"),
|
||||||
|
new Models.LanguageInfo("sq", "Shqip"),
|
||||||
|
new Models.LanguageInfo("sr", "Српски"),
|
||||||
new Models.LanguageInfo("sv", "Svenska"),
|
new Models.LanguageInfo("sv", "Svenska"),
|
||||||
|
|
||||||
|
new Models.LanguageInfo("th", "ไทย"),
|
||||||
|
new Models.LanguageInfo("tl", "Filipino"),
|
||||||
new Models.LanguageInfo("tr", "Türkçe"),
|
new Models.LanguageInfo("tr", "Türkçe"),
|
||||||
|
|
||||||
new Models.LanguageInfo("uk", "Українська"),
|
new Models.LanguageInfo("uk", "Українська"),
|
||||||
|
new Models.LanguageInfo("ur", "اردو"),
|
||||||
|
|
||||||
new Models.LanguageInfo("vi", "Tiếng Việt"),
|
new Models.LanguageInfo("vi", "Tiếng Việt"),
|
||||||
|
|
||||||
|
new Models.LanguageInfo("zh", "中文"),
|
||||||
];
|
];
|
||||||
|
|
||||||
static LanguageHelper()
|
static LanguageHelper()
|
||||||
{
|
{
|
||||||
_identifier = _factory.Load(PathHelper.LanguageProfilePath);
|
_identifier = _factory.Load(PathHelper.LanguageProfilePath);
|
||||||
}
|
RomajiConverter.Core.Helpers.RomajiHelper.Init();
|
||||||
|
|
||||||
private static string SimplifiedChineseOrTraditionalChinese(string text)
|
|
||||||
{
|
|
||||||
return text == ChineseConverter.ConvertToSimplifiedChinese(text) ? "zh-Hans" : "zh-Hant";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string? DetectLanguageCode(string? text)
|
public static string? DetectLanguageCode(string? text)
|
||||||
@@ -72,9 +99,8 @@ namespace BetterLyrics.WinUI3.Services
|
|||||||
code = code switch
|
code = code switch
|
||||||
{
|
{
|
||||||
"simple" => "en",
|
"simple" => "en",
|
||||||
"zh_classical" => "zh-Hant",
|
"zh_classical" => "zh",
|
||||||
"zh_yue" => "zh-Hant",
|
"zh_yue" => "zh",
|
||||||
"zh" => "zh-Hans",
|
|
||||||
_ => code
|
_ => code
|
||||||
};
|
};
|
||||||
return code;
|
return code;
|
||||||
@@ -89,26 +115,17 @@ namespace BetterLyrics.WinUI3.Services
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string ConvertToCountryCode(string? languageCode)
|
public static string GetDefaultTargetLanguageCode()
|
||||||
{
|
{
|
||||||
if (languageCode == null) return "us";
|
var found = SupportedTargetLanguages.Find(x => ApplicationLanguages.Languages.FirstOrDefault()?.Contains(x.Code) == true);
|
||||||
|
if (found == null)
|
||||||
return languageCode switch
|
|
||||||
{
|
{
|
||||||
"zh" => "cn",
|
return "en";
|
||||||
"zh-Hans" => "cn",
|
}
|
||||||
"zh-Hant" => "tw",
|
else
|
||||||
"ja" => "jp",
|
{
|
||||||
"ko" => "kr",
|
return found.Code;
|
||||||
_ => "us"
|
}
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int GetDefaultTargetLanguageIndex()
|
|
||||||
{
|
|
||||||
int found = SupportedTargetLanguages.FindIndex(x => ApplicationLanguages.Languages.FirstOrDefault()?.Contains(x.Code) == true);
|
|
||||||
if (found == -1) found = 7; // 默认使用英语
|
|
||||||
return found;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetOrderChar(string text)
|
public static string GetOrderChar(string text)
|
||||||
@@ -118,12 +135,17 @@ namespace BetterLyrics.WinUI3.Services
|
|||||||
if (char.IsLetter(c) && c < 128)
|
if (char.IsLetter(c) && c < 128)
|
||||||
return char.ToUpper(c).ToString();
|
return char.ToUpper(c).ToString();
|
||||||
|
|
||||||
if (PinyinHelper.IsChinese(c))
|
if (Pinyin.Pinyin.Instance.IsHanzi(c.ToString()))
|
||||||
{
|
{
|
||||||
return PinyinHelper.GetPinyinInitials($"{c}");
|
return Pinyin.Pinyin.Instance.HanziToPinyin(c.ToString(), Pinyin.ManTone.Style.NORMAL).ToStr().ToUpper().FirstOrDefault().ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
return "#";
|
return "#";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string ToRomaji(string text)
|
||||||
|
{
|
||||||
|
return string.Join(" ", RomajiConverter.Core.Helpers.RomajiHelper.SentenceToRomaji(text).Select(x => x.Romaji));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,14 +3,12 @@
|
|||||||
using BetterLyrics.WinUI3.Enums;
|
using BetterLyrics.WinUI3.Enums;
|
||||||
using BetterLyrics.WinUI3.Models;
|
using BetterLyrics.WinUI3.Models;
|
||||||
using BetterLyrics.WinUI3.Services;
|
using BetterLyrics.WinUI3.Services;
|
||||||
using Lyricify.Lyrics.Helpers.General;
|
|
||||||
using Lyricify.Lyrics.Models;
|
using Lyricify.Lyrics.Models;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Xml.Linq;
|
using System.Xml.Linq;
|
||||||
using Windows.Globalization.Fonts;
|
|
||||||
using LyricsData = BetterLyrics.WinUI3.Models.LyricsData;
|
using LyricsData = BetterLyrics.WinUI3.Models.LyricsData;
|
||||||
|
|
||||||
namespace BetterLyrics.WinUI3.Helper
|
namespace BetterLyrics.WinUI3.Helper
|
||||||
@@ -48,50 +46,67 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FillChineseLyricsData();
|
FillRomanizationLyricsData();
|
||||||
_lyricsDataArr.Add(new LyricsData()); // 为机翻预留
|
_lyricsDataArr.Add(new LyricsData()); // 为机翻预留
|
||||||
return _lyricsDataArr;
|
return _lyricsDataArr;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FillChineseLyricsData()
|
private void FillRomanizationLyricsData()
|
||||||
{
|
{
|
||||||
var simplifiedChinese = _lyricsDataArr.Where(x => x.LanguageCode == "zh-Hans").FirstOrDefault();
|
var chinese = _lyricsDataArr.Where(x => x.LanguageCode == "zh").FirstOrDefault();
|
||||||
var traditionalChinese = _lyricsDataArr.Where(x => x.LanguageCode == "zh-Hant").FirstOrDefault();
|
if (chinese != null)
|
||||||
if (simplifiedChinese != null && traditionalChinese == null)
|
|
||||||
{
|
{
|
||||||
// 如果没有繁体中文歌词,则将简体中文歌词转换为繁体中文
|
|
||||||
_lyricsDataArr.Add(new LyricsData
|
_lyricsDataArr.Add(new LyricsData
|
||||||
{
|
{
|
||||||
LyricsLines = simplifiedChinese.LyricsLines.Select(line => new LyricsLine
|
LanguageCode = "pinyin",
|
||||||
|
LyricsLines = chinese.LyricsLines.Select(line => new LyricsLine
|
||||||
{
|
{
|
||||||
StartMs = line.StartMs,
|
StartMs = line.StartMs,
|
||||||
EndMs = line.EndMs,
|
EndMs = line.EndMs,
|
||||||
OriginalText = ChineseConverter.ConvertToTraditionalChinese(line.OriginalText),
|
OriginalText = Pinyin.Pinyin.Instance.HanziToPinyin(line.OriginalText).ToStr(),
|
||||||
LyricsChars = line.LyricsChars.Select(c => new LyricsChar
|
LyricsChars = line.LyricsChars.Select(c => new LyricsChar
|
||||||
{
|
{
|
||||||
StartMs = c.StartMs,
|
StartMs = c.StartMs,
|
||||||
EndMs = c.EndMs,
|
EndMs = c.EndMs,
|
||||||
Text = ChineseConverter.ConvertToTraditionalChinese(c.Text),
|
Text = Pinyin.Pinyin.Instance.HanziToPinyin(c.Text).ToStr(),
|
||||||
|
StartIndex = c.StartIndex
|
||||||
|
}).ToList()
|
||||||
|
}).ToList()
|
||||||
|
});
|
||||||
|
_lyricsDataArr.Add(new LyricsData
|
||||||
|
{
|
||||||
|
LanguageCode = "jyutping",
|
||||||
|
LyricsLines = chinese.LyricsLines.Select(line => new LyricsLine
|
||||||
|
{
|
||||||
|
StartMs = line.StartMs,
|
||||||
|
EndMs = line.EndMs,
|
||||||
|
OriginalText = Pinyin.Jyutping.Instance.HanziToPinyin(line.OriginalText).ToStr(),
|
||||||
|
LyricsChars = line.LyricsChars.Select(c => new LyricsChar
|
||||||
|
{
|
||||||
|
StartMs = c.StartMs,
|
||||||
|
EndMs = c.EndMs,
|
||||||
|
Text = Pinyin.Jyutping.Instance.HanziToPinyin(c.Text).ToStr(),
|
||||||
StartIndex = c.StartIndex
|
StartIndex = c.StartIndex
|
||||||
}).ToList()
|
}).ToList()
|
||||||
}).ToList()
|
}).ToList()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (traditionalChinese != null && simplifiedChinese == null)
|
var japanese = _lyricsDataArr.Where(x => x.LanguageCode == "ja").FirstOrDefault();
|
||||||
|
if (japanese != null)
|
||||||
{
|
{
|
||||||
// 如果没有简体中文歌词,则将繁体中文歌词转换为简体中文
|
|
||||||
_lyricsDataArr.Add(new LyricsData
|
_lyricsDataArr.Add(new LyricsData
|
||||||
{
|
{
|
||||||
LyricsLines = traditionalChinese.LyricsLines.Select(line => new LyricsLine
|
LanguageCode = "romaji",
|
||||||
|
LyricsLines = japanese.LyricsLines.Select(line => new LyricsLine
|
||||||
{
|
{
|
||||||
StartMs = line.StartMs,
|
StartMs = line.StartMs,
|
||||||
EndMs = line.EndMs,
|
EndMs = line.EndMs,
|
||||||
OriginalText = ChineseConverter.ConvertToSimplifiedChinese(line.OriginalText),
|
OriginalText = LanguageHelper.ToRomaji(line.OriginalText),
|
||||||
LyricsChars = line.LyricsChars.Select(c => new LyricsChar
|
LyricsChars = line.LyricsChars.Select(c => new LyricsChar
|
||||||
{
|
{
|
||||||
StartMs = c.StartMs,
|
StartMs = c.StartMs,
|
||||||
EndMs = c.EndMs,
|
EndMs = c.EndMs,
|
||||||
Text = ChineseConverter.ConvertToSimplifiedChinese(c.Text),
|
Text = LanguageHelper.ToRomaji(c.Text),
|
||||||
StartIndex = c.StartIndex
|
StartIndex = c.StartIndex
|
||||||
}).ToList()
|
}).ToList()
|
||||||
}).ToList()
|
}).ToList()
|
||||||
@@ -230,10 +245,11 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
int pStartMs = ParseTtmlTime(pBegin);
|
int pStartMs = ParseTtmlTime(pBegin);
|
||||||
int pEndMs = ParseTtmlTime(pEnd);
|
int pEndMs = ParseTtmlTime(pEnd);
|
||||||
|
|
||||||
// 只获取一级span,且排除ttm:role="x-bg"的span
|
// 只获取一级span,且排除 ttm:role="x-bg" 的 span 和 ttm:role="x-roman"
|
||||||
var spans = p.Elements()
|
var spans = p.Elements()
|
||||||
.Where(s => s.Name.LocalName == "span" &&
|
.Where(s => s.Name.LocalName == "span" &&
|
||||||
s.Attribute(XName.Get("role", "http://www.w3.org/ns/ttml#metadata"))?.Value != "x-bg")
|
s.Attribute(XName.Get("role", "http://www.w3.org/ns/ttml#metadata"))?.Value != "x-bg" &&
|
||||||
|
s.Attribute(XName.Get("role", "http://www.w3.org/ns/ttml#metadata"))?.Value != "x-roman")
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
// 原文和翻译分离
|
// 原文和翻译分离
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using Microsoft.UI.Xaml;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
@@ -6,6 +7,7 @@ using System.Text;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Vanara.PInvoke;
|
using Vanara.PInvoke;
|
||||||
|
using WinRT.Interop;
|
||||||
|
|
||||||
namespace BetterLyrics.WinUI3.Helper
|
namespace BetterLyrics.WinUI3.Helper
|
||||||
{
|
{
|
||||||
@@ -60,5 +62,14 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
var primaryMonitorInfo = GetPrimaryMonitorInfoEx();
|
var primaryMonitorInfo = GetPrimaryMonitorInfoEx();
|
||||||
return primaryMonitorInfo.szDevice;
|
return primaryMonitorInfo.szDevice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static User32.MONITORINFOEX GetMonitorInfoExFromWindow(Window window)
|
||||||
|
{
|
||||||
|
var hwnd = WindowNative.GetWindowHandle(window);
|
||||||
|
var hMonitor = User32.MonitorFromWindow(hwnd, User32.MonitorFlags.MONITOR_DEFAULTTONEAREST);
|
||||||
|
User32.MONITORINFOEX monitorInfoEx = new() { cbSize = (uint)Marshal.SizeOf<User32.MONITORINFOEX>() };
|
||||||
|
User32.GetMonitorInfo(hMonitor, ref monitorInfoEx);
|
||||||
|
return monitorInfoEx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
public static string QQLyricsCacheDirectory => Path.Combine(LyricsCacheDirectory, "qq");
|
public static string QQLyricsCacheDirectory => Path.Combine(LyricsCacheDirectory, "qq");
|
||||||
public static string KugouLyricsCacheDirectory => Path.Combine(LyricsCacheDirectory, "kugou");
|
public static string KugouLyricsCacheDirectory => Path.Combine(LyricsCacheDirectory, "kugou");
|
||||||
public static string AmllTtmlDbLyricsCacheDirectory => Path.Combine(LyricsCacheDirectory, "amll-ttml-db");
|
public static string AmllTtmlDbLyricsCacheDirectory => Path.Combine(LyricsCacheDirectory, "amll-ttml-db");
|
||||||
|
public static string AppleMusicCacheDirectory => Path.Combine(LyricsCacheDirectory, "apple-music");
|
||||||
public static string AmllTtmlDbIndexPath => Path.Combine(LyricsCacheDirectory, "amll-ttml-db-index.json");
|
public static string AmllTtmlDbIndexPath => Path.Combine(LyricsCacheDirectory, "amll-ttml-db-index.json");
|
||||||
public static string AmllTtmlDbLastUpdatedPath => Path.Combine(LyricsCacheDirectory, "amll-ttml-db-last-updated.txt");
|
public static string AmllTtmlDbLastUpdatedPath => Path.Combine(LyricsCacheDirectory, "amll-ttml-db-last-updated.txt");
|
||||||
|
|
||||||
@@ -53,6 +54,7 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
|
|
||||||
public static string QQTranslationCacheDirectory => Path.Combine(TranslationCacheDirectory, "qq");
|
public static string QQTranslationCacheDirectory => Path.Combine(TranslationCacheDirectory, "qq");
|
||||||
public static string NeteaseTranslationCacheDirectory => Path.Combine(TranslationCacheDirectory, "netease");
|
public static string NeteaseTranslationCacheDirectory => Path.Combine(TranslationCacheDirectory, "netease");
|
||||||
|
public static string KugouTranslationCacheDirectory => Path.Combine(TranslationCacheDirectory, "kugou");
|
||||||
|
|
||||||
public static string AlbumArtCacheDirectory => Path.Combine(CacheFolder, "album-art");
|
public static string AlbumArtCacheDirectory => Path.Combine(CacheFolder, "album-art");
|
||||||
|
|
||||||
@@ -69,9 +71,11 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
Directory.CreateDirectory(KugouLyricsCacheDirectory);
|
Directory.CreateDirectory(KugouLyricsCacheDirectory);
|
||||||
Directory.CreateDirectory(NeteaseLyricsCacheDirectory);
|
Directory.CreateDirectory(NeteaseLyricsCacheDirectory);
|
||||||
Directory.CreateDirectory(AmllTtmlDbLyricsCacheDirectory);
|
Directory.CreateDirectory(AmllTtmlDbLyricsCacheDirectory);
|
||||||
|
Directory.CreateDirectory(AppleMusicCacheDirectory);
|
||||||
|
|
||||||
Directory.CreateDirectory(QQTranslationCacheDirectory);
|
Directory.CreateDirectory(QQTranslationCacheDirectory);
|
||||||
Directory.CreateDirectory(NeteaseTranslationCacheDirectory);
|
Directory.CreateDirectory(NeteaseTranslationCacheDirectory);
|
||||||
|
Directory.CreateDirectory(KugouTranslationCacheDirectory);
|
||||||
|
|
||||||
Directory.CreateDirectory(iTunesAlbumArtCacheDirectory);
|
Directory.CreateDirectory(iTunesAlbumArtCacheDirectory);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Windows.Foundation;
|
||||||
|
using Windows.Graphics;
|
||||||
|
|
||||||
|
namespace BetterLyrics.WinUI3.Helper
|
||||||
|
{
|
||||||
|
public static class PointHelper
|
||||||
|
{
|
||||||
|
public static PointInt32 ToPointInt32(this Point point)
|
||||||
|
{
|
||||||
|
return new PointInt32((int)point.X, (int)point.Y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
// 2025/6/23 by Zhe Fang
|
// 2025/6/23 by Zhe Fang
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
|
||||||
using BetterLyrics.WinUI3.Enums;
|
using BetterLyrics.WinUI3.Enums;
|
||||||
|
|
||||||
namespace BetterLyrics.WinUI3.Helper
|
namespace BetterLyrics.WinUI3.Helper
|
||||||
@@ -11,6 +10,8 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
{
|
{
|
||||||
private T _currentValue;
|
private T _currentValue;
|
||||||
private double _durationSeconds;
|
private double _durationSeconds;
|
||||||
|
private double _delaySeconds;
|
||||||
|
private double _delayRemaining;
|
||||||
private EasingType? _easingType;
|
private EasingType? _easingType;
|
||||||
private Func<T, T, double, T> _interpolator;
|
private Func<T, T, double, T> _interpolator;
|
||||||
private bool _isTransitioning;
|
private bool _isTransitioning;
|
||||||
@@ -19,18 +20,21 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
private T _targetValue;
|
private T _targetValue;
|
||||||
|
|
||||||
public double DurationSeconds => _durationSeconds;
|
public double DurationSeconds => _durationSeconds;
|
||||||
|
public double DelaySeconds => _delaySeconds;
|
||||||
|
|
||||||
public bool IsTransitioning => _isTransitioning;
|
public bool IsTransitioning => _isTransitioning;
|
||||||
public T Value => _currentValue;
|
public T Value => _currentValue;
|
||||||
public T TargetValue => _targetValue;
|
public T TargetValue => _targetValue;
|
||||||
public EasingType? EasingType => _easingType;
|
public EasingType? EasingType => _easingType;
|
||||||
|
|
||||||
public ValueTransition(T initialValue, double durationSeconds, Func<T, T, double, T>? interpolator = null, EasingType? easingType = null)
|
public ValueTransition(T initialValue, double durationSeconds, Func<T, T, double, T>? interpolator = null, EasingType? easingType = null, double delaySeconds = 0)
|
||||||
{
|
{
|
||||||
_currentValue = initialValue;
|
_currentValue = initialValue;
|
||||||
_startValue = initialValue;
|
_startValue = initialValue;
|
||||||
_targetValue = initialValue;
|
_targetValue = initialValue;
|
||||||
_durationSeconds = durationSeconds;
|
_durationSeconds = durationSeconds;
|
||||||
|
_delaySeconds = delaySeconds;
|
||||||
|
_delayRemaining = 0;
|
||||||
_progress = 1f;
|
_progress = 1f;
|
||||||
_isTransitioning = false;
|
_isTransitioning = false;
|
||||||
|
|
||||||
@@ -58,12 +62,18 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
_durationSeconds = seconds;
|
_durationSeconds = seconds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetDelay(double seconds)
|
||||||
|
{
|
||||||
|
_delaySeconds = seconds;
|
||||||
|
}
|
||||||
|
|
||||||
private void JumpTo(T value)
|
private void JumpTo(T value)
|
||||||
{
|
{
|
||||||
_currentValue = value;
|
_currentValue = value;
|
||||||
_startValue = value;
|
_startValue = value;
|
||||||
_targetValue = value;
|
_targetValue = value;
|
||||||
_progress = 1f;
|
_progress = 1f;
|
||||||
|
_delayRemaining = 0;
|
||||||
_isTransitioning = false;
|
_isTransitioning = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,6 +83,7 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
_startValue = value;
|
_startValue = value;
|
||||||
_targetValue = value;
|
_targetValue = value;
|
||||||
_progress = 0f;
|
_progress = 0f;
|
||||||
|
_delayRemaining = 0;
|
||||||
_isTransitioning = false;
|
_isTransitioning = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,6 +100,7 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
_startValue = _currentValue;
|
_startValue = _currentValue;
|
||||||
_targetValue = targetValue;
|
_targetValue = targetValue;
|
||||||
_progress = 0f;
|
_progress = 0f;
|
||||||
|
_delayRemaining = _delaySeconds;
|
||||||
_isTransitioning = true;
|
_isTransitioning = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -103,7 +115,24 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
{
|
{
|
||||||
if (!_isTransitioning) return;
|
if (!_isTransitioning) return;
|
||||||
|
|
||||||
_progress += (double)(elapsedTime / TimeSpan.FromSeconds(_durationSeconds));
|
if (_delayRemaining > 0)
|
||||||
|
{
|
||||||
|
double consume = Math.Min(_delayRemaining, elapsedTime.TotalSeconds);
|
||||||
|
_delayRemaining -= consume;
|
||||||
|
if (_delayRemaining > 0)
|
||||||
|
return;
|
||||||
|
elapsedTime = TimeSpan.FromSeconds(elapsedTime.TotalSeconds - consume);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_durationSeconds <= 0)
|
||||||
|
{
|
||||||
|
_progress = 1f;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_progress += elapsedTime.TotalSeconds / _durationSeconds;
|
||||||
|
}
|
||||||
|
|
||||||
if (_progress >= 1f)
|
if (_progress >= 1f)
|
||||||
{
|
{
|
||||||
_progress = 1f;
|
_progress = 1f;
|
||||||
@@ -178,4 +207,4 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
_interpolator = GetInterpolatorByEasingType(easingType);
|
_interpolator = GetInterpolatorByEasingType(easingType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -59,6 +59,10 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
{
|
{
|
||||||
window = new MusicGalleryWindow();
|
window = new MusicGalleryWindow();
|
||||||
}
|
}
|
||||||
|
else if (typeof(T) == typeof(LyricsSearchWindow))
|
||||||
|
{
|
||||||
|
window = new LyricsSearchWindow();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new ArgumentException("Unsupported window type", nameof(T));
|
throw new ArgumentException("Unsupported window type", nameof(T));
|
||||||
@@ -73,6 +77,7 @@ namespace BetterLyrics.WinUI3.Helper
|
|||||||
var lyricsWindow = (LyricsWindow)window;
|
var lyricsWindow = (LyricsWindow)window;
|
||||||
lyricsWindow.ViewModel.InitShortcuts();
|
lyricsWindow.ViewModel.InitShortcuts();
|
||||||
lyricsWindow.AutoSelectLyricsMode();
|
lyricsWindow.AutoSelectLyricsMode();
|
||||||
|
lyricsWindow.ViewModel.SetIsAlwaysOnTop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using BetterLyrics.WinUI3.Enums;
|
using BetterLyrics.WinUI3.Enums;
|
||||||
|
using BetterLyrics.WinUI3.Helper;
|
||||||
using BetterLyrics.WinUI3.Models.Settings;
|
using BetterLyrics.WinUI3.Models.Settings;
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using System;
|
using System;
|
||||||
@@ -6,34 +7,70 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Vanara.PInvoke;
|
||||||
|
using Windows.Foundation;
|
||||||
|
|
||||||
namespace BetterLyrics.WinUI3.Models
|
namespace BetterLyrics.WinUI3.Models
|
||||||
{
|
{
|
||||||
public partial class LiveStates : ObservableRecipient
|
public partial class LiveStates : ObservableRecipient
|
||||||
{
|
{
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial LyricsWindowMode CurrentLyricsWindowMode { get; set; }
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial LyricsWindowMode LyricsWindowMode { get; set; }
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial LyricsDisplayType CurrentLyricsDisplayType { get; set; }
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial LyricsDisplayType LyricsDisplayType { get; set; }
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial LyricsStyleSettings CurrentLyricsStyleSettings { get; set; }
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsAlwaysOnTop { get; set; }
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial LyricsEffectSettings CurrentLyricsEffectSettings { get; set; }
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial LyricsStyleSettings LyricsStyleSettings { get; set; }
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial LyricsEffectSettings LyricsEffectSettings { get; set; }
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial Rect LyricsWindowBounds { get; set; }
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial Rect LyricsWindowMonitorBounds { get; set; }
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial Rect DemoLyricsWindowBounds { get; set; }
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial Rect DemoLyricsWindowMonitorBounds { get; set; }
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial string LyricsWindowMonitorName { get; set; }
|
||||||
|
|
||||||
public LiveStates(AppSettings appSettings)
|
public LiveStates(AppSettings appSettings)
|
||||||
{
|
{
|
||||||
CurrentLyricsWindowMode = LyricsWindowMode.StandardMode;
|
LyricsWindowMode = LyricsWindowMode.StandardMode;
|
||||||
CurrentLyricsDisplayType = appSettings.StandardModeSettings.LyricsDisplayType;
|
LyricsDisplayType = appSettings.StandardModeSettings.LyricsDisplayType;
|
||||||
CurrentLyricsStyleSettings = appSettings.StandardLyricsStyleSettings;
|
LyricsStyleSettings = appSettings.StandardLyricsStyleSettings;
|
||||||
CurrentLyricsEffectSettings = appSettings.StandardLyricsEffectSettings;
|
LyricsEffectSettings = appSettings.StandardLyricsEffectSettings;
|
||||||
|
IsAlwaysOnTop = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ToggleLyricsWindowMode(LyricsWindowMode mode)
|
public void ToggleLyricsWindowMode(LyricsWindowMode mode)
|
||||||
{
|
{
|
||||||
if (CurrentLyricsWindowMode == mode)
|
if (LyricsWindowMode == mode)
|
||||||
{
|
{
|
||||||
CurrentLyricsWindowMode = LyricsWindowMode.StandardMode;
|
LyricsWindowMode = LyricsWindowMode.StandardMode;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CurrentLyricsWindowMode = mode;
|
LyricsWindowMode = mode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
partial void OnLyricsWindowBoundsChanged(Rect value)
|
||||||
|
{
|
||||||
|
double factor = 0.1;
|
||||||
|
var lyricsWindow = WindowHelper.GetWindowByWindowType<Views.LyricsWindow>();
|
||||||
|
if (lyricsWindow == null) return;
|
||||||
|
var mointor = MonitorHelper.GetMonitorInfoExFromWindow(lyricsWindow);
|
||||||
|
LyricsWindowMonitorName = mointor.szDevice;
|
||||||
|
LyricsWindowMonitorBounds = new Rect(
|
||||||
|
mointor.rcMonitor.Left,
|
||||||
|
mointor.rcMonitor.Top,
|
||||||
|
mointor.rcMonitor.Width,
|
||||||
|
mointor.rcMonitor.Height
|
||||||
|
);
|
||||||
|
DemoLyricsWindowBounds = new Rect(
|
||||||
|
(value.X - mointor.rcMonitor.Left) * factor,
|
||||||
|
(value.Y - mointor.rcMonitor.Top) * factor,
|
||||||
|
value.Width * factor,
|
||||||
|
value.Height * factor
|
||||||
|
);
|
||||||
|
DemoLyricsWindowMonitorBounds = new Rect(
|
||||||
|
mointor.rcMonitor.Left * factor,
|
||||||
|
mointor.rcMonitor.Top * factor,
|
||||||
|
mointor.rcMonitor.Width * factor,
|
||||||
|
mointor.rcMonitor.Height * factor
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using BetterLyrics.WinUI3.Helper;
|
using BetterLyrics.WinUI3.Enums;
|
||||||
|
using BetterLyrics.WinUI3.Helper;
|
||||||
using BetterLyrics.WinUI3.Services;
|
using BetterLyrics.WinUI3.Services;
|
||||||
using Lyricify.Lyrics.Helpers.General;
|
using Lyricify.Lyrics.Helpers.General;
|
||||||
using System;
|
using System;
|
||||||
@@ -13,7 +14,12 @@ namespace BetterLyrics.WinUI3.Models
|
|||||||
public class LyricsData
|
public class LyricsData
|
||||||
{
|
{
|
||||||
public List<LyricsLine> LyricsLines { get; set; }
|
public List<LyricsLine> LyricsLines { get; set; }
|
||||||
public string? LanguageCode => LanguageHelper.DetectLanguageCode(WrappedOriginalText);
|
private string? _languageCode;
|
||||||
|
public string? LanguageCode
|
||||||
|
{
|
||||||
|
get => _languageCode ?? LanguageHelper.DetectLanguageCode(WrappedOriginalText);
|
||||||
|
set => _languageCode = value;
|
||||||
|
}
|
||||||
public string WrappedOriginalText => string.Join(StringHelper.NewLine, LyricsLines.Select(line => line.OriginalText));
|
public string WrappedOriginalText => string.Join(StringHelper.NewLine, LyricsLines.Select(line => line.OriginalText));
|
||||||
|
|
||||||
public LyricsData()
|
public LyricsData()
|
||||||
@@ -120,5 +126,18 @@ namespace BetterLyrics.WinUI3.Models
|
|||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LyricsLine? GetLyricsLine(double sec)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < LyricsLines.Count; i++)
|
||||||
|
{
|
||||||
|
var line = LyricsLines[i];
|
||||||
|
if (line.StartMs > sec * 1000)
|
||||||
|
{
|
||||||
|
return LyricsLines.ElementAtOrDefault(i - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using BetterLyrics.WinUI3.Enums;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace BetterLyrics.WinUI3.Models
|
||||||
|
{
|
||||||
|
public class LyricsSearchResult
|
||||||
|
{
|
||||||
|
public bool IsFound => !string.IsNullOrEmpty(Raw);
|
||||||
|
public LyricsSearchProvider? Provider { get; set; }
|
||||||
|
|
||||||
|
public string? Raw { get; set; }
|
||||||
|
|
||||||
|
public string? Title { get; set; }
|
||||||
|
public string? Artist { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
using BetterLyrics.WinUI3.Enums;
|
||||||
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace BetterLyrics.WinUI3.Models
|
||||||
|
{
|
||||||
|
public partial class MappedSongSearchQuery : ObservableRecipient
|
||||||
|
{
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial string OriginalTitle { get; set; } = string.Empty;
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial string OriginalArtist { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial string MappedTitle { get; set; } = string.Empty;
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial string MappedArtist { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsMarkedAsPureMusic { get; set; } = false;
|
||||||
|
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial LyricsSearchProvider? LyricsSearchProvider { get; set; }
|
||||||
|
|
||||||
|
public MappedSongSearchQuery Clone()
|
||||||
|
{
|
||||||
|
return new MappedSongSearchQuery
|
||||||
|
{
|
||||||
|
OriginalTitle = this.OriginalTitle,
|
||||||
|
OriginalArtist = this.OriginalArtist,
|
||||||
|
MappedTitle = this.MappedTitle,
|
||||||
|
MappedArtist = this.MappedArtist,
|
||||||
|
IsMarkedAsPureMusic = this.IsMarkedAsPureMusic,
|
||||||
|
LyricsSearchProvider = this.LyricsSearchProvider
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,23 +12,29 @@ namespace BetterLyrics.WinUI3.Models
|
|||||||
{
|
{
|
||||||
public partial class MediaSourceProviderInfo : ObservableRecipient
|
public partial class MediaSourceProviderInfo : ObservableRecipient
|
||||||
{
|
{
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsEnabled { get; set; }
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsEnabled { get; set; } = true;
|
||||||
|
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial string Provider { get; set; }
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial string Provider { get; set; }
|
||||||
|
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsLastFMTrackEnabled { get; set; }
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsLastFMTrackEnabled { get; set; } = false;
|
||||||
|
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsTimelineSyncEnabled { get; set; } = true;
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int TimelineSyncThreshold { get; set; }
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int TimelineSyncThreshold { get; set; }
|
||||||
|
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int PositionOffset { get; set; }
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int PositionOffset { get; set; }
|
||||||
|
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool ResetPositionOffsetOnSongChanged { get; set; }
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool ResetPositionOffsetOnSongChanged { get; set; } = false;
|
||||||
|
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial FullyObservableCollection<LyricsSearchProviderInfo> LyricsSearchProvidersInfo { get; set; }
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial FullyObservableCollection<LyricsSearchProviderInfo> LyricsSearchProvidersInfo { get; set; } = [.. Enum.GetValues<LyricsSearchProvider>().Select(p => new LyricsSearchProviderInfo(p, true))];
|
||||||
|
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial FullyObservableCollection<AlbumArtSearchProviderInfo> AlbumArtSearchProvidersInfo { get; set; }
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial FullyObservableCollection<AlbumArtSearchProviderInfo> AlbumArtSearchProvidersInfo { get; set; } = [.. Enum.GetValues<AlbumArtSearchProvider>().Select(p => new AlbumArtSearchProviderInfo(p, true))];
|
||||||
|
|
||||||
public MediaSourceProviderInfo() { }
|
public MediaSourceProviderInfo()
|
||||||
|
{
|
||||||
|
Provider = string.Empty;
|
||||||
|
TimelineSyncThreshold = 0;
|
||||||
|
PositionOffset = 0;
|
||||||
|
}
|
||||||
|
|
||||||
public MediaSourceProviderInfo(string provider) : base()
|
public MediaSourceProviderInfo(string provider) : base()
|
||||||
{
|
{
|
||||||
@@ -47,11 +53,6 @@ namespace BetterLyrics.WinUI3.Models
|
|||||||
}
|
}
|
||||||
|
|
||||||
Provider = provider;
|
Provider = provider;
|
||||||
IsEnabled = true;
|
|
||||||
IsLastFMTrackEnabled = false;
|
|
||||||
ResetPositionOffsetOnSongChanged = false;
|
|
||||||
LyricsSearchProvidersInfo = [.. Enum.GetValues<LyricsSearchProvider>().Select(p => new LyricsSearchProviderInfo(p, true))];
|
|
||||||
AlbumArtSearchProvidersInfo = [.. Enum.GetValues<AlbumArtSearchProvider>().Select(p => new AlbumArtSearchProviderInfo(p, true))];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
partial void OnAlbumArtSearchProvidersInfoChanged(FullyObservableCollection<AlbumArtSearchProviderInfo> oldValue, FullyObservableCollection<AlbumArtSearchProviderInfo> newValue)
|
partial void OnAlbumArtSearchProvidersInfoChanged(FullyObservableCollection<AlbumArtSearchProviderInfo> oldValue, FullyObservableCollection<AlbumArtSearchProviderInfo> newValue)
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ namespace BetterLyrics.WinUI3.Models.Settings
|
|||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial TextAlignmentType SongInfoAlignmentType { get; set; } = TextAlignmentType.Left;
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial TextAlignmentType SongInfoAlignmentType { get; set; } = TextAlignmentType.Left;
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int CoverImageRadius { get; set; } = 12; // 12 % of the cover image size
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int CoverImageRadius { get; set; } = 12; // 12 % of the cover image size
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int CoverImageShadowAmount { get; set; } = 12;
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int CoverImageShadowAmount { get; set; } = 12;
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int SongInfoFontSize { get; set; } = 18;
|
||||||
|
|
||||||
public AlbumArtLayoutSettings() { }
|
public AlbumArtLayoutSettings() { }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ namespace BetterLyrics.WinUI3.Models.Settings
|
|||||||
|
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial FullyObservableCollection<LocalMediaFolder> LocalMediaFolders { get; set; } = [];
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial FullyObservableCollection<LocalMediaFolder> LocalMediaFolders { get; set; } = [];
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial FullyObservableCollection<MediaSourceProviderInfo> MediaSourceProvidersInfo { get; set; } = [];
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial FullyObservableCollection<MediaSourceProviderInfo> MediaSourceProvidersInfo { get; set; } = [];
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial FullyObservableCollection<MappedSongSearchQuery> MappedSongSearchQueries { get; set; } = [];
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial FullyObservableCollection<WindowBoundsRecord> WindowBoundsRecords { get; set; } = [];
|
||||||
|
|
||||||
public AppSettings() { }
|
public AppSettings() { }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ namespace BetterLyrics.WinUI3.Models.Settings
|
|||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool AutoLockOnDesktopMode { get; set; } = false;
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool AutoLockOnDesktopMode { get; set; } = false;
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial List<string> LockShortcut { get; set; } = new List<string>() { "Ctrl", "Alt", "U" };
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial List<string> LockShortcut { get; set; } = new List<string>() { "Ctrl", "Alt", "U" };
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial List<string> ToggleShortcut { get; set; } = new List<string>() { "Ctrl", "Alt", "D" };
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial List<string> ToggleShortcut { get; set; } = new List<string>() { "Ctrl", "Alt", "D" };
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsAlwaysOnTop { get; set; } = true;
|
||||||
|
|
||||||
public DesktopModeSettings()
|
public DesktopModeSettings()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ namespace BetterLyrics.WinUI3.Models.Settings
|
|||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IgnoreFullscreenWindow { get; set; } = false;
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IgnoreFullscreenWindow { get; set; } = false;
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial string LXMusicServer { get; set; } = string.Empty;
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial string LXMusicServer { get; set; } = string.Empty;
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool HideWindowWhenNotPlaying { get; set; } = true;
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool HideWindowWhenNotPlaying { get; set; } = true;
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial List<string> ShowOrHideLyricsWindowShortcut { get; set; } = new List<string> { "Ctrl", "Alt", "H" };
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsDragEverywhereEnabled { get; set; } = false;
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsDragEverywhereEnabled { get; set; } = false;
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsImmersiveMode { get; set; } = false;
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsImmersiveMode { get; set; } = false;
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool ExitOnLyricsWindowClosed { get; set; } = true;
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool ExitOnLyricsWindowClosed { get; set; } = true;
|
||||||
|
|||||||
@@ -23,7 +23,10 @@ namespace BetterLyrics.WinUI3.Models.Settings
|
|||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int LyricsShadowAmount { get; set; } = 8;
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int LyricsShadowAmount { get; set; } = 8;
|
||||||
|
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial LineRenderingType LyricsHighlightScope { get; set; } = LineRenderingType.LineStartToCurrentChar;
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial LineRenderingType LyricsHighlightScope { get; set; } = LineRenderingType.LineStartToCurrentChar;
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int LyricsHighlightAmount { get; set; } = 100; // 100% 是上界
|
||||||
|
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int LyricsTranslationHighlightAmount { get; set; } = 60; // 100% 是上界
|
||||||
|
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsLyricsFloatAnimationEnabled { get; set; } = true;
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsLyricsFloatAnimationEnabled { get; set; } = true;
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int LyricsFloatAmount { get; set; } = 1;
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int LyricsFloatAmount { get; set; } = 1;
|
||||||
|
|
||||||
@@ -31,6 +34,8 @@ namespace BetterLyrics.WinUI3.Models.Settings
|
|||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int LyricsScrollDuration { get; set; }
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int LyricsScrollDuration { get; set; }
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int LyricsScrollTopDuration { get; set; }
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int LyricsScrollTopDuration { get; set; }
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int LyricsScrollBottomDuration { get; set; }
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int LyricsScrollBottomDuration { get; set; }
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int LyricsScrollTopDelay { get; set; } = 0;
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int LyricsScrollBottomDelay { get; set; } = 0;
|
||||||
|
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int LyricsVerticalEdgeOpacity { get; set; } = 0; // 0% opacity
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int LyricsVerticalEdgeOpacity { get; set; } = 0; // 0% opacity
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsFanLyricsEnabled { get; set; } = false;
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsFanLyricsEnabled { get; set; } = false;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ namespace BetterLyrics.WinUI3.Models.Settings
|
|||||||
{
|
{
|
||||||
public partial class LyricsStyleSettings : ObservableRecipient
|
public partial class LyricsStyleSettings : ObservableRecipient
|
||||||
{
|
{
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsDynamicLyricsFontSize { get; set; } = false;
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int LyricsFontSize { get; set; }
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int LyricsFontSize { get; set; }
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial TextAlignmentType LyricsAlignmentType { get; set; }
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial TextAlignmentType LyricsAlignmentType { get; set; }
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int LyricsBgFontOpacity { get; set; } = 30; // 30% opacity
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int LyricsBgFontOpacity { get; set; } = 30; // 30% opacity
|
||||||
|
|||||||
@@ -4,11 +4,13 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Windows.Foundation;
|
||||||
|
|
||||||
namespace BetterLyrics.WinUI3.Models.Settings
|
namespace BetterLyrics.WinUI3.Models.Settings
|
||||||
{
|
{
|
||||||
public partial class PictureInPictureModeSettings : BaseModeSettings
|
public partial class PictureInPictureModeSettings : BaseModeSettings
|
||||||
{
|
{
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial Point WindowPosition { get; set; } = new Point(100, 100);
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial List<string> ToggleShortcut { get; set; } = new List<string>() { "Ctrl", "Shift", "P" };
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial List<string> ToggleShortcut { get; set; } = new List<string>() { "Ctrl", "Shift", "P" };
|
||||||
|
|
||||||
public PictureInPictureModeSettings()
|
public PictureInPictureModeSettings()
|
||||||
|
|||||||
@@ -13,7 +13,9 @@ namespace BetterLyrics.WinUI3.Models.Settings
|
|||||||
public partial class StandardModeSettings : BaseModeSettings
|
public partial class StandardModeSettings : BaseModeSettings
|
||||||
{
|
{
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial Rect WindowBounds { get; set; } = new Rect(100, 100, 1000, 600);
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial Rect WindowBounds { get; set; } = new Rect(100, 100, 1000, 600);
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsMaximized { get; set; } = false;
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsAlwaysOnTop { get; set; } = false;
|
||||||
|
|
||||||
public StandardModeSettings()
|
public StandardModeSettings()
|
||||||
{
|
{
|
||||||
LyricsDisplayType = LyricsDisplayType.SplitView;
|
LyricsDisplayType = LyricsDisplayType.SplitView;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using BetterLyrics.WinUI3.Services;
|
using BetterLyrics.WinUI3.Enums;
|
||||||
|
using BetterLyrics.WinUI3.Services;
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -14,7 +15,12 @@ namespace BetterLyrics.WinUI3.Models.Settings
|
|||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial string LibreTranslateServer { get; set; } = string.Empty;
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial string LibreTranslateServer { get; set; } = string.Empty;
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsTranslationEnabled { get; set; } = true;
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsTranslationEnabled { get; set; } = true;
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool ShowTranslationOnly { get; set; } = false;
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool ShowTranslationOnly { get; set; } = false;
|
||||||
[ObservableProperty][NotifyPropertyChangedRecipients] public partial int SelectedTargetLanguageIndex { get; set; } = LanguageHelper.GetDefaultTargetLanguageIndex();
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial string SelectedTargetLanguageCode { get; set; } = LanguageHelper.GetDefaultTargetLanguageCode();
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsJyutpingEnabled { get; set; } = false;
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial ChineseRomanization ChineseRomanization { get; set; }
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsChineseRomanizationEnabled { get; set; } = false;
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsJapaneseRomanizationEnabled { get; set; } = false;
|
||||||
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsTraditionalChineseEnabled { get; set; } = false;
|
||||||
|
|
||||||
public TranslationSettings() { }
|
public TranslationSettings() { }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,11 +21,14 @@ namespace BetterLyrics.WinUI3.Models
|
|||||||
public partial double? DurationMs { get; set; }
|
public partial double? DurationMs { get; set; }
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public partial string? SourceAppUserModelId { get; set; } = null;
|
public partial string? PlayerId { get; set; } = null;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public partial string Title { get; set; }
|
public partial string Title { get; set; }
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
public partial string? SongId { get; set; } = null;
|
||||||
|
|
||||||
public SongInfo() { }
|
public SongInfo() { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Windows.Foundation;
|
||||||
|
|
||||||
|
namespace BetterLyrics.WinUI3.Models
|
||||||
|
{
|
||||||
|
public partial class WindowBoundsRecord : ObservableObject
|
||||||
|
{
|
||||||
|
[ObservableProperty] public partial string MonitorDeviceName { get; set; } = string.Empty;
|
||||||
|
[ObservableProperty] public partial Rect WindowBounds { get; set; }
|
||||||
|
[ObservableProperty] public partial Rect DemoWindowBounds { get; set; }
|
||||||
|
[ObservableProperty] public partial Rect MonitorBounds { get; set; }
|
||||||
|
[ObservableProperty] public partial Rect DemoMonitorBounds { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,6 +12,7 @@ using System.Linq;
|
|||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace BetterLyrics.WinUI3.Services.AlbumArtSearchService
|
namespace BetterLyrics.WinUI3.Services.AlbumArtSearchService
|
||||||
@@ -30,7 +31,7 @@ namespace BetterLyrics.WinUI3.Services.AlbumArtSearchService
|
|||||||
_iTunesHttpClinet = new();
|
_iTunesHttpClinet = new();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<byte[]?> SearchAsync(string mediaSessionId, string title, string artist, string album, byte[]? bytesFromSMTC = null)
|
public async Task<byte[]?> SearchAsync(string mediaSessionId, string title, string artist, string album, byte[]? bytesFromSMTC, CancellationToken token)
|
||||||
{
|
{
|
||||||
byte[]? result = null;
|
byte[]? result = null;
|
||||||
|
|
||||||
@@ -55,6 +56,7 @@ namespace BetterLyrics.WinUI3.Services.AlbumArtSearchService
|
|||||||
foreach (string countryCode in new List<string>() { "us", "cn", "jp", "kr" })
|
foreach (string countryCode in new List<string>() { "us", "cn", "jp", "kr" })
|
||||||
{
|
{
|
||||||
result = await SearchiTunesAsync(artist, album, title, countryCode);
|
result = await SearchiTunesAsync(artist, album, title, countryCode);
|
||||||
|
if (token.IsCancellationRequested) return result;
|
||||||
if (result != null) break;
|
if (result != null) break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -2,12 +2,13 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace BetterLyrics.WinUI3.Services.AlbumArtSearchService
|
namespace BetterLyrics.WinUI3.Services.AlbumArtSearchService
|
||||||
{
|
{
|
||||||
public interface IAlbumArtSearchService
|
public interface IAlbumArtSearchService
|
||||||
{
|
{
|
||||||
Task<byte[]?> SearchAsync(string mediaSessionId, string title, string artist, string album, byte[]? bytesFromSMTC = null);
|
Task<byte[]?> SearchAsync(string mediaSessionId, string title, string artist, string album, byte[]? bytesFromSMTC, CancellationToken token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ namespace BetterLyrics.WinUI3.Services.LiveStatesService
|
|||||||
{
|
{
|
||||||
public class LiveStatesService : BaseViewModel, ILiveStatesService,
|
public class LiveStatesService : BaseViewModel, ILiveStatesService,
|
||||||
IRecipient<PropertyChangedMessage<LyricsWindowMode>>,
|
IRecipient<PropertyChangedMessage<LyricsWindowMode>>,
|
||||||
IRecipient<PropertyChangedMessage<LyricsDisplayType>>
|
IRecipient<PropertyChangedMessage<LyricsDisplayType>>,
|
||||||
|
IRecipient<PropertyChangedMessage<bool>>
|
||||||
{
|
{
|
||||||
private readonly ISettingsService _settingsService;
|
private readonly ISettingsService _settingsService;
|
||||||
|
|
||||||
@@ -32,29 +33,33 @@ namespace BetterLyrics.WinUI3.Services.LiveStatesService
|
|||||||
{
|
{
|
||||||
if (message.Sender is LiveStates)
|
if (message.Sender is LiveStates)
|
||||||
{
|
{
|
||||||
if (message.PropertyName == nameof(LiveStates.CurrentLyricsWindowMode))
|
if (message.PropertyName == nameof(LiveStates.LyricsWindowMode))
|
||||||
{
|
{
|
||||||
switch (message.NewValue)
|
switch (message.NewValue)
|
||||||
{
|
{
|
||||||
case LyricsWindowMode.StandardMode:
|
case LyricsWindowMode.StandardMode:
|
||||||
LiveStates.CurrentLyricsStyleSettings = _settingsService.AppSettings.StandardLyricsStyleSettings;
|
LiveStates.LyricsStyleSettings = _settingsService.AppSettings.StandardLyricsStyleSettings;
|
||||||
LiveStates.CurrentLyricsEffectSettings = _settingsService.AppSettings.StandardLyricsEffectSettings;
|
LiveStates.LyricsEffectSettings = _settingsService.AppSettings.StandardLyricsEffectSettings;
|
||||||
LiveStates.CurrentLyricsDisplayType = _settingsService.AppSettings.StandardModeSettings.LyricsDisplayType;
|
LiveStates.LyricsDisplayType = _settingsService.AppSettings.StandardModeSettings.LyricsDisplayType;
|
||||||
|
LiveStates.IsAlwaysOnTop = _settingsService.AppSettings.StandardModeSettings.IsAlwaysOnTop;
|
||||||
break;
|
break;
|
||||||
case LyricsWindowMode.DockMode:
|
case LyricsWindowMode.DockMode:
|
||||||
LiveStates.CurrentLyricsStyleSettings = _settingsService.AppSettings.DockLyricsStyleSettings;
|
LiveStates.LyricsStyleSettings = _settingsService.AppSettings.DockLyricsStyleSettings;
|
||||||
LiveStates.CurrentLyricsEffectSettings = _settingsService.AppSettings.DockLyricsEffectSettings;
|
LiveStates.LyricsEffectSettings = _settingsService.AppSettings.DockLyricsEffectSettings;
|
||||||
LiveStates.CurrentLyricsDisplayType = _settingsService.AppSettings.DockModeSettings.LyricsDisplayType;
|
LiveStates.LyricsDisplayType = _settingsService.AppSettings.DockModeSettings.LyricsDisplayType;
|
||||||
|
LiveStates.IsAlwaysOnTop = true;
|
||||||
break;
|
break;
|
||||||
case LyricsWindowMode.DesktopMode:
|
case LyricsWindowMode.DesktopMode:
|
||||||
LiveStates.CurrentLyricsStyleSettings = _settingsService.AppSettings.DesktopLyricsStyleSettings;
|
LiveStates.LyricsStyleSettings = _settingsService.AppSettings.DesktopLyricsStyleSettings;
|
||||||
LiveStates.CurrentLyricsEffectSettings = _settingsService.AppSettings.DesktopLyricsEffectSettings;
|
LiveStates.LyricsEffectSettings = _settingsService.AppSettings.DesktopLyricsEffectSettings;
|
||||||
LiveStates.CurrentLyricsDisplayType = _settingsService.AppSettings.DesktopModeSettings.LyricsDisplayType;
|
LiveStates.LyricsDisplayType = _settingsService.AppSettings.DesktopModeSettings.LyricsDisplayType;
|
||||||
|
LiveStates.IsAlwaysOnTop = _settingsService.AppSettings.DesktopModeSettings.IsAlwaysOnTop;
|
||||||
break;
|
break;
|
||||||
case LyricsWindowMode.PictureInPictureMode:
|
case LyricsWindowMode.PictureInPictureMode:
|
||||||
LiveStates.CurrentLyricsStyleSettings = _settingsService.AppSettings.PictureInPictureLyricsStyleSettings;
|
LiveStates.LyricsStyleSettings = _settingsService.AppSettings.PictureInPictureLyricsStyleSettings;
|
||||||
LiveStates.CurrentLyricsEffectSettings = _settingsService.AppSettings.PictureInPictureLyricsEffectSettings;
|
LiveStates.LyricsEffectSettings = _settingsService.AppSettings.PictureInPictureLyricsEffectSettings;
|
||||||
LiveStates.CurrentLyricsDisplayType = _settingsService.AppSettings.PictureInPictureModeSettings.LyricsDisplayType;
|
LiveStates.LyricsDisplayType = _settingsService.AppSettings.PictureInPictureModeSettings.LyricsDisplayType;
|
||||||
|
// IsAlwaysOnTop 由系统托管
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -69,9 +74,9 @@ namespace BetterLyrics.WinUI3.Services.LiveStatesService
|
|||||||
{
|
{
|
||||||
if (message.PropertyName == nameof(StandardModeSettings.LyricsDisplayType))
|
if (message.PropertyName == nameof(StandardModeSettings.LyricsDisplayType))
|
||||||
{
|
{
|
||||||
if (LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.StandardMode)
|
if (LiveStates.LyricsWindowMode == LyricsWindowMode.StandardMode)
|
||||||
{
|
{
|
||||||
LiveStates.CurrentLyricsDisplayType = message.NewValue;
|
LiveStates.LyricsDisplayType = message.NewValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -79,9 +84,9 @@ namespace BetterLyrics.WinUI3.Services.LiveStatesService
|
|||||||
{
|
{
|
||||||
if (message.PropertyName == nameof(DockModeSettings.LyricsDisplayType))
|
if (message.PropertyName == nameof(DockModeSettings.LyricsDisplayType))
|
||||||
{
|
{
|
||||||
if (LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.DockMode)
|
if (LiveStates.LyricsWindowMode == LyricsWindowMode.DockMode)
|
||||||
{
|
{
|
||||||
LiveStates.CurrentLyricsDisplayType = message.NewValue;
|
LiveStates.LyricsDisplayType = message.NewValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -89,9 +94,9 @@ namespace BetterLyrics.WinUI3.Services.LiveStatesService
|
|||||||
{
|
{
|
||||||
if (message.PropertyName == nameof(DesktopModeSettings.LyricsDisplayType))
|
if (message.PropertyName == nameof(DesktopModeSettings.LyricsDisplayType))
|
||||||
{
|
{
|
||||||
if (LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.DesktopMode)
|
if (LiveStates.LyricsWindowMode == LyricsWindowMode.DesktopMode)
|
||||||
{
|
{
|
||||||
LiveStates.CurrentLyricsDisplayType = message.NewValue;
|
LiveStates.LyricsDisplayType = message.NewValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -99,9 +104,33 @@ namespace BetterLyrics.WinUI3.Services.LiveStatesService
|
|||||||
{
|
{
|
||||||
if (message.PropertyName == nameof(PictureInPictureModeSettings.LyricsDisplayType))
|
if (message.PropertyName == nameof(PictureInPictureModeSettings.LyricsDisplayType))
|
||||||
{
|
{
|
||||||
if (LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.PictureInPictureMode)
|
if (LiveStates.LyricsWindowMode == LyricsWindowMode.PictureInPictureMode)
|
||||||
{
|
{
|
||||||
LiveStates.CurrentLyricsDisplayType = message.NewValue;
|
LiveStates.LyricsDisplayType = message.NewValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Receive(PropertyChangedMessage<bool> message)
|
||||||
|
{
|
||||||
|
if (message.Sender is StandardModeSettings)
|
||||||
|
{
|
||||||
|
if (message.PropertyName == nameof(StandardModeSettings.IsAlwaysOnTop))
|
||||||
|
{
|
||||||
|
if (LiveStates.LyricsWindowMode == LyricsWindowMode.StandardMode)
|
||||||
|
{
|
||||||
|
LiveStates.IsAlwaysOnTop = message.NewValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (message.Sender is DesktopModeSettings)
|
||||||
|
{
|
||||||
|
if (message.PropertyName == nameof(DesktopModeSettings.IsAlwaysOnTop))
|
||||||
|
{
|
||||||
|
if (LiveStates.LyricsWindowMode == LyricsWindowMode.DesktopMode)
|
||||||
|
{
|
||||||
|
LiveStates.IsAlwaysOnTop = message.NewValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,18 @@
|
|||||||
// 2025/6/23 by Zhe Fang
|
// 2025/6/23 by Zhe Fang
|
||||||
|
|
||||||
|
using BetterLyrics.WinUI3.Enums;
|
||||||
|
using BetterLyrics.WinUI3.Models;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using BetterLyrics.WinUI3.Enums;
|
|
||||||
|
|
||||||
namespace BetterLyrics.WinUI3.Services.LyricsSearchService
|
namespace BetterLyrics.WinUI3.Services.LyricsSearchService
|
||||||
{
|
{
|
||||||
public interface ILyricsSearchService
|
public interface ILyricsSearchService
|
||||||
{
|
{
|
||||||
Task<(string?, LyricsSearchProvider?)> SearchAsync(string mediaSessionId, string title, string artist, string album, double durationMs, CancellationToken token);
|
Task<LyricsSearchResult> SearchSmartlyAsync(string mediaSessionId, string title, string artist, string album, double durationMs, string? songId, CancellationToken token);
|
||||||
|
|
||||||
|
Task<List<LyricsSearchResult>> SearchAllAsync(string title, string artist, string album, double durationMs, CancellationToken token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using ATL;
|
|||||||
using BetterLyrics.WinUI3.Enums;
|
using BetterLyrics.WinUI3.Enums;
|
||||||
using BetterLyrics.WinUI3.Helper;
|
using BetterLyrics.WinUI3.Helper;
|
||||||
using BetterLyrics.WinUI3.Helper.BetterLyrics.WinUI3.Helper;
|
using BetterLyrics.WinUI3.Helper.BetterLyrics.WinUI3.Helper;
|
||||||
|
using BetterLyrics.WinUI3.Models;
|
||||||
using BetterLyrics.WinUI3.Services.SettingsService;
|
using BetterLyrics.WinUI3.Services.SettingsService;
|
||||||
using CommunityToolkit.Mvvm.DependencyInjection;
|
using CommunityToolkit.Mvvm.DependencyInjection;
|
||||||
using Lyricify.Lyrics.Providers.Web.Kugou;
|
using Lyricify.Lyrics.Providers.Web.Kugou;
|
||||||
@@ -11,6 +12,7 @@ using Lyricify.Lyrics.Searchers;
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using NTextCat.Commons;
|
using NTextCat.Commons;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
@@ -26,6 +28,7 @@ namespace BetterLyrics.WinUI3.Services.LyricsSearchService
|
|||||||
{
|
{
|
||||||
private readonly HttpClient _amllTtmlDbHttpClient;
|
private readonly HttpClient _amllTtmlDbHttpClient;
|
||||||
private readonly HttpClient _lrcLibHttpClient;
|
private readonly HttpClient _lrcLibHttpClient;
|
||||||
|
private readonly AppleMusic _appleMusic;
|
||||||
|
|
||||||
private readonly ISettingsService _settingsService;
|
private readonly ISettingsService _settingsService;
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
@@ -38,9 +41,10 @@ namespace BetterLyrics.WinUI3.Services.LyricsSearchService
|
|||||||
_lrcLibHttpClient = new();
|
_lrcLibHttpClient = new();
|
||||||
_lrcLibHttpClient.DefaultRequestHeaders.Add(
|
_lrcLibHttpClient.DefaultRequestHeaders.Add(
|
||||||
"User-Agent",
|
"User-Agent",
|
||||||
$"{Constants.App.AppName} {MetadataHelper.AppVersion} ({Constants.Link.GithubUrl})"
|
$"{Constants.App.AppName} {MetadataHelper.AppVersion} ({Constants.Link.GitHubUrl})"
|
||||||
);
|
);
|
||||||
_amllTtmlDbHttpClient = new();
|
_amllTtmlDbHttpClient = new();
|
||||||
|
_appleMusic = new AppleMusic();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool IsAmllTtmlDbIndexInvalid()
|
private static bool IsAmllTtmlDbIndexInvalid()
|
||||||
@@ -87,89 +91,161 @@ namespace BetterLyrics.WinUI3.Services.LyricsSearchService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<(string?, LyricsSearchProvider?)> SearchAsync(string mediaSessionId, string title, string artist, string album, double durationMs, CancellationToken token)
|
public async Task<LyricsSearchResult> SearchSmartlyAsync(string mediaSessionId, string title, string artist, string album, double durationMs, string? songId, CancellationToken token)
|
||||||
{
|
{
|
||||||
|
var lyricsSearchResult = new LyricsSearchResult();
|
||||||
|
|
||||||
|
string overridenTitle = title;
|
||||||
|
string overridenArtist = artist;
|
||||||
|
|
||||||
_logger.LogInformation("Searching img for: {Title} - {Artist} (Album: {Album}, Duration: {DurationMs}ms)", title, artist, album, durationMs);
|
_logger.LogInformation("Searching img for: {Title} - {Artist} (Album: {Album}, Duration: {DurationMs}ms)", title, artist, album, durationMs);
|
||||||
|
|
||||||
|
var found = _settingsService.AppSettings.MappedSongSearchQueries
|
||||||
|
.Where(x => x.OriginalTitle == title && x.OriginalArtist == artist)
|
||||||
|
.FirstOrDefault();
|
||||||
|
|
||||||
|
if (found != null)
|
||||||
|
{
|
||||||
|
overridenTitle = found.MappedTitle;
|
||||||
|
overridenArtist = found.MappedArtist;
|
||||||
|
|
||||||
|
_logger.LogInformation("Found mapped song search query: {MappedSongSearchQuery}", found);
|
||||||
|
|
||||||
|
var pureMusic = found.IsMarkedAsPureMusic;
|
||||||
|
if (pureMusic)
|
||||||
|
{
|
||||||
|
lyricsSearchResult.Title = overridenTitle;
|
||||||
|
lyricsSearchResult.Artist = overridenArtist;
|
||||||
|
lyricsSearchResult.Raw = "[99:00.000]🎶🎶🎶";
|
||||||
|
return lyricsSearchResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
var targetProvider = found.LyricsSearchProvider;
|
||||||
|
if (targetProvider != null)
|
||||||
|
{
|
||||||
|
return await SearchSingleAsync(targetProvider.Value, overridenTitle, overridenArtist, album, durationMs, songId, token);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var provider in _settingsService.AppSettings.MediaSourceProvidersInfo.Where(x => x.Provider == mediaSessionId).FirstOrDefault()?.LyricsSearchProvidersInfo ?? [])
|
||||||
|
{
|
||||||
|
if (!provider.IsEnabled)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
lyricsSearchResult = await SearchSingleAsync(provider.Provider, overridenTitle, overridenArtist, album, durationMs, null, token);
|
||||||
|
|
||||||
|
if (lyricsSearchResult.IsFound)
|
||||||
|
{
|
||||||
|
return lyricsSearchResult;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return lyricsSearchResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<List<LyricsSearchResult>> SearchAllAsync(string title, string artist, string album, double durationMs, CancellationToken token)
|
||||||
|
{
|
||||||
|
_logger.LogInformation("Searching all lyrics for: {Title} - {Artist} (Album: {Album}, Duration: {DurationMs}ms)", title, artist, album, durationMs);
|
||||||
|
var results = new List<LyricsSearchResult>();
|
||||||
|
foreach (var provider in Enum.GetValues<LyricsSearchProvider>())
|
||||||
|
{
|
||||||
|
var searchResult = await SearchSingleAsync(provider, title, artist, album, durationMs, null, token);
|
||||||
|
results.Add(searchResult);
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task<LyricsSearchResult> SearchSingleAsync(LyricsSearchProvider provider, string title, string artist, string album, double durationMs, string? songId, CancellationToken token)
|
||||||
|
{
|
||||||
|
var lyricsSearchResult = new LyricsSearchResult
|
||||||
|
{
|
||||||
|
Provider = provider,
|
||||||
|
};
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
foreach (var provider in _settingsService.AppSettings.MediaSourceProvidersInfo.Where(x => x.Provider == mediaSessionId).FirstOrDefault()?.LyricsSearchProvidersInfo ?? [])
|
LyricsFormat lyricsFormat = provider.GetLyricsFormat();
|
||||||
|
|
||||||
|
// Check cache first
|
||||||
|
if (provider.IsRemote())
|
||||||
{
|
{
|
||||||
if (!provider.IsEnabled)
|
var cachedLyrics = FileHelper.ReadLyricsCache(title, artist, lyricsFormat, provider.GetCacheDirectory());
|
||||||
|
if (!string.IsNullOrWhiteSpace(cachedLyrics))
|
||||||
{
|
{
|
||||||
continue;
|
lyricsSearchResult.Raw = cachedLyrics;
|
||||||
|
lyricsSearchResult.Title = title;
|
||||||
|
lyricsSearchResult.Artist = artist;
|
||||||
|
return lyricsSearchResult;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
string? cachedLyrics;
|
if (provider.IsLocal())
|
||||||
LyricsFormat lyricsFormat = provider.Provider.GetLyricsFormat();
|
{
|
||||||
|
if (provider == LyricsSearchProvider.LocalMusicFile)
|
||||||
// Check cache first
|
|
||||||
if (provider.Provider.IsRemote())
|
|
||||||
{
|
{
|
||||||
cachedLyrics = FileHelper.ReadLyricsCache(title, artist, lyricsFormat, provider.Provider.GetCacheDirectory());
|
lyricsSearchResult = SearchEmbedded(title, artist);
|
||||||
if (!string.IsNullOrWhiteSpace(cachedLyrics))
|
|
||||||
{
|
|
||||||
return (cachedLyrics, provider.Provider);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
string? searchedLyrics = null;
|
|
||||||
|
|
||||||
if (provider.Provider.IsLocal())
|
|
||||||
{
|
|
||||||
if (provider.Provider == LyricsSearchProvider.LocalMusicFile)
|
|
||||||
{
|
|
||||||
searchedLyrics = SearchEmbedded(title, artist);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
searchedLyrics = await SearchFile(title, artist, lyricsFormat);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch (provider.Provider)
|
lyricsSearchResult = await SearchFile(title, artist, lyricsFormat);
|
||||||
{
|
|
||||||
case LyricsSearchProvider.LrcLib:
|
|
||||||
searchedLyrics = await SearchLrcLibAsync(title, artist, album, (int)(durationMs / 1000));
|
|
||||||
break;
|
|
||||||
case LyricsSearchProvider.QQ:
|
|
||||||
searchedLyrics = await SearchQQNeteaseKugouAsync(title, artist, album, (int)durationMs, Searchers.QQMusic);
|
|
||||||
break;
|
|
||||||
case LyricsSearchProvider.Kugou:
|
|
||||||
searchedLyrics = await SearchQQNeteaseKugouAsync(title, artist, album, (int)durationMs, Searchers.Kugou);
|
|
||||||
break;
|
|
||||||
case LyricsSearchProvider.Netease:
|
|
||||||
searchedLyrics = await SearchQQNeteaseKugouAsync(title, artist, album, (int)durationMs, Searchers.Netease);
|
|
||||||
break;
|
|
||||||
case LyricsSearchProvider.AmllTtmlDb:
|
|
||||||
searchedLyrics = await SearchAmllTtmlDbAsync(title, artist);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
token.ThrowIfCancellationRequested();
|
else
|
||||||
|
{
|
||||||
if (!string.IsNullOrWhiteSpace(searchedLyrics))
|
switch (provider)
|
||||||
{
|
{
|
||||||
if (provider.Provider.IsRemote())
|
case LyricsSearchProvider.LrcLib:
|
||||||
{
|
lyricsSearchResult = await SearchLrcLibAsync(title, artist, album, (int)(durationMs / 1000));
|
||||||
FileHelper.WriteLyricsCache(title, artist, searchedLyrics, lyricsFormat, provider.Provider.GetCacheDirectory());
|
break;
|
||||||
}
|
case LyricsSearchProvider.QQ:
|
||||||
|
lyricsSearchResult = await SearchQQNeteaseKugouAsync(title, artist, album, (int)durationMs, songId, Searchers.QQMusic);
|
||||||
|
break;
|
||||||
|
case LyricsSearchProvider.Kugou:
|
||||||
|
lyricsSearchResult = await SearchQQNeteaseKugouAsync(title, artist, album, (int)durationMs, songId, Searchers.Kugou);
|
||||||
|
break;
|
||||||
|
case LyricsSearchProvider.Netease:
|
||||||
|
lyricsSearchResult = await SearchQQNeteaseKugouAsync(title, artist, album, (int)durationMs, songId, Searchers.Netease);
|
||||||
|
break;
|
||||||
|
case LyricsSearchProvider.AmllTtmlDb:
|
||||||
|
lyricsSearchResult = await SearchAmllTtmlDbAsync(title, artist);
|
||||||
|
break;
|
||||||
|
case LyricsSearchProvider.AppleMusic:
|
||||||
|
lyricsSearchResult = await SearchAppleMusicAsync(title, artist, album, (int)durationMs);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (searchedLyrics, provider.Provider);
|
if (token.IsCancellationRequested)
|
||||||
|
{
|
||||||
|
return lyricsSearchResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lyricsSearchResult.IsFound)
|
||||||
|
{
|
||||||
|
if (provider.IsRemote())
|
||||||
|
{
|
||||||
|
FileHelper.WriteLyricsCache(title, artist, lyricsSearchResult.Raw!, lyricsFormat, provider.GetCacheDirectory());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception) { }
|
catch (Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
return (null, null);
|
return lyricsSearchResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<string?> SearchFile(string title, string artist, LyricsFormat format)
|
private async Task<LyricsSearchResult> SearchFile(string title, string artist, LyricsFormat format)
|
||||||
{
|
{
|
||||||
|
var lyricsSearchResult = new LyricsSearchResult
|
||||||
|
{
|
||||||
|
Provider = format.ToLyricsSearchProvider(),
|
||||||
|
};
|
||||||
|
|
||||||
foreach (var folder in _settingsService.AppSettings.LocalMediaFolders)
|
foreach (var folder in _settingsService.AppSettings.LocalMediaFolders)
|
||||||
{
|
{
|
||||||
if (Directory.Exists(folder.Path) && folder.IsEnabled)
|
if (Directory.Exists(folder.Path) && folder.IsEnabled)
|
||||||
@@ -183,7 +259,9 @@ namespace BetterLyrics.WinUI3.Services.LyricsSearchService
|
|||||||
string? raw = await File.ReadAllTextAsync(file, FileHelper.GetEncoding(file));
|
string? raw = await File.ReadAllTextAsync(file, FileHelper.GetEncoding(file));
|
||||||
if (raw != null)
|
if (raw != null)
|
||||||
{
|
{
|
||||||
return raw;
|
lyricsSearchResult.Raw = raw;
|
||||||
|
lyricsSearchResult.Title = title;
|
||||||
|
lyricsSearchResult.Artist = artist;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -193,11 +271,16 @@ namespace BetterLyrics.WinUI3.Services.LyricsSearchService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return lyricsSearchResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string? SearchEmbedded(string title, string artist)
|
private LyricsSearchResult SearchEmbedded(string title, string artist)
|
||||||
{
|
{
|
||||||
|
var lyricsSearchResult = new LyricsSearchResult
|
||||||
|
{
|
||||||
|
Provider = LyricsSearchProvider.LocalMusicFile,
|
||||||
|
};
|
||||||
|
|
||||||
foreach (var folder in _settingsService.AppSettings.LocalMediaFolders)
|
foreach (var folder in _settingsService.AppSettings.LocalMediaFolders)
|
||||||
{
|
{
|
||||||
if (Directory.Exists(folder.Path) && folder.IsEnabled)
|
if (Directory.Exists(folder.Path) && folder.IsEnabled)
|
||||||
@@ -212,23 +295,32 @@ namespace BetterLyrics.WinUI3.Services.LyricsSearchService
|
|||||||
var plain = TagLib.File.Create(file).Tag.Lyrics;
|
var plain = TagLib.File.Create(file).Tag.Lyrics;
|
||||||
if (!plain.IsNullOrEmpty())
|
if (!plain.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
return plain;
|
lyricsSearchResult.Raw = plain;
|
||||||
|
lyricsSearchResult.Title = track.Title;
|
||||||
|
lyricsSearchResult.Artist = artist;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return lyricsSearchResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<string?> SearchAmllTtmlDbAsync(string title, string artist)
|
private async Task<LyricsSearchResult> SearchAmllTtmlDbAsync(string title, string artist)
|
||||||
{
|
{
|
||||||
|
var lyricsSearchResult = new LyricsSearchResult
|
||||||
|
{
|
||||||
|
Provider = LyricsSearchProvider.AmllTtmlDb,
|
||||||
|
};
|
||||||
|
|
||||||
if (IsAmllTtmlDbIndexInvalid())
|
if (IsAmllTtmlDbIndexInvalid())
|
||||||
{
|
{
|
||||||
var downloadOk = await DownloadAmllTtmlDbIndexAsync();
|
var downloadOk = await DownloadAmllTtmlDbIndexAsync();
|
||||||
if (!downloadOk)
|
if (!downloadOk)
|
||||||
return null;
|
{
|
||||||
|
return lyricsSearchResult;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
string? rawLyricFile = null;
|
string? rawLyricFile = null;
|
||||||
@@ -271,7 +363,9 @@ namespace BetterLyrics.WinUI3.Services.LyricsSearchService
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(rawLyricFile))
|
if (string.IsNullOrWhiteSpace(rawLyricFile))
|
||||||
return null;
|
{
|
||||||
|
return lyricsSearchResult;
|
||||||
|
}
|
||||||
|
|
||||||
// 下载歌词内容
|
// 下载歌词内容
|
||||||
var url = $"{Constants.AmllTTmlDB.QueryPrefix}{rawLyricFile}";
|
var url = $"{Constants.AmllTTmlDB.QueryPrefix}{rawLyricFile}";
|
||||||
@@ -279,17 +373,29 @@ namespace BetterLyrics.WinUI3.Services.LyricsSearchService
|
|||||||
{
|
{
|
||||||
using var response = await _amllTtmlDbHttpClient.GetAsync(url);
|
using var response = await _amllTtmlDbHttpClient.GetAsync(url);
|
||||||
if (!response.IsSuccessStatusCode)
|
if (!response.IsSuccessStatusCode)
|
||||||
return null;
|
{
|
||||||
return await response.Content.ReadAsStringAsync();
|
return lyricsSearchResult;
|
||||||
|
}
|
||||||
|
string lyrics = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
lyricsSearchResult.Raw = lyrics;
|
||||||
|
lyricsSearchResult.Title = title;
|
||||||
|
lyricsSearchResult.Artist = artist;
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return lyricsSearchResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<string?> SearchLrcLibAsync(string title, string artist, string album, int duration)
|
private async Task<LyricsSearchResult> SearchLrcLibAsync(string title, string artist, string album, int duration)
|
||||||
{
|
{
|
||||||
|
var lyricsSearchResult = new LyricsSearchResult
|
||||||
|
{
|
||||||
|
Provider = LyricsSearchProvider.LrcLib,
|
||||||
|
};
|
||||||
|
|
||||||
// Build API query URL
|
// Build API query URL
|
||||||
var url =
|
var url =
|
||||||
$"https://lrclib.net/api/search?" +
|
$"https://lrclib.net/api/search?" +
|
||||||
@@ -300,7 +406,9 @@ namespace BetterLyrics.WinUI3.Services.LyricsSearchService
|
|||||||
|
|
||||||
using var response = await _lrcLibHttpClient.GetAsync(url);
|
using var response = await _lrcLibHttpClient.GetAsync(url);
|
||||||
if (!response.IsSuccessStatusCode)
|
if (!response.IsSuccessStatusCode)
|
||||||
return null;
|
{
|
||||||
|
return lyricsSearchResult;
|
||||||
|
}
|
||||||
|
|
||||||
var json = await response.Content.ReadAsStringAsync();
|
var json = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
@@ -308,31 +416,64 @@ namespace BetterLyrics.WinUI3.Services.LyricsSearchService
|
|||||||
json,
|
json,
|
||||||
Serialization.SourceGenerationContext.Default.JsonElement
|
Serialization.SourceGenerationContext.Default.JsonElement
|
||||||
);
|
);
|
||||||
|
|
||||||
|
string? original = null;
|
||||||
|
string? searchedTitle = null;
|
||||||
|
string? searchedArtist = null;
|
||||||
|
|
||||||
if (jArr.ValueKind == JsonValueKind.Array && jArr.GetArrayLength() > 0)
|
if (jArr.ValueKind == JsonValueKind.Array && jArr.GetArrayLength() > 0)
|
||||||
{
|
{
|
||||||
var first = jArr[0];
|
var first = jArr[0];
|
||||||
var syncedLyrics = first.GetProperty("syncedLyrics").GetString();
|
original = first.GetProperty("syncedLyrics").GetString();
|
||||||
var result = string.IsNullOrWhiteSpace(syncedLyrics) ? null : syncedLyrics;
|
searchedTitle = first.GetProperty("trackName").GetString();
|
||||||
if (!string.IsNullOrWhiteSpace(result))
|
searchedArtist = first.GetProperty("artistName").GetString();
|
||||||
{
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
lyricsSearchResult.Raw = original;
|
||||||
|
lyricsSearchResult.Title = searchedTitle;
|
||||||
|
lyricsSearchResult.Artist = searchedArtist;
|
||||||
|
|
||||||
|
return lyricsSearchResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static async Task<string?> SearchQQNeteaseKugouAsync(string title, string artist, string album, int durationMs, Searchers searchers)
|
private static async Task<LyricsSearchResult> SearchQQNeteaseKugouAsync(string title, string artist, string album, int durationMs, string? songId, Searchers searchers)
|
||||||
{
|
{
|
||||||
var result = await SearchersHelper.GetSearcher(searchers).SearchForResult(
|
var lyricsSearchResult = new LyricsSearchResult();
|
||||||
new Lyricify.Lyrics.Models.TrackMultiArtistMetadata()
|
|
||||||
{
|
switch (searchers)
|
||||||
DurationMs = durationMs,
|
{
|
||||||
Album = album,
|
case Searchers.QQMusic:
|
||||||
Artists = [artist],
|
lyricsSearchResult.Provider = LyricsSearchProvider.QQ;
|
||||||
Title = title,
|
break;
|
||||||
}
|
case Searchers.Netease:
|
||||||
);
|
lyricsSearchResult.Provider = LyricsSearchProvider.Netease;
|
||||||
|
break;
|
||||||
|
case Searchers.Kugou:
|
||||||
|
lyricsSearchResult.Provider = LyricsSearchProvider.Kugou;
|
||||||
|
break;
|
||||||
|
case Searchers.Musixmatch:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
ISearchResult? result;
|
||||||
|
if (searchers == Searchers.Netease && songId != null)
|
||||||
|
{
|
||||||
|
result = new NeteaseSearchResult(title, [artist], album, null, durationMs, songId);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = await SearchersHelper.GetSearcher(searchers).SearchForResult(
|
||||||
|
new Lyricify.Lyrics.Models.TrackMultiArtistMetadata()
|
||||||
|
{
|
||||||
|
DurationMs = durationMs,
|
||||||
|
Album = album,
|
||||||
|
Artists = [artist],
|
||||||
|
Title = title,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (result is QQMusicSearchResult qqResult)
|
if (result is QQMusicSearchResult qqResult)
|
||||||
{
|
{
|
||||||
@@ -349,11 +490,15 @@ namespace BetterLyrics.WinUI3.Services.LyricsSearchService
|
|||||||
PathHelper.QQTranslationCacheDirectory
|
PathHelper.QQTranslationCacheDirectory
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return original;
|
|
||||||
|
lyricsSearchResult.Raw = original;
|
||||||
|
lyricsSearchResult.Title = qqResult.Title;
|
||||||
|
lyricsSearchResult.Artist = qqResult.Artists.Join(" | ");
|
||||||
}
|
}
|
||||||
else if (result is NeteaseSearchResult neteaseResult)
|
else if (result is NeteaseSearchResult neteaseResult)
|
||||||
{
|
{
|
||||||
var response = await Lyricify.Lyrics.Helpers.ProviderHelper.NeteaseApi.GetLyric(neteaseResult.Id);
|
var response = await Lyricify.Lyrics.Helpers.ProviderHelper.NeteaseApi.GetLyric(neteaseResult.Id);
|
||||||
|
var original = response?.Lrc?.Lyric;
|
||||||
var translated = response?.Tlyric?.Lyric;
|
var translated = response?.Tlyric?.Lyric;
|
||||||
if (!string.IsNullOrEmpty(translated))
|
if (!string.IsNullOrEmpty(translated))
|
||||||
{
|
{
|
||||||
@@ -365,21 +510,59 @@ namespace BetterLyrics.WinUI3.Services.LyricsSearchService
|
|||||||
PathHelper.NeteaseTranslationCacheDirectory
|
PathHelper.NeteaseTranslationCacheDirectory
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return response?.Lrc.Lyric;
|
|
||||||
|
lyricsSearchResult.Raw = original;
|
||||||
|
lyricsSearchResult.Title = neteaseResult.Title;
|
||||||
|
lyricsSearchResult.Artist = neteaseResult.Artists.Join(" | ");
|
||||||
}
|
}
|
||||||
else if (result is KugouSearchResult kugouResult)
|
else if (result is KugouSearchResult kugouResult)
|
||||||
{
|
{
|
||||||
var response = await Lyricify.Lyrics.Helpers.ProviderHelper.KugouApi.GetSearchLyrics(hash: kugouResult.Hash);
|
var response = await Lyricify.Lyrics.Helpers.ProviderHelper.KugouApi.GetSearchLyrics(hash: kugouResult.Hash);
|
||||||
|
string? original = null;
|
||||||
if (response?.Candidates.FirstOrDefault() is SearchLyricsResponse.Candidate candidate)
|
if (response?.Candidates.FirstOrDefault() is SearchLyricsResponse.Candidate candidate)
|
||||||
{
|
{
|
||||||
return Lyricify.Lyrics.Decrypter.Krc.Helper.GetLyrics(
|
original = await Lyricify.Lyrics.Decrypter.Krc.Helper.GetLyricsAsync(candidate.Id, candidate.AccessKey);
|
||||||
candidate.Id,
|
if (candidate.TransId != null)
|
||||||
candidate.AccessKey
|
{
|
||||||
);
|
string? translated = await Lyricify.Lyrics.Decrypter.Krc.Helper.GetLyricsAsync(candidate.TransId, candidate.AccessKey);
|
||||||
|
if (!string.IsNullOrEmpty(translated))
|
||||||
|
{
|
||||||
|
FileHelper.WriteLyricsCache(
|
||||||
|
title,
|
||||||
|
artist,
|
||||||
|
translated,
|
||||||
|
LyricsFormat.Lrc,
|
||||||
|
PathHelper.KugouTranslationCacheDirectory
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lyricsSearchResult.Raw = original;
|
||||||
|
lyricsSearchResult.Title = kugouResult.Title;
|
||||||
|
lyricsSearchResult.Artist = kugouResult.Artists.Join(" | ");
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return lyricsSearchResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task<LyricsSearchResult> SearchAppleMusicAsync(string title, string artist, string album, int durationMs)
|
||||||
|
{
|
||||||
|
var lyricsSearchResult = new LyricsSearchResult
|
||||||
|
{
|
||||||
|
Provider = LyricsSearchProvider.AppleMusic,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (await _appleMusic.InitAsync())
|
||||||
|
{
|
||||||
|
var raw = await _appleMusic.GetLyricsAsync(title, artist);
|
||||||
|
_logger.LogInformation("Apple Music lyrics search result for {Title} - {Artist}: {Raw}", title, artist, raw ?? "null");
|
||||||
|
lyricsSearchResult.Raw = raw;
|
||||||
|
lyricsSearchResult.Title = title;
|
||||||
|
lyricsSearchResult.Artist = artist;
|
||||||
|
}
|
||||||
|
|
||||||
|
return lyricsSearchResult;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,9 +27,13 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
|
|
||||||
MediaSourceProviderInfo? GetCurrentMediaSourceProviderInfo();
|
MediaSourceProviderInfo? GetCurrentMediaSourceProviderInfo();
|
||||||
|
|
||||||
|
void UpdateLyrics();
|
||||||
|
void UpdateTranslations();
|
||||||
|
|
||||||
bool IsPlaying { get; }
|
bool IsPlaying { get; }
|
||||||
SongInfo? SongInfo { get; }
|
SongInfo? SongInfo { get; }
|
||||||
TimeSpan Position { get; }
|
TimeSpan Position { get; }
|
||||||
|
LyricsData? CurrentLyricsData { get; }
|
||||||
|
|
||||||
LyricsSearchProvider? LyricsSearchProvider { get; }
|
LyricsSearchProvider? LyricsSearchProvider { get; }
|
||||||
TranslationSearchProvider? TranslationSearchProvider { get; }
|
TranslationSearchProvider? TranslationSearchProvider { get; }
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices.WindowsRuntime;
|
using System.Runtime.InteropServices.WindowsRuntime;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Windows.Graphics.Imaging;
|
using Windows.Graphics.Imaging;
|
||||||
using Windows.Storage.Streams;
|
using Windows.Storage.Streams;
|
||||||
@@ -21,46 +22,50 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
|
|
||||||
private void UpdateAlbumArt()
|
private void UpdateAlbumArt()
|
||||||
{
|
{
|
||||||
_albumArtRefreshRunner.RunAsync(async (token) =>
|
_albumArtRefreshRunner.RunAsync(RefreshArtAlbum);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task RefreshArtAlbum(CancellationToken token)
|
||||||
|
{
|
||||||
|
if (_cachedSongInfo == null)
|
||||||
{
|
{
|
||||||
if (_cachedSongInfo == null)
|
_logger.LogWarning("Cached song info is null, cannot update album art.");
|
||||||
{
|
return;
|
||||||
_logger.LogWarning("Cached song info is null, cannot update album art.");
|
}
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
byte[]? bytes = await _albumArtSearchService.SearchAsync(
|
byte[]? bytes = await Task.Run(async () => await _albumArtSearchService.SearchAsync(
|
||||||
SongInfo?.SourceAppUserModelId ?? "",
|
SongInfo?.PlayerId ?? "",
|
||||||
_cachedSongInfo.Title,
|
_cachedSongInfo.Title,
|
||||||
_cachedSongInfo.Artist,
|
_cachedSongInfo.Artist,
|
||||||
_cachedSongInfo?.Album ?? string.Empty,
|
_cachedSongInfo?.Album ?? string.Empty,
|
||||||
_SMTCAlbumArtBytes
|
_SMTCAlbumArtBytes,
|
||||||
);
|
token
|
||||||
|
), token);
|
||||||
|
if (token.IsCancellationRequested) return;
|
||||||
|
|
||||||
|
if (bytes == null)
|
||||||
|
{
|
||||||
|
bytes = await ImageHelper.CreateTextPlaceholderBytesAsync(500, 500);
|
||||||
token.ThrowIfCancellationRequested();
|
token.ThrowIfCancellationRequested();
|
||||||
|
}
|
||||||
|
|
||||||
if (bytes == null)
|
bytes = ImageHelper.MakeSquareWithThemeColor(bytes);
|
||||||
{
|
|
||||||
bytes = await ImageHelper.CreateTextPlaceholderBytesAsync(500, 500);
|
|
||||||
token.ThrowIfCancellationRequested();
|
|
||||||
}
|
|
||||||
|
|
||||||
bytes = ImageHelper.MakeSquareWithThemeColor(bytes);
|
using var stream = new InMemoryRandomAccessStream();
|
||||||
|
await stream.WriteAsync(bytes.AsBuffer());
|
||||||
|
token.ThrowIfCancellationRequested();
|
||||||
|
|
||||||
using var stream = new InMemoryRandomAccessStream();
|
var decoder = await BitmapDecoder.CreateAsync(stream);
|
||||||
await stream.WriteAsync(bytes.AsBuffer());
|
token.ThrowIfCancellationRequested();
|
||||||
token.ThrowIfCancellationRequested();
|
|
||||||
|
|
||||||
var decoder = await BitmapDecoder.CreateAsync(stream);
|
var albumArtSwBitmap = await decoder.GetSoftwareBitmapAsync(BitmapPixelFormat.Rgba8, BitmapAlphaMode.Premultiplied);
|
||||||
token.ThrowIfCancellationRequested();
|
albumArtSwBitmap = SoftwareBitmap.Copy(albumArtSwBitmap);
|
||||||
|
token.ThrowIfCancellationRequested();
|
||||||
|
|
||||||
var albumArtSwBitmap = await decoder.GetSoftwareBitmapAsync(BitmapPixelFormat.Rgba16, BitmapAlphaMode.Premultiplied);
|
var albumArtLightAccentColor = ImageHelper.GetAccentColorsFromByte(bytes, 1, false).FirstOrDefault();
|
||||||
token.ThrowIfCancellationRequested();
|
var albumArtDarkAccentColor = ImageHelper.GetAccentColorsFromByte(bytes, 1, true).FirstOrDefault();
|
||||||
|
|
||||||
var albumArtLightAccentColor = ImageHelper.GetAccentColorsFromByte(bytes, 1, false).FirstOrDefault();
|
AlbumArtChanged?.Invoke(this, new AlbumArtChangedEventArgs(null, albumArtSwBitmap, albumArtLightAccentColor, albumArtDarkAccentColor));
|
||||||
var albumArtDarkAccentColor = ImageHelper.GetAccentColorsFromByte(bytes, 1, true).FirstOrDefault();
|
|
||||||
|
|
||||||
AlbumArtChanged?.Invoke(this, new AlbumArtChangedEventArgs(null, albumArtSwBitmap, albumArtLightAccentColor, albumArtDarkAccentColor));
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using BetterLyrics.WinUI3.Events;
|
|||||||
using BetterLyrics.WinUI3.Helper;
|
using BetterLyrics.WinUI3.Helper;
|
||||||
using BetterLyrics.WinUI3.Models;
|
using BetterLyrics.WinUI3.Models;
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
using Lyricify.Lyrics.Helpers.General;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -10,18 +11,19 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Vanara.PInvoke;
|
||||||
|
|
||||||
namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
||||||
{
|
{
|
||||||
public partial class MediaSessionsService : IMediaSessionsService
|
public partial class MediaSessionsService : IMediaSessionsService
|
||||||
{
|
{
|
||||||
private LatestOnlyTaskRunner _refreshLyricsRunner = new();
|
private LatestOnlyTaskRunner _refreshLyricsRunner = new();
|
||||||
private LatestOnlyTaskRunner _showTranslationsRunner = new();
|
private LatestOnlyTaskRunner _refreshTranslationRunner = new();
|
||||||
|
|
||||||
private int _langIndex = 0;
|
private int _langIndex = 0;
|
||||||
private List<LyricsData> _lyricsDataArr = [];
|
private List<LyricsData> _lyricsDataArr = [];
|
||||||
|
|
||||||
private LyricsData? CurrentLyricsData => _lyricsDataArr.ElementAtOrDefault(_langIndex);
|
public LyricsData? CurrentLyricsData => _lyricsDataArr.ElementAtOrDefault(_langIndex);
|
||||||
|
|
||||||
public event EventHandler<LyricsChangedEventArgs>? LyricsChanged;
|
public event EventHandler<LyricsChangedEventArgs>? LyricsChanged;
|
||||||
|
|
||||||
@@ -31,7 +33,7 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
|
|
||||||
[ObservableProperty] public partial bool IsTranslating { get; set; } = false;
|
[ObservableProperty] public partial bool IsTranslating { get; set; } = false;
|
||||||
|
|
||||||
private void UpdateTranslations()
|
private async Task RefreshTranslationAsync(CancellationToken token)
|
||||||
{
|
{
|
||||||
TranslationSearchProvider = null;
|
TranslationSearchProvider = null;
|
||||||
_lyricsDataArr.ElementAtOrDefault(0)?.SetDisplayedTextInOriginalText();
|
_lyricsDataArr.ElementAtOrDefault(0)?.SetDisplayedTextInOriginalText();
|
||||||
@@ -40,26 +42,23 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
|
|
||||||
if (_settingsService.AppSettings.TranslationSettings.IsTranslationEnabled)
|
if (_settingsService.AppSettings.TranslationSettings.IsTranslationEnabled)
|
||||||
{
|
{
|
||||||
_showTranslationsRunner.RunAsync(async token =>
|
await SetDisplayedAlongWithTranslationsAsync(token);
|
||||||
{
|
if (token.IsCancellationRequested) return;
|
||||||
await SetDisplayedAlongWithTranslationsAsync(token);
|
|
||||||
IsTranslating = false;
|
|
||||||
LyricsChanged?.Invoke(this, new LyricsChangedEventArgs(CurrentLyricsData));
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
_logger.LogInformation("Translation is disabled, showing original lyrics only.");
|
||||||
_lyricsDataArr.ElementAtOrDefault(0)?.SetDisplayedTextInOriginalText();
|
_lyricsDataArr.ElementAtOrDefault(0)?.SetDisplayedTextInOriginalText();
|
||||||
_langIndex = 0;
|
_langIndex = 0;
|
||||||
IsTranslating = false;
|
|
||||||
LyricsChanged?.Invoke(this, new LyricsChangedEventArgs(CurrentLyricsData));
|
|
||||||
}
|
}
|
||||||
|
IsTranslating = false;
|
||||||
|
LyricsChanged?.Invoke(this, new LyricsChangedEventArgs(CurrentLyricsData));
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task SetDisplayedAlongWithTranslationsAsync(CancellationToken token)
|
private async Task SetDisplayedAlongWithTranslationsAsync(CancellationToken token)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("Showing translation for lyrics...");
|
_logger.LogInformation("Showing translation for lyrics...");
|
||||||
string targetLangCode = LanguageHelper.SupportedTargetLanguages[_settingsService.AppSettings.TranslationSettings.SelectedTargetLanguageIndex].Code;
|
string targetLangCode = _settingsService.AppSettings.TranslationSettings.SelectedTargetLanguageCode;
|
||||||
_logger.LogInformation("Target language code: {TargetLangCode}", targetLangCode);
|
_logger.LogInformation("Target language code: {TargetLangCode}", targetLangCode);
|
||||||
string? originalText = _lyricsDataArr.FirstOrDefault()?.WrappedOriginalText;
|
string? originalText = _lyricsDataArr.FirstOrDefault()?.WrappedOriginalText;
|
||||||
if (originalText == null) return;
|
if (originalText == null) return;
|
||||||
@@ -67,6 +66,25 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
string? originalLangCode = LanguageHelper.DetectLanguageCode(originalText);
|
string? originalLangCode = LanguageHelper.DetectLanguageCode(originalText);
|
||||||
_logger.LogInformation("Original language code: {OriginalLangCode}", originalLangCode ?? "null");
|
_logger.LogInformation("Original language code: {OriginalLangCode}", originalLangCode ?? "null");
|
||||||
|
|
||||||
|
if (originalLangCode == "zh" && _settingsService.AppSettings.TranslationSettings.IsChineseRomanizationEnabled)
|
||||||
|
{
|
||||||
|
switch (_settingsService.AppSettings.TranslationSettings.ChineseRomanization)
|
||||||
|
{
|
||||||
|
case ChineseRomanization.Pinyin:
|
||||||
|
targetLangCode = "pinyin";
|
||||||
|
break;
|
||||||
|
case ChineseRomanization.Jyutping:
|
||||||
|
targetLangCode = "jyutping";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (originalLangCode == "ja" && _settingsService.AppSettings.TranslationSettings.IsJapaneseRomanizationEnabled)
|
||||||
|
{
|
||||||
|
targetLangCode = "romaji";
|
||||||
|
}
|
||||||
|
|
||||||
if (originalLangCode == targetLangCode)
|
if (originalLangCode == targetLangCode)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("Original lyrics already in target language: {TargetLangCode}", targetLangCode);
|
_logger.LogInformation("Original lyrics already in target language: {TargetLangCode}", targetLangCode);
|
||||||
@@ -76,7 +94,7 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Try get translation from itself first
|
// Try get translation from itself first
|
||||||
int found = _translateService.SearchTranslatedLyricsItself(_lyricsDataArr);
|
int found = _translateService.SearchTranslatedLyricsItself(_lyricsDataArr, targetLangCode);
|
||||||
if (found >= 0)
|
if (found >= 0)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("Found translation in lyrics data at index {FoundIndex}", found);
|
_logger.LogInformation("Found translation in lyrics data at index {FoundIndex}", found);
|
||||||
@@ -87,7 +105,7 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_lyricsDataArr[0].SetDisplayedTextAlongWith(_lyricsDataArr[found], _liveStatesService.LiveStates.CurrentLyricsStyleSettings.LyricsTranslationSeparator, 50);
|
_lyricsDataArr[0].SetDisplayedTextAlongWith(_lyricsDataArr[found], _liveStatesService.LiveStates.LyricsStyleSettings.LyricsTranslationSeparator, 50);
|
||||||
_langIndex = 0;
|
_langIndex = 0;
|
||||||
TranslationSearchProvider = LyricsSearchProvider.ToTranslationSearchProvider();
|
TranslationSearchProvider = LyricsSearchProvider.ToTranslationSearchProvider();
|
||||||
}
|
}
|
||||||
@@ -110,7 +128,7 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_lyricsDataArr[0].SetDisplayedTextAlongWith(translated, _liveStatesService.LiveStates.CurrentLyricsStyleSettings.LyricsTranslationSeparator);
|
_lyricsDataArr[0].SetDisplayedTextAlongWith(translated, _liveStatesService.LiveStates.LyricsStyleSettings.LyricsTranslationSeparator);
|
||||||
_langIndex = 0;
|
_langIndex = 0;
|
||||||
}
|
}
|
||||||
TranslationSearchProvider = Enums.TranslationSearchProvider.LibreTranslate;
|
TranslationSearchProvider = Enums.TranslationSearchProvider.LibreTranslate;
|
||||||
@@ -132,27 +150,27 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
|
|
||||||
LyricsChanged?.Invoke(this, new LyricsChangedEventArgs(CurrentLyricsData));
|
LyricsChanged?.Invoke(this, new LyricsChangedEventArgs(CurrentLyricsData));
|
||||||
|
|
||||||
string? lyricsRaw = null;
|
|
||||||
LyricsSearchProvider? lyricsSearchProvider = null;
|
|
||||||
LyricsSearchProvider = lyricsSearchProvider;
|
|
||||||
|
|
||||||
if (SongInfo != null)
|
if (SongInfo != null)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("Searching lyrics for: Title={Title}, Artist={Artist}, Album={Album}, DurationMs={DurationMs}",
|
_logger.LogInformation("Searching lyrics for: Title={Title}, Artist={Artist}, Album={Album}, DurationMs={DurationMs}",
|
||||||
SongInfo.Title, SongInfo.Artist, SongInfo.Album, SongInfo.DurationMs);
|
SongInfo.Title, SongInfo.Artist, SongInfo.Album, SongInfo.DurationMs);
|
||||||
(lyricsRaw, lyricsSearchProvider) = await _lyrcsSearchService.SearchAsync(
|
|
||||||
SongInfo.SourceAppUserModelId ?? "",
|
var lyricsSearchResult = await Task.Run(async () => await _lyrcsSearchService.SearchSmartlyAsync(
|
||||||
|
SongInfo.PlayerId ?? "",
|
||||||
SongInfo.Title,
|
SongInfo.Title,
|
||||||
SongInfo.Artist,
|
SongInfo.Artist,
|
||||||
SongInfo.Album ?? "",
|
SongInfo.Album ?? "",
|
||||||
SongInfo.DurationMs ?? 0,
|
SongInfo.DurationMs ?? 0,
|
||||||
|
SongInfo.SongId,
|
||||||
token
|
token
|
||||||
);
|
), token);
|
||||||
LyricsSearchProvider = lyricsSearchProvider;
|
if (token.IsCancellationRequested) return;
|
||||||
_logger.LogInformation("Lyrics was found? {Found}, Provider: {LyricsSearchProvider}", lyricsRaw != null, LyricsSearchProvider?.ToString() ?? "null");
|
LyricsSearchProvider = lyricsSearchResult?.Provider;
|
||||||
token.ThrowIfCancellationRequested();
|
|
||||||
|
|
||||||
_lyricsDataArr = new LyricsParser().Parse(lyricsRaw, (int?)SongInfo?.DurationMs);
|
_logger.LogInformation("Lyrics was found? {Found}, Provider: {LyricsSearchProvider}", lyricsSearchResult?.IsFound, LyricsSearchProvider?.ToString() ?? "null");
|
||||||
|
|
||||||
|
_lyricsDataArr = new LyricsParser().Parse(lyricsSearchResult?.Raw, (int?)SongInfo?.DurationMs);
|
||||||
|
ApplyChinesePreference();
|
||||||
FillTranslationFromCache(LyricsSearchProvider);
|
FillTranslationFromCache(LyricsSearchProvider);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -165,22 +183,36 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
// This ensures that original lyrics are always shown while waiting for translations
|
// This ensures that original lyrics are always shown while waiting for translations
|
||||||
_lyricsDataArr[0].SetDisplayedTextInOriginalText();
|
_lyricsDataArr[0].SetDisplayedTextInOriginalText();
|
||||||
LyricsChanged?.Invoke(this, new LyricsChangedEventArgs(CurrentLyricsData));
|
LyricsChanged?.Invoke(this, new LyricsChangedEventArgs(CurrentLyricsData));
|
||||||
|
ApplyChinesePreference();
|
||||||
UpdateTranslations();
|
UpdateTranslations();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ApplyChinesePreference()
|
||||||
|
{
|
||||||
|
var traditionalChinesePreferred = _settingsService.AppSettings.TranslationSettings.IsTraditionalChineseEnabled;
|
||||||
|
var found = _lyricsDataArr.FindIndex(x => x.LanguageCode == "zh");
|
||||||
|
if (found >= 0)
|
||||||
|
{
|
||||||
|
foreach (var item in _lyricsDataArr[found].LyricsLines)
|
||||||
|
{
|
||||||
|
item.OriginalText = traditionalChinesePreferred ? ChineseHelper.S2T(item.OriginalText) : ChineseHelper.T2S(item.OriginalText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void FillTranslationFromCache(LyricsSearchProvider? provider)
|
private void FillTranslationFromCache(LyricsSearchProvider? provider)
|
||||||
{
|
{
|
||||||
string? translationRaw = null;
|
string? translationRaw = null;
|
||||||
switch (provider)
|
switch (provider)
|
||||||
{
|
{
|
||||||
case Enums.LyricsSearchProvider.QQ:
|
case Enums.LyricsSearchProvider.QQ:
|
||||||
translationRaw = Helper.FileHelper.ReadLyricsCache(SongInfo!.Title, SongInfo.Artist, LyricsFormat.Lrc, Helper.PathHelper.QQTranslationCacheDirectory);
|
translationRaw = FileHelper.ReadLyricsCache(SongInfo!.Title, SongInfo.Artist, LyricsFormat.Lrc, PathHelper.QQTranslationCacheDirectory);
|
||||||
break;
|
break;
|
||||||
case Enums.LyricsSearchProvider.Kugou:
|
case Enums.LyricsSearchProvider.Kugou:
|
||||||
|
translationRaw = FileHelper.ReadLyricsCache(SongInfo!.Title, SongInfo.Artist, LyricsFormat.Lrc, PathHelper.KugouTranslationCacheDirectory);
|
||||||
break;
|
break;
|
||||||
case Enums.LyricsSearchProvider.Netease:
|
case Enums.LyricsSearchProvider.Netease:
|
||||||
translationRaw = Helper.FileHelper.ReadLyricsCache(SongInfo!.Title, SongInfo.Artist, LyricsFormat.Lrc, Helper.PathHelper.NeteaseTranslationCacheDirectory);
|
translationRaw = FileHelper.ReadLyricsCache(SongInfo!.Title, SongInfo.Artist, LyricsFormat.Lrc, PathHelper.NeteaseTranslationCacheDirectory);
|
||||||
break;
|
break;
|
||||||
case Enums.LyricsSearchProvider.LrcLib:
|
case Enums.LyricsSearchProvider.LrcLib:
|
||||||
break;
|
break;
|
||||||
@@ -218,12 +250,14 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateLyrics()
|
public void UpdateLyrics()
|
||||||
{
|
{
|
||||||
_refreshLyricsRunner.RunAsync(async token =>
|
_refreshLyricsRunner.RunAsync(RefreshLyricsAsync);
|
||||||
{
|
}
|
||||||
await RefreshLyricsAsync(token);
|
|
||||||
});
|
public void UpdateTranslations()
|
||||||
|
{
|
||||||
|
_refreshTranslationRunner.RunAsync(RefreshTranslationAsync);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ using BetterLyrics.WinUI3.Helper;
|
|||||||
using BetterLyrics.WinUI3.Models;
|
using BetterLyrics.WinUI3.Models;
|
||||||
using BetterLyrics.WinUI3.Models.Settings;
|
using BetterLyrics.WinUI3.Models.Settings;
|
||||||
using BetterLyrics.WinUI3.Services.AlbumArtSearchService;
|
using BetterLyrics.WinUI3.Services.AlbumArtSearchService;
|
||||||
using BetterLyrics.WinUI3.Services.LastFMService;
|
|
||||||
using BetterLyrics.WinUI3.Services.LibWatcherService;
|
using BetterLyrics.WinUI3.Services.LibWatcherService;
|
||||||
using BetterLyrics.WinUI3.Services.LiveStatesService;
|
using BetterLyrics.WinUI3.Services.LiveStatesService;
|
||||||
using BetterLyrics.WinUI3.Services.LyricsSearchService;
|
using BetterLyrics.WinUI3.Services.LyricsSearchService;
|
||||||
@@ -20,19 +19,12 @@ using CommunityToolkit.Mvvm.Messaging;
|
|||||||
using CommunityToolkit.Mvvm.Messaging.Messages;
|
using CommunityToolkit.Mvvm.Messaging.Messages;
|
||||||
using EvtSource;
|
using EvtSource;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.Graphics.Canvas;
|
|
||||||
using Microsoft.UI.Dispatching;
|
using Microsoft.UI.Dispatching;
|
||||||
using SixLabors.ImageSharp.PixelFormats;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices.WindowsRuntime;
|
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Windows.Graphics.Imaging;
|
|
||||||
using Windows.Media.Control;
|
using Windows.Media.Control;
|
||||||
using Windows.Storage.Streams;
|
using Windows.Storage.Streams;
|
||||||
using WindowsMediaController;
|
using WindowsMediaController;
|
||||||
@@ -40,9 +32,10 @@ using WindowsMediaController;
|
|||||||
namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
||||||
{
|
{
|
||||||
public partial class MediaSessionsService : BaseViewModel, IMediaSessionsService,
|
public partial class MediaSessionsService : BaseViewModel, IMediaSessionsService,
|
||||||
IRecipient<PropertyChangedMessage<int>>,
|
|
||||||
IRecipient<PropertyChangedMessage<bool>>,
|
IRecipient<PropertyChangedMessage<bool>>,
|
||||||
IRecipient<PropertyChangedMessage<string>>,
|
IRecipient<PropertyChangedMessage<string>>,
|
||||||
|
IRecipient<PropertyChangedMessage<LyricsWindowMode>>,
|
||||||
|
IRecipient<PropertyChangedMessage<ChineseRomanization>>,
|
||||||
IRecipient<PropertyChangedMessage<List<string>>>
|
IRecipient<PropertyChangedMessage<List<string>>>
|
||||||
{
|
{
|
||||||
private readonly IAlbumArtSearchService _albumArtSearchService;
|
private readonly IAlbumArtSearchService _albumArtSearchService;
|
||||||
@@ -55,6 +48,7 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
|
|
||||||
private double _lxMusicPositionSeconds = 0;
|
private double _lxMusicPositionSeconds = 0;
|
||||||
private double _lxMusicDurationSeconds = 0;
|
private double _lxMusicDurationSeconds = 0;
|
||||||
|
private byte[]? _lxMusicAlbumArtBytes = null;
|
||||||
|
|
||||||
private bool _cachedIsPlaying = false;
|
private bool _cachedIsPlaying = false;
|
||||||
private TimeSpan _cachedPosition = TimeSpan.Zero;
|
private TimeSpan _cachedPosition = TimeSpan.Zero;
|
||||||
@@ -92,15 +86,29 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
_logger = Ioc.Default.GetRequiredService<ILogger<MediaSessionsService>>();
|
_logger = Ioc.Default.GetRequiredService<ILogger<MediaSessionsService>>();
|
||||||
|
|
||||||
_settingsService.AppSettings.MediaSourceProvidersInfo.ItemPropertyChanged += MediaSourceProvidersInfo_ItemPropertyChanged;
|
_settingsService.AppSettings.MediaSourceProvidersInfo.ItemPropertyChanged += MediaSourceProvidersInfo_ItemPropertyChanged;
|
||||||
|
|
||||||
_settingsService.AppSettings.LocalMediaFolders.CollectionChanged += LocalMediaFolders_CollectionChanged;
|
_settingsService.AppSettings.LocalMediaFolders.CollectionChanged += LocalMediaFolders_CollectionChanged;
|
||||||
_settingsService.AppSettings.LocalMediaFolders.ItemPropertyChanged += LocalMediaFolders_ItemPropertyChanged;
|
_settingsService.AppSettings.LocalMediaFolders.ItemPropertyChanged += LocalMediaFolders_ItemPropertyChanged;
|
||||||
|
|
||||||
|
_settingsService.AppSettings.MappedSongSearchQueries.CollectionChanged += MappedSongSearchQueries_CollectionChanged;
|
||||||
|
_settingsService.AppSettings.MappedSongSearchQueries.ItemPropertyChanged += MappedSongSearchQueries_ItemPropertyChanged;
|
||||||
|
|
||||||
_libWatcherService.MusicLibraryFilesChanged += LibWatcherService_MusicLibraryFilesChanged;
|
_libWatcherService.MusicLibraryFilesChanged += LibWatcherService_MusicLibraryFilesChanged;
|
||||||
|
|
||||||
InitMediaManager();
|
InitMediaManager();
|
||||||
InitPlaybackShortcuts();
|
InitPlaybackShortcuts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void MappedSongSearchQueries_ItemPropertyChanged(object? sender, ItemPropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
UpdateLyrics();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MappedSongSearchQueries_CollectionChanged(object? sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
UpdateLyrics();
|
||||||
|
}
|
||||||
|
|
||||||
private void InitPlaybackShortcuts()
|
private void InitPlaybackShortcuts()
|
||||||
{
|
{
|
||||||
UpdatePlayOrPauseSongShortcut();
|
UpdatePlayOrPauseSongShortcut();
|
||||||
@@ -172,11 +180,22 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
UpdateLyrics();
|
UpdateLyrics();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MediaSourceProviderInfo? GetCurrentMediaSourceProviderInfo()
|
||||||
|
{
|
||||||
|
var desiredSession = GetCurrentSession();
|
||||||
|
return _settingsService.AppSettings.MediaSourceProvidersInfo.FirstOrDefault(x => x.Provider == desiredSession?.Id);
|
||||||
|
}
|
||||||
|
|
||||||
private bool IsMediaSourceEnabled(string id)
|
private bool IsMediaSourceEnabled(string id)
|
||||||
{
|
{
|
||||||
return _settingsService.AppSettings.MediaSourceProvidersInfo.FirstOrDefault(s => s.Provider == id)?.IsEnabled ?? true;
|
return _settingsService.AppSettings.MediaSourceProvidersInfo.FirstOrDefault(s => s.Provider == id)?.IsEnabled ?? true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool IsMediaSourceTimelineSyncEnabled(string id)
|
||||||
|
{
|
||||||
|
return _settingsService.AppSettings.MediaSourceProvidersInfo.FirstOrDefault(s => s.Provider == id)?.IsTimelineSyncEnabled ?? true;
|
||||||
|
}
|
||||||
|
|
||||||
private void InitMediaManager()
|
private void InitMediaManager()
|
||||||
{
|
{
|
||||||
_mediaManager.OnAnySessionOpened += MediaManager_OnAnySessionOpened;
|
_mediaManager.OnAnySessionOpened += MediaManager_OnAnySessionOpened;
|
||||||
@@ -201,26 +220,32 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
|
|
||||||
private void MediaManager_OnAnyTimelinePropertyChanged(MediaManager.MediaSession mediaSession, GlobalSystemMediaTransportControlsSessionTimelineProperties timelineProperties)
|
private void MediaManager_OnAnyTimelinePropertyChanged(MediaManager.MediaSession mediaSession, GlobalSystemMediaTransportControlsSessionTimelineProperties timelineProperties)
|
||||||
{
|
{
|
||||||
_dispatcherQueue.TryEnqueue(DispatcherQueuePriority.Low, () =>
|
if (!_mediaManager.IsStarted) return;
|
||||||
|
if (mediaSession == null) return;
|
||||||
|
|
||||||
|
var desiredSession = GetCurrentSession();
|
||||||
|
|
||||||
|
if (mediaSession != desiredSession) return;
|
||||||
|
|
||||||
|
if (!IsMediaSourceEnabled(mediaSession.Id))
|
||||||
{
|
{
|
||||||
if (!_mediaManager.IsStarted) return;
|
_cachedPosition = TimeSpan.Zero;
|
||||||
if (mediaSession == null) return;
|
_dispatcherQueue.TryEnqueue(DispatcherQueuePriority.Low, () =>
|
||||||
|
|
||||||
var focusedSession = _mediaManager.GetFocusedSession();
|
|
||||||
|
|
||||||
if (mediaSession != focusedSession) return;
|
|
||||||
|
|
||||||
if (!IsMediaSourceEnabled(mediaSession.Id))
|
|
||||||
{
|
{
|
||||||
_cachedPosition = TimeSpan.Zero;
|
|
||||||
TimelineChanged?.Invoke(this, new TimelineChangedEventArgs(_cachedPosition, TimeSpan.Zero));
|
TimelineChanged?.Invoke(this, new TimelineChangedEventArgs(_cachedPosition, TimeSpan.Zero));
|
||||||
}
|
});
|
||||||
else
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (IsMediaSourceTimelineSyncEnabled(mediaSession.Id))
|
||||||
{
|
{
|
||||||
_cachedPosition = timelineProperties.Position;
|
_cachedPosition = timelineProperties.Position;
|
||||||
TimelineChanged?.Invoke(this, new TimelineChangedEventArgs(_cachedPosition, timelineProperties.EndTime));
|
_dispatcherQueue.TryEnqueue(DispatcherQueuePriority.Low, () =>
|
||||||
|
{
|
||||||
|
TimelineChanged?.Invoke(this, new TimelineChangedEventArgs(_cachedPosition, timelineProperties.EndTime));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MediaManager_OnAnyPlaybackStateChanged(MediaManager.MediaSession mediaSession, GlobalSystemMediaTransportControlsSessionPlaybackInfo playbackInfo)
|
private void MediaManager_OnAnyPlaybackStateChanged(MediaManager.MediaSession mediaSession, GlobalSystemMediaTransportControlsSessionPlaybackInfo playbackInfo)
|
||||||
@@ -230,10 +255,10 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
if (!_mediaManager.IsStarted) return;
|
if (!_mediaManager.IsStarted) return;
|
||||||
if (mediaSession == null) return;
|
if (mediaSession == null) return;
|
||||||
|
|
||||||
var focusedSession = _mediaManager.GetFocusedSession();
|
var desiredSession = GetCurrentSession();
|
||||||
|
|
||||||
//RecordMediaSourceProviderInfo(mediaSession);
|
//RecordMediaSourceProviderInfo(mediaSession);
|
||||||
if (mediaSession != focusedSession) return;
|
if (mediaSession != desiredSession) return;
|
||||||
|
|
||||||
if (!IsMediaSourceEnabled(mediaSession.Id))
|
if (!IsMediaSourceEnabled(mediaSession.Id))
|
||||||
{
|
{
|
||||||
@@ -259,21 +284,21 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
if (!_mediaManager.IsStarted) return;
|
if (!_mediaManager.IsStarted) return;
|
||||||
if (mediaSession == null) return;
|
if (mediaSession == null) return;
|
||||||
|
|
||||||
string id = mediaSession.Id;
|
string sessionId = mediaSession.Id;
|
||||||
|
|
||||||
var focusedSession = _mediaManager.GetFocusedSession();
|
var desiredSession = GetCurrentSession();
|
||||||
|
|
||||||
//RecordMediaSourceProviderInfo(mediaSession);
|
//RecordMediaSourceProviderInfo(mediaSession);
|
||||||
if (mediaSession != focusedSession) return;
|
if (mediaSession != desiredSession) return;
|
||||||
|
|
||||||
if (!IsMediaSourceEnabled(id))
|
if (!IsMediaSourceEnabled(sessionId))
|
||||||
{
|
{
|
||||||
_cachedSongInfo = null;
|
_cachedSongInfo = null;
|
||||||
|
|
||||||
_logger.LogInformation("Media properties changed: Title: {Title}, Artist: {Artist}, Album: {Album}",
|
_logger.LogInformation("Media properties changed: Title: {Title}, Artist: {Artist}, Album: {Album}",
|
||||||
mediaProperties.Title, mediaProperties.Artist, mediaProperties.AlbumTitle);
|
mediaProperties.Title, mediaProperties.Artist, mediaProperties.AlbumTitle);
|
||||||
|
|
||||||
if (id == Constants.PlayerID.LXMusic)
|
if (sessionId == Constants.PlayerID.LXMusic)
|
||||||
{
|
{
|
||||||
StopSSE();
|
StopSSE();
|
||||||
}
|
}
|
||||||
@@ -288,21 +313,39 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
currentMediaSourceProviderInfo?.PositionOffset = 0;
|
currentMediaSourceProviderInfo?.PositionOffset = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string fixedArtist = mediaProperties.Artist;
|
||||||
|
string fixedAlbum = mediaProperties.AlbumTitle;
|
||||||
|
string? songId = null;
|
||||||
|
|
||||||
|
if (sessionId == Constants.PlayerID.AppleMusic || sessionId == Constants.PlayerID.AppleMusicAlternative)
|
||||||
|
{
|
||||||
|
fixedArtist = mediaProperties.Artist.Split(" — ").FirstOrDefault() ?? mediaProperties.Artist;
|
||||||
|
fixedAlbum = mediaProperties.Artist.Split(" — ").LastOrDefault() ?? mediaProperties.AlbumTitle;
|
||||||
|
}
|
||||||
|
else if (sessionId == Constants.PlayerID.NetEaseCloudMusic)
|
||||||
|
{
|
||||||
|
songId = mediaProperties.Genres.FirstOrDefault()?.Replace("NCM-", "");
|
||||||
|
if (songId != null && songId.Length != 10)
|
||||||
|
{
|
||||||
|
songId = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_cachedSongInfo = new SongInfo
|
_cachedSongInfo = new SongInfo
|
||||||
{
|
{
|
||||||
Title = mediaProperties.Title,
|
Title = mediaProperties.Title,
|
||||||
Artist = mediaProperties.Artist,
|
Artist = fixedArtist,
|
||||||
Album = mediaProperties.AlbumTitle,
|
Album = fixedAlbum,
|
||||||
DurationMs = mediaSession.ControlSession.GetTimelineProperties().EndTime.TotalMilliseconds,
|
DurationMs = mediaSession.ControlSession.GetTimelineProperties().EndTime.TotalMilliseconds,
|
||||||
SourceAppUserModelId = id,
|
PlayerId = sessionId,
|
||||||
|
SongId = songId
|
||||||
};
|
};
|
||||||
|
|
||||||
_cachedSongInfo.Duration = (int)(_cachedSongInfo.DurationMs / 1000f);
|
_cachedSongInfo.Duration = (int)(_cachedSongInfo.DurationMs / 1000f);
|
||||||
|
|
||||||
_logger.LogInformation("Media properties changed: Title: {Title}, Artist: {Artist}, Album: {Album}",
|
_logger.LogInformation("Media properties changed: Title: {Title}, Artist: {Artist}, Album: {Album}",
|
||||||
mediaProperties.Title, mediaProperties.Artist, mediaProperties.AlbumTitle);
|
mediaProperties.Title, mediaProperties.Artist, mediaProperties.AlbumTitle);
|
||||||
|
|
||||||
if (id == Constants.PlayerID.LXMusic)
|
if (sessionId == Constants.PlayerID.LXMusic)
|
||||||
{
|
{
|
||||||
StartSSE();
|
StartSSE();
|
||||||
}
|
}
|
||||||
@@ -311,7 +354,11 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
StopSSE();
|
StopSSE();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mediaProperties.Thumbnail is IRandomAccessStreamReference streamReference)
|
if (sessionId == Constants.PlayerID.LXMusic && _lxMusicAlbumArtBytes != null)
|
||||||
|
{
|
||||||
|
_SMTCAlbumArtBytes = _lxMusicAlbumArtBytes;
|
||||||
|
}
|
||||||
|
else if (mediaProperties.Thumbnail is IRandomAccessStreamReference streamReference)
|
||||||
{
|
{
|
||||||
_SMTCAlbumArtBytes = await ImageHelper.ToByteArrayAsync(streamReference);
|
_SMTCAlbumArtBytes = await ImageHelper.ToByteArrayAsync(streamReference);
|
||||||
}
|
}
|
||||||
@@ -347,6 +394,30 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
SendFocusedMessagesAsync().ConfigureAwait(false);
|
SendFocusedMessagesAsync().ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private MediaManager.MediaSession? GetCurrentSession()
|
||||||
|
{
|
||||||
|
var focusedSession = _mediaManager.GetFocusedSession();
|
||||||
|
if (focusedSession == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (IsMediaSourceEnabled(focusedSession.Id))
|
||||||
|
{
|
||||||
|
return focusedSession;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach (var session in _mediaManager.CurrentMediaSessions.Values)
|
||||||
|
{
|
||||||
|
if (IsMediaSourceEnabled(session.Id))
|
||||||
|
{
|
||||||
|
return session;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private void RecordMediaSourceProviderInfo(MediaManager.MediaSession mediaSession)
|
private void RecordMediaSourceProviderInfo(MediaManager.MediaSession mediaSession)
|
||||||
{
|
{
|
||||||
if (!_mediaManager.IsStarted) return;
|
if (!_mediaManager.IsStarted) return;
|
||||||
@@ -379,17 +450,23 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
|
|
||||||
private async Task SendFocusedMessagesAsync()
|
private async Task SendFocusedMessagesAsync()
|
||||||
{
|
{
|
||||||
var focusedSession = _mediaManager.GetFocusedSession();
|
var desiredSession = GetCurrentSession();
|
||||||
if (focusedSession == null || focusedSession.ControlSession == null) return;
|
if (desiredSession == null || desiredSession.ControlSession == null) return;
|
||||||
|
|
||||||
var mediaProps = await focusedSession.ControlSession.TryGetMediaPropertiesAsync();
|
var mediaProps = await desiredSession.ControlSession.TryGetMediaPropertiesAsync();
|
||||||
MediaManager_OnAnyTimelinePropertyChanged(focusedSession, focusedSession.ControlSession.GetTimelineProperties());
|
if (desiredSession == null || desiredSession.ControlSession == null) return;
|
||||||
MediaManager_OnAnyMediaPropertyChanged(focusedSession, mediaProps);
|
MediaManager_OnAnyTimelinePropertyChanged(desiredSession, desiredSession.ControlSession.GetTimelineProperties());
|
||||||
MediaManager_OnAnyPlaybackStateChanged(focusedSession, focusedSession.ControlSession.GetPlaybackInfo());
|
MediaManager_OnAnyMediaPropertyChanged(desiredSession, mediaProps);
|
||||||
|
MediaManager_OnAnyPlaybackStateChanged(desiredSession, desiredSession.ControlSession.GetPlaybackInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StartSSE()
|
private void StartSSE()
|
||||||
{
|
{
|
||||||
|
if (_sse != null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_sse = new EventSourceReader(new Uri($"{_settingsService.AppSettings.GeneralSettings.LXMusicServer}{Constants.LXMusic.QuerySuffix}")).Start();
|
_sse = new EventSourceReader(new Uri($"{_settingsService.AppSettings.GeneralSettings.LXMusicServer}{Constants.LXMusic.QuerySuffix}")).Start();
|
||||||
@@ -429,9 +506,9 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
|
|
||||||
private void Sse_MessageReceived(object sender, EventSourceMessageEventArgs e)
|
private void Sse_MessageReceived(object sender, EventSourceMessageEventArgs e)
|
||||||
{
|
{
|
||||||
_dispatcherQueue.TryEnqueue(DispatcherQueuePriority.Low, () =>
|
_dispatcherQueue.TryEnqueue(DispatcherQueuePriority.Low, async () =>
|
||||||
{
|
{
|
||||||
if (_cachedSongInfo?.SourceAppUserModelId == Constants.PlayerID.LXMusic)
|
if (_cachedSongInfo?.PlayerId == Constants.PlayerID.LXMusic)
|
||||||
{
|
{
|
||||||
var data = JsonSerializer.Deserialize(e.Message, Serialization.SourceGenerationContext.Default.JsonElement);
|
var data = JsonSerializer.Deserialize(e.Message, Serialization.SourceGenerationContext.Default.JsonElement);
|
||||||
if (data.ValueKind == JsonValueKind.Number)
|
if (data.ValueKind == JsonValueKind.Number)
|
||||||
@@ -445,7 +522,24 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
_lxMusicDurationSeconds = data.GetDouble();
|
_lxMusicDurationSeconds = data.GetDouble();
|
||||||
}
|
}
|
||||||
|
|
||||||
TimelineChanged?.Invoke(this, new TimelineChangedEventArgs(TimeSpan.FromSeconds(_lxMusicPositionSeconds), TimeSpan.FromSeconds(_lxMusicDurationSeconds)));
|
if (IsMediaSourceTimelineSyncEnabled(Constants.PlayerID.LXMusic))
|
||||||
|
{
|
||||||
|
TimelineChanged?.Invoke(this, new TimelineChangedEventArgs(TimeSpan.FromSeconds(_lxMusicPositionSeconds), TimeSpan.FromSeconds(_lxMusicDurationSeconds)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (data.ValueKind == JsonValueKind.String)
|
||||||
|
{
|
||||||
|
if (e.Event == "picUrl")
|
||||||
|
{
|
||||||
|
string? picUrl = data.GetString();
|
||||||
|
if (picUrl != null)
|
||||||
|
{
|
||||||
|
_logger.LogInformation("LX Music Album Art URL: {url}", picUrl);
|
||||||
|
_lxMusicAlbumArtBytes = await ImageHelper.GetImageBytesFromUrlAsync(picUrl);
|
||||||
|
_SMTCAlbumArtBytes = _lxMusicAlbumArtBytes;
|
||||||
|
UpdateAlbumArt();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -453,54 +547,49 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
|
|
||||||
public async Task PlayAsync()
|
public async Task PlayAsync()
|
||||||
{
|
{
|
||||||
var focusedSession = _mediaManager.GetFocusedSession();
|
var desiredSession = GetCurrentSession();
|
||||||
if (focusedSession != null)
|
if (desiredSession != null)
|
||||||
{
|
{
|
||||||
await focusedSession.ControlSession?.TryPlayAsync();
|
await desiredSession.ControlSession?.TryPlayAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task PauseAsync()
|
public async Task PauseAsync()
|
||||||
{
|
{
|
||||||
var focusedSession = _mediaManager.GetFocusedSession();
|
var desiredSession = GetCurrentSession();
|
||||||
if (focusedSession != null)
|
if (desiredSession != null)
|
||||||
{
|
{
|
||||||
await focusedSession.ControlSession?.TryPauseAsync();
|
await desiredSession.ControlSession?.TryPauseAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task PreviousAsync()
|
public async Task PreviousAsync()
|
||||||
{
|
{
|
||||||
var focusedSession = _mediaManager.GetFocusedSession();
|
var desiredSession = GetCurrentSession();
|
||||||
if (focusedSession != null)
|
if (desiredSession != null)
|
||||||
{
|
{
|
||||||
await focusedSession.ControlSession?.TrySkipPreviousAsync();
|
await desiredSession.ControlSession?.TrySkipPreviousAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task NextAsync()
|
public async Task NextAsync()
|
||||||
{
|
{
|
||||||
var focusedSession = _mediaManager.GetFocusedSession();
|
var desiredSession = GetCurrentSession();
|
||||||
if (focusedSession != null)
|
if (desiredSession != null)
|
||||||
{
|
{
|
||||||
await focusedSession.ControlSession?.TrySkipNextAsync();
|
await desiredSession.ControlSession?.TrySkipNextAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task ChangePosition(double seconds)
|
public async Task ChangePosition(double seconds)
|
||||||
{
|
{
|
||||||
var focusedSession = _mediaManager.GetFocusedSession();
|
var desiredSession = GetCurrentSession();
|
||||||
if (focusedSession != null)
|
if (desiredSession != null)
|
||||||
{
|
{
|
||||||
await focusedSession.ControlSession?.TryChangePlaybackPositionAsync(TimeSpan.FromSeconds(seconds).Ticks);
|
await desiredSession.ControlSession?.TryChangePlaybackPositionAsync(TimeSpan.FromSeconds(seconds).Ticks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public MediaSourceProviderInfo? GetCurrentMediaSourceProviderInfo()
|
|
||||||
{
|
|
||||||
return _settingsService.AppSettings.MediaSourceProvidersInfo.Where(x => x.Provider == _cachedSongInfo?.SourceAppUserModelId)?.FirstOrDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Receive(PropertyChangedMessage<bool> message)
|
public void Receive(PropertyChangedMessage<bool> message)
|
||||||
{
|
{
|
||||||
if (message.Sender is MediaSourceProviderInfo)
|
if (message.Sender is MediaSourceProviderInfo)
|
||||||
@@ -524,6 +613,18 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
{
|
{
|
||||||
UpdateTranslations();
|
UpdateTranslations();
|
||||||
}
|
}
|
||||||
|
else if (message.PropertyName == nameof(TranslationSettings.IsChineseRomanizationEnabled))
|
||||||
|
{
|
||||||
|
UpdateTranslations();
|
||||||
|
}
|
||||||
|
else if (message.PropertyName == nameof(TranslationSettings.IsJapaneseRomanizationEnabled))
|
||||||
|
{
|
||||||
|
UpdateTranslations();
|
||||||
|
}
|
||||||
|
else if (message.PropertyName == nameof(TranslationSettings.IsTraditionalChineseEnabled))
|
||||||
|
{
|
||||||
|
UpdateLyrics();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -546,18 +647,6 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Receive(PropertyChangedMessage<int> message)
|
|
||||||
{
|
|
||||||
if (message.Sender is TranslationSettings)
|
|
||||||
{
|
|
||||||
if (message.PropertyName == nameof(TranslationSettings.SelectedTargetLanguageIndex))
|
|
||||||
{
|
|
||||||
_logger.LogInformation("Target language index changed: {Index}", _settingsService.AppSettings.TranslationSettings.SelectedTargetLanguageIndex);
|
|
||||||
UpdateTranslations();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Receive(PropertyChangedMessage<string> message)
|
public void Receive(PropertyChangedMessage<string> message)
|
||||||
{
|
{
|
||||||
if (message.Sender is LyricsStyleSettings)
|
if (message.Sender is LyricsStyleSettings)
|
||||||
@@ -567,6 +656,37 @@ namespace BetterLyrics.WinUI3.Services.MediaSessionsService
|
|||||||
UpdateTranslations();
|
UpdateTranslations();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (message.Sender is TranslationSettings)
|
||||||
|
{
|
||||||
|
if (message.PropertyName == nameof(TranslationSettings.SelectedTargetLanguageCode))
|
||||||
|
{
|
||||||
|
_logger.LogInformation("Target language code changed: {code}", _settingsService.AppSettings.TranslationSettings.SelectedTargetLanguageCode);
|
||||||
|
UpdateTranslations();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Receive(PropertyChangedMessage<LyricsWindowMode> message)
|
||||||
|
{
|
||||||
|
if (message.Sender is LiveStates)
|
||||||
|
{
|
||||||
|
if (message.PropertyName == nameof(LiveStates.LyricsWindowMode))
|
||||||
|
{
|
||||||
|
UpdateTranslations();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Receive(PropertyChangedMessage<ChineseRomanization> message)
|
||||||
|
{
|
||||||
|
if (message.Sender is TranslationSettings)
|
||||||
|
{
|
||||||
|
if (message.PropertyName == nameof(TranslationSettings.ChineseRomanization))
|
||||||
|
{
|
||||||
|
UpdateTranslations();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,6 +57,12 @@ namespace BetterLyrics.WinUI3.Services.SettingsService
|
|||||||
AppSettings.LocalMediaFolders.CollectionChanged += AppSettings_CollectionChanged;
|
AppSettings.LocalMediaFolders.CollectionChanged += AppSettings_CollectionChanged;
|
||||||
AppSettings.LocalMediaFolders.ItemPropertyChanged += AppSettings_ItemPropertyChanged;
|
AppSettings.LocalMediaFolders.ItemPropertyChanged += AppSettings_ItemPropertyChanged;
|
||||||
|
|
||||||
|
AppSettings.MappedSongSearchQueries.CollectionChanged += AppSettings_CollectionChanged;
|
||||||
|
AppSettings.MappedSongSearchQueries.ItemPropertyChanged += AppSettings_ItemPropertyChanged;
|
||||||
|
|
||||||
|
AppSettings.WindowBoundsRecords.CollectionChanged += AppSettings_CollectionChanged;
|
||||||
|
AppSettings.WindowBoundsRecords.ItemPropertyChanged += AppSettings_ItemPropertyChanged;
|
||||||
|
|
||||||
AppSettings.Version = MetadataHelper.AppVersion;
|
AppSettings.Version = MetadataHelper.AppVersion;
|
||||||
|
|
||||||
EnsureMediaSourceProvidersInfo();
|
EnsureMediaSourceProvidersInfo();
|
||||||
|
|||||||
@@ -12,6 +12,6 @@ namespace BetterLyrics.WinUI3.Services.TranslateService
|
|||||||
{
|
{
|
||||||
Task<string> TranslateTextAsync(string text, string targetLangCode, CancellationToken token);
|
Task<string> TranslateTextAsync(string text, string targetLangCode, CancellationToken token);
|
||||||
|
|
||||||
int SearchTranslatedLyricsItself(List<LyricsData> lyricsDataArr);
|
int SearchTranslatedLyricsItself(List<LyricsData> lyricsDataArr, string targetLangCode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,9 +58,8 @@ namespace BetterLyrics.WinUI3.Services.TranslateService
|
|||||||
return result?.TranslatedText ?? string.Empty;
|
return result?.TranslatedText ?? string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int SearchTranslatedLyricsItself(List<LyricsData> lyricsDataArr)
|
public int SearchTranslatedLyricsItself(List<LyricsData> lyricsDataArr, string targetLangCode)
|
||||||
{
|
{
|
||||||
string targetLangCode = LanguageHelper.SupportedTargetLanguages[_settingsService.AppSettings.TranslationSettings.SelectedTargetLanguageIndex].Code;
|
|
||||||
if (lyricsDataArr.Count > 1)
|
if (lyricsDataArr.Count > 1)
|
||||||
{
|
{
|
||||||
for (int i = 1; i < lyricsDataArr.Count; i++)
|
for (int i = 1; i < lyricsDataArr.Count; i++)
|
||||||
|
|||||||
@@ -135,8 +135,8 @@
|
|||||||
<data name="AllLyricsSettingsControlStandard.Content" xml:space="preserve">
|
<data name="AllLyricsSettingsControlStandard.Content" xml:space="preserve">
|
||||||
<value>Standard</value>
|
<value>Standard</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BaseWindowAOTFlyoutItem.Text" xml:space="preserve">
|
<data name="AppSettingsControlGeneral.Content" xml:space="preserve">
|
||||||
<value>Always on top</value>
|
<value>General</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BaseWindowEnterFullScreenHint" xml:space="preserve">
|
<data name="BaseWindowEnterFullScreenHint" xml:space="preserve">
|
||||||
<value>Press Esc to exit full screen mode</value>
|
<value>Press Esc to exit full screen mode</value>
|
||||||
@@ -150,9 +150,6 @@
|
|||||||
<data name="BaseWindowMiniFlyoutItem.Text" xml:space="preserve">
|
<data name="BaseWindowMiniFlyoutItem.Text" xml:space="preserve">
|
||||||
<value>Picture-in-picture mode</value>
|
<value>Picture-in-picture mode</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BaseWindowUnMiniFlyoutItem.Text" xml:space="preserve">
|
|
||||||
<value>Exit picture-in-picture mode</value>
|
|
||||||
</data>
|
|
||||||
<data name="Cancel" xml:space="preserve">
|
<data name="Cancel" xml:space="preserve">
|
||||||
<value>Cancel</value>
|
<value>Cancel</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -222,6 +219,9 @@
|
|||||||
<data name="LyricsPageLyricsProviderPrefix.Header" xml:space="preserve">
|
<data name="LyricsPageLyricsProviderPrefix.Header" xml:space="preserve">
|
||||||
<value>Lyrics provider</value>
|
<value>Lyrics provider</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="LyricsPageLyricsSearchButtonToolTip.Content" xml:space="preserve">
|
||||||
|
<value>Manually search lyrics</value>
|
||||||
|
</data>
|
||||||
<data name="LyricsPageLyricsSettingsButtonToolTip.Content" xml:space="preserve">
|
<data name="LyricsPageLyricsSettingsButtonToolTip.Content" xml:space="preserve">
|
||||||
<value>Lyrics style and effect quick settings</value>
|
<value>Lyrics style and effect quick settings</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -252,6 +252,42 @@
|
|||||||
<data name="LyricsPageTranslationProviderPrefix.Header" xml:space="preserve">
|
<data name="LyricsPageTranslationProviderPrefix.Header" xml:space="preserve">
|
||||||
<value>Translation provider</value>
|
<value>Translation provider</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="LyricsSearchControlArtist.Header" xml:space="preserve">
|
||||||
|
<value>Artist</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlHelp.Text" xml:space="preserve">
|
||||||
|
<value>* Save changes take effect immediately, after which the track lyrics will be retrieved with mapping information and target lyrics; marking as pure music will directly return to pure music placeholder lyrics. Reset to retrieve by original data.</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlMappedAs.Text" xml:space="preserve">
|
||||||
|
<value>mapped as</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlMarkAsPureMusic.Content" xml:space="preserve">
|
||||||
|
<value>Mark as pure music</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlNotFound.Text" xml:space="preserve">
|
||||||
|
<value>Not found</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlReset.Content" xml:space="preserve">
|
||||||
|
<value>Reset</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlSaveChanges.Content" xml:space="preserve">
|
||||||
|
<value>Save changes</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlSearch.Content" xml:space="preserve">
|
||||||
|
<value>Search</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlSongInfoMapping.Header" xml:space="preserve">
|
||||||
|
<value>Song info mapping</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlTargetSearchProvider.Header" xml:space="preserve">
|
||||||
|
<value>Target lyrics search provider</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlTitle.Header" xml:space="preserve">
|
||||||
|
<value>Title</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchPageTitle" xml:space="preserve">
|
||||||
|
<value>Lyrics search - BetterLyrics</value>
|
||||||
|
</data>
|
||||||
<data name="LyricsSearchProviderEslrcFile" xml:space="preserve">
|
<data name="LyricsSearchProviderEslrcFile" xml:space="preserve">
|
||||||
<value>Local .ESLRC files</value>
|
<value>Local .ESLRC files</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -406,6 +442,15 @@ If you encounter any problems, please go to the Settings page, About tab, and vi
|
|||||||
<data name="MusicGalleryPageTitle" xml:space="preserve">
|
<data name="MusicGalleryPageTitle" xml:space="preserve">
|
||||||
<value>Music gallery - BetterLyrics</value>
|
<value>Music gallery - BetterLyrics</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SetingsPageDonation.Text" xml:space="preserve">
|
||||||
|
<value>Donation</value>
|
||||||
|
</data>
|
||||||
|
<data name="SetingsPageFeedback.Text" xml:space="preserve">
|
||||||
|
<value>Feedback</value>
|
||||||
|
</data>
|
||||||
|
<data name="SetingsPageThanks.Text" xml:space="preserve">
|
||||||
|
<value>If you like this project, please consider supporting it by donating. Your support will help keep the project alive and encourage further development.</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageAbout.Content" xml:space="preserve">
|
<data name="SettingsPageAbout.Content" xml:space="preserve">
|
||||||
<value>About</value>
|
<value>About</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -442,6 +487,9 @@ If you encounter any problems, please go to the Settings page, About tab, and vi
|
|||||||
<data name="SettingsPageAmount.Header" xml:space="preserve">
|
<data name="SettingsPageAmount.Header" xml:space="preserve">
|
||||||
<value>Amount</value>
|
<value>Amount</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageAOT.Header" xml:space="preserve">
|
||||||
|
<value>Always on top</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageApp.Content" xml:space="preserve">
|
<data name="SettingsPageApp.Content" xml:space="preserve">
|
||||||
<value>App appearance and behavior</value>
|
<value>App appearance and behavior</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -451,17 +499,8 @@ If you encounter any problems, please go to the Settings page, About tab, and vi
|
|||||||
<data name="SettingsPageAppBehavior.Text" xml:space="preserve">
|
<data name="SettingsPageAppBehavior.Text" xml:space="preserve">
|
||||||
<value>App behavior</value>
|
<value>App behavior</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageAppDesktop.Text" xml:space="preserve">
|
<data name="SettingsPageApply.Content" xml:space="preserve">
|
||||||
<value>Desktop mode</value>
|
<value>Apply</value>
|
||||||
</data>
|
|
||||||
<data name="SettingsPageAppDock.Text" xml:space="preserve">
|
|
||||||
<value>Dock mode</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageAppPictureInPicture.Text" xml:space="preserve">
|
|
||||||
<value>Picture-in-picture mode</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageAppStandard.Text" xml:space="preserve">
|
|
||||||
<value>Standard</value>
|
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageAutoLock.Header" xml:space="preserve">
|
<data name="SettingsPageAutoLock.Header" xml:space="preserve">
|
||||||
<value>Auto-lock when activating desktop mode</value>
|
<value>Auto-lock when activating desktop mode</value>
|
||||||
@@ -478,6 +517,9 @@ If you encounter any problems, please go to the Settings page, About tab, and vi
|
|||||||
<data name="SettingsPageAutoStartInAppLyrics.Content" xml:space="preserve">
|
<data name="SettingsPageAutoStartInAppLyrics.Content" xml:space="preserve">
|
||||||
<value>Activate standard mode</value>
|
<value>Activate standard mode</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageAutoStartPIPLyrics.Content" xml:space="preserve">
|
||||||
|
<value>Start Picture-in-Picture Mode</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageAutoStartWindow.Header" xml:space="preserve">
|
<data name="SettingsPageAutoStartWindow.Header" xml:space="preserve">
|
||||||
<value>When starting the app</value>
|
<value>When starting the app</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -485,7 +527,7 @@ If you encounter any problems, please go to the Settings page, About tab, and vi
|
|||||||
<value>Lyrics backdrop</value>
|
<value>Lyrics backdrop</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageBackgroundAcrylicEffectAmount.Header" xml:space="preserve">
|
<data name="SettingsPageBackgroundAcrylicEffectAmount.Header" xml:space="preserve">
|
||||||
<value>Album Background Acrylic Effect Strength!</value>
|
<value>Album Background Acrylic Effect Strength</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageBackgroundOverlay.Content" xml:space="preserve">
|
<data name="SettingsPageBackgroundOverlay.Content" xml:space="preserve">
|
||||||
<value>Lyrics background</value>
|
<value>Lyrics background</value>
|
||||||
@@ -496,22 +538,37 @@ If you encounter any problems, please go to the Settings page, About tab, and vi
|
|||||||
<data name="SettingsPageCache.Header" xml:space="preserve">
|
<data name="SettingsPageCache.Header" xml:space="preserve">
|
||||||
<value>Cache</value>
|
<value>Cache</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageChinese.Header" xml:space="preserve">
|
||||||
|
<value>Chinese pronunciation</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageChinesePreference.Header" xml:space="preserve">
|
||||||
|
<value>Convert Chinese to Traditional Chinese</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageCompactTitleBar.Content" xml:space="preserve">
|
<data name="SettingsPageCompactTitleBar.Content" xml:space="preserve">
|
||||||
<value>Compact</value>
|
<value>Compact</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageCurrentLyricsWindowStatus.Text" xml:space="preserve">
|
||||||
|
<value>Current lyrics window status</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageDark.Content" xml:space="preserve">
|
<data name="SettingsPageDark.Content" xml:space="preserve">
|
||||||
<value>Dark</value>
|
<value>Dark</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageDebugOverlay.Header" xml:space="preserve">
|
<data name="SettingsPageDebugOverlay.Header" xml:space="preserve">
|
||||||
<value>Show debug overlay</value>
|
<value>Show debug overlay</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageDelete.Content" xml:space="preserve">
|
||||||
|
<value>Delete</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageDesktopAcrylic.Content" xml:space="preserve">
|
<data name="SettingsPageDesktopAcrylic.Content" xml:space="preserve">
|
||||||
<value>Desktop Acrylic</value>
|
<value>Desktop Acrylic</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageDev.Content" xml:space="preserve">
|
<data name="SettingsPageDev.Content" xml:space="preserve">
|
||||||
<value>Advanced options</value>
|
<value>Advanced options</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageDiscord.Header" xml:space="preserve">
|
<data name="SettingsPageDisclaimer.Text" xml:space="preserve">
|
||||||
|
<value>This project is provided as is without warranty of any kind. All lyrics, fonts, icons, and other third-party resources are the property of their respective copyright holders. The author of this project does not claim ownership of such resources. This project is non-commercial and should not be used to infringe any rights. Users are responsible for ensuring their own use complies with applicable laws and licenses.</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageDiscord.Content" xml:space="preserve">
|
||||||
<value>Discord</value>
|
<value>Discord</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageDisplayTypeSwitcher.Header" xml:space="preserve">
|
<data name="SettingsPageDisplayTypeSwitcher.Header" xml:space="preserve">
|
||||||
@@ -532,6 +589,9 @@ If you encounter any problems, please go to the Settings page, About tab, and vi
|
|||||||
<data name="SettingsPageDockWindowHeight.Header" xml:space="preserve">
|
<data name="SettingsPageDockWindowHeight.Header" xml:space="preserve">
|
||||||
<value>Window height</value>
|
<value>Window height</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageDynamicLyricsFontSize.Header" xml:space="preserve">
|
||||||
|
<value>Automatic adjustment</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageEasingFuncType.Header" xml:space="preserve">
|
<data name="SettingsPageEasingFuncType.Header" xml:space="preserve">
|
||||||
<value>Easing animation type</value>
|
<value>Easing animation type</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -586,7 +646,7 @@ If you encounter any problems, please go to the Settings page, About tab, and vi
|
|||||||
<data name="SettingsPageFan.Header" xml:space="preserve">
|
<data name="SettingsPageFan.Header" xml:space="preserve">
|
||||||
<value>Fan lyrics</value>
|
<value>Fan lyrics</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageFAQ.Header" xml:space="preserve">
|
<data name="SettingsPageFAQ.Content" xml:space="preserve">
|
||||||
<value>Frequently asked questions</value>
|
<value>Frequently asked questions</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageFixedTimeStep.Header" xml:space="preserve">
|
<data name="SettingsPageFixedTimeStep.Header" xml:space="preserve">
|
||||||
@@ -598,15 +658,6 @@ If you encounter any problems, please go to the Settings page, About tab, and vi
|
|||||||
<data name="SettingsPageFPS.Header" xml:space="preserve">
|
<data name="SettingsPageFPS.Header" xml:space="preserve">
|
||||||
<value>Rendering frame rate</value>
|
<value>Rendering frame rate</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageGitHub.ActionIconToolTip" xml:space="preserve">
|
|
||||||
<value>Open in new window</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageGitHub.Description" xml:space="preserve">
|
|
||||||
<value>See source code on GitHub</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageGitHub.Header" xml:space="preserve">
|
|
||||||
<value>This is an open source app</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageGlobalDrag.Description" xml:space="preserve">
|
<data name="SettingsPageGlobalDrag.Description" xml:space="preserve">
|
||||||
<value>Extend the title bar to the entire page so that the window can be dragged in any non-interactive area</value>
|
<value>Extend the title bar to the entire page so that the window can be dragged in any non-interactive area</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -614,10 +665,10 @@ If you encounter any problems, please go to the Settings page, About tab, and vi
|
|||||||
<value>Global drag</value>
|
<value>Global drag</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageHideWindow.Description" xml:space="preserve">
|
<data name="SettingsPageHideWindow.Description" xml:space="preserve">
|
||||||
<value>Automatically hide the window when no songs are playing in dock mode or desktop mode</value>
|
<value>In docking mode or desktop mode, when no song is playing, the window will be automatically hidden; otherwise, the window will be automatically displayed.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageHideWindow.Header" xml:space="preserve">
|
<data name="SettingsPageHideWindow.Header" xml:space="preserve">
|
||||||
<value>Auto-hide window</value>
|
<value>Automatically hide/show windows</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageIgnoreFullscreenWindow.Description" xml:space="preserve">
|
<data name="SettingsPageIgnoreFullscreenWindow.Description" xml:space="preserve">
|
||||||
<value>Force this app to appear on top of full-screen apps when docked or desktop mode is enabled</value>
|
<value>Force this app to appear on top of full-screen apps when docked or desktop mode is enabled</value>
|
||||||
@@ -634,9 +685,15 @@ If you encounter any problems, please go to the Settings page, About tab, and vi
|
|||||||
<data name="SettingsPageJA.Content" xml:space="preserve">
|
<data name="SettingsPageJA.Content" xml:space="preserve">
|
||||||
<value>日本語</value>
|
<value>日本語</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageJapanese.Header" xml:space="preserve">
|
||||||
|
<value>Japanese annotation</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageJoinNowButton.Content" xml:space="preserve">
|
<data name="SettingsPageJoinNowButton.Content" xml:space="preserve">
|
||||||
<value>Join now</value>
|
<value>Join now</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageJyutping.Content" xml:space="preserve">
|
||||||
|
<value>Cantonese pinyin</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageKO.Content" xml:space="preserve">
|
<data name="SettingsPageKO.Content" xml:space="preserve">
|
||||||
<value>한국어</value>
|
<value>한국어</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -695,13 +752,13 @@ If you encounter any problems, please go to the Settings page, About tab, and vi
|
|||||||
<value>Lyrics background</value>
|
<value>Lyrics background</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsBackgroundBlurAmount.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsBackgroundBlurAmount.Header" xml:space="preserve">
|
||||||
<value>Album background layer ambiguity!</value>
|
<value>Album background layer ambiguity</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsBackgroundOpacity.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsBackgroundOpacity.Header" xml:space="preserve">
|
||||||
<value>Album background layer opacity!</value>
|
<value>Album background layer opacity</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsBackgroundSpeed.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsBackgroundSpeed.Header" xml:space="preserve">
|
||||||
<value>Album Background Layer Motion Rate!</value>
|
<value>Album Background Layer Motion Rate</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsBgFontColor.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsBgFontColor.Header" xml:space="preserve">
|
||||||
<value>Font color (Non-current playback area)</value>
|
<value>Font color (Non-current playback area)</value>
|
||||||
@@ -779,7 +836,7 @@ If you encounter any problems, please go to the Settings page, About tab, and vi
|
|||||||
<value>Glow effect</value>
|
<value>Glow effect</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsHighlightScope.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsHighlightScope.Header" xml:space="preserve">
|
||||||
<value>Highlight scope</value>
|
<value>Original highlight range</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsLeft.Content" xml:space="preserve">
|
<data name="SettingsPageLyricsLeft.Content" xml:space="preserve">
|
||||||
<value>Left</value>
|
<value>Left</value>
|
||||||
@@ -838,18 +895,27 @@ If you encounter any problems, please go to the Settings page, About tab, and vi
|
|||||||
<data name="SettingsPageLyricsThin.Content" xml:space="preserve">
|
<data name="SettingsPageLyricsThin.Content" xml:space="preserve">
|
||||||
<value>Thin</value>
|
<value>Thin</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageLyricsTimeline.Header" xml:space="preserve">
|
||||||
|
<value>Lyrics timeline sync</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageLyricsTimelineThreshold.Description" xml:space="preserve">
|
<data name="SettingsPageLyricsTimelineThreshold.Description" xml:space="preserve">
|
||||||
<value>If the lyrics progress is jittery, try increasing this threshold; changing this value can cause lyrics synchronization to deviate</value>
|
<value>If the lyrics progress is jittery, try increasing this threshold; changing this value can cause lyrics synchronization to deviate</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsTimelineThreshold.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsTimelineThreshold.Header" xml:space="preserve">
|
||||||
<value>Lyrics timeline sync threshold</value>
|
<value>Lyrics timeline sync threshold</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageLyricsTranslationHighlight.Header" xml:space="preserve">
|
||||||
|
<value>Translation Highlight</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageLyricsTranslationSeparator.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsTranslationSeparator.Header" xml:space="preserve">
|
||||||
<value>Source and translation separator</value>
|
<value>Source and translation separator</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsVerticalEdgeOpacity.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsVerticalEdgeOpacity.Header" xml:space="preserve">
|
||||||
<value>Top and bottom edge opacity</value>
|
<value>Top and bottom edge opacity</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageLyricsWindowManager.Header" xml:space="preserve">
|
||||||
|
<value>Lyrics window manager</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageMediaLib.Content" xml:space="preserve">
|
<data name="SettingsPageMediaLib.Content" xml:space="preserve">
|
||||||
<value>Media library</value>
|
<value>Media library</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -895,6 +961,9 @@ If you encounter any problems, please go to the Settings page, About tab, and vi
|
|||||||
<data name="SettingsPagePathNotFound.Text" xml:space="preserve">
|
<data name="SettingsPagePathNotFound.Text" xml:space="preserve">
|
||||||
<value>The path cannot be found on your computer</value>
|
<value>The path cannot be found on your computer</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPagePinyin.Content" xml:space="preserve">
|
||||||
|
<value>Pinyin of Mandarin</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPagePlaybackLib.Content" xml:space="preserve">
|
<data name="SettingsPagePlaybackLib.Content" xml:space="preserve">
|
||||||
<value>Playback sources</value>
|
<value>Playback sources</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -913,9 +982,15 @@ If you encounter any problems, please go to the Settings page, About tab, and vi
|
|||||||
<data name="SettingsPagePreviousSongHotKey.Header" xml:space="preserve">
|
<data name="SettingsPagePreviousSongHotKey.Header" xml:space="preserve">
|
||||||
<value>Shortcut keys for the previous track</value>
|
<value>Shortcut keys for the previous track</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageQQGroup.Header" xml:space="preserve">
|
<data name="SettingsPageQQGroup.Content" xml:space="preserve">
|
||||||
<value>QQ feedback & chat group</value>
|
<value>QQ feedback & chat group</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageRecord.Content" xml:space="preserve">
|
||||||
|
<value>Record</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageRecordedWindowStatus.Text" xml:space="preserve">
|
||||||
|
<value>Recorded window status</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageRemoveInfo.Message" xml:space="preserve">
|
<data name="SettingsPageRemoveInfo.Message" xml:space="preserve">
|
||||||
<value>Original files and folders in this path will not be deleted when removing it from this app</value>
|
<value>Original files and folders in this path will not be deleted when removing it from this app</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -928,23 +1003,32 @@ If you encounter any problems, please go to the Settings page, About tab, and vi
|
|||||||
<data name="SettingsPageRestart.Content" xml:space="preserve">
|
<data name="SettingsPageRestart.Content" xml:space="preserve">
|
||||||
<value>Restart app to apply change</value>
|
<value>Restart app to apply change</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageRomaji.Header" xml:space="preserve">
|
||||||
|
<value>Japanese annotation</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageSC.Content" xml:space="preserve">
|
<data name="SettingsPageSC.Content" xml:space="preserve">
|
||||||
<value>简体中文</value>
|
<value>简体中文</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageScope.Header" xml:space="preserve">
|
<data name="SettingsPageScope.Header" xml:space="preserve">
|
||||||
<value>Scope</value>
|
<value>Scope</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageScrollBottomDelay.Header" xml:space="preserve">
|
||||||
|
<value>Tail line delay</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageScrollBottomDuration.Header" xml:space="preserve">
|
<data name="SettingsPageScrollBottomDuration.Header" xml:space="preserve">
|
||||||
<value>Lyrics scrolling animation duration (Last line)</value>
|
<value>Final line duration</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageScrollDuration.Header" xml:space="preserve">
|
<data name="SettingsPageScrollDuration.Header" xml:space="preserve">
|
||||||
<value>Lyrics scrolling animation duration (Current line)</value>
|
<value>Current line duration</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageScrollEasing.Header" xml:space="preserve">
|
<data name="SettingsPageScrollEasing.Header" xml:space="preserve">
|
||||||
<value>Lyrics scrolling animation type</value>
|
<value>Lyrics scrolling animation type</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageScrollTopDelay.Header" xml:space="preserve">
|
||||||
|
<value>First line delay</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageScrollTopDuration.Header" xml:space="preserve">
|
<data name="SettingsPageScrollTopDuration.Header" xml:space="preserve">
|
||||||
<value>Lyrics scrolling animation duration (First line)</value>
|
<value>The duration of the first line</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageServerTestButton.Content" xml:space="preserve">
|
<data name="SettingsPageServerTestButton.Content" xml:space="preserve">
|
||||||
<value>Test server</value>
|
<value>Test server</value>
|
||||||
@@ -958,6 +1042,15 @@ If you encounter any problems, please go to the Settings page, About tab, and vi
|
|||||||
<data name="SettingsPageSettingsManager.Header" xml:space="preserve">
|
<data name="SettingsPageSettingsManager.Header" xml:space="preserve">
|
||||||
<value>Settings manager</value>
|
<value>Settings manager</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageShortcutRegFailInfo" xml:space="preserve">
|
||||||
|
<value>This hotkey was not successfully registered</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageShortcutRegSuccessInfo" xml:space="preserve">
|
||||||
|
<value>This hotkey has been successfully registered</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageShowHideHotKey.Header" xml:space="preserve">
|
||||||
|
<value>Lyrics window display and hide shortcut keys</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageSliderPrefix.Text" xml:space="preserve">
|
<data name="SettingsPageSliderPrefix.Text" xml:space="preserve">
|
||||||
<value>Current value: </value>
|
<value>Current value: </value>
|
||||||
</data>
|
</data>
|
||||||
@@ -985,7 +1078,7 @@ If you encounter any problems, please go to the Settings page, About tab, and vi
|
|||||||
<data name="SettingsPageTC.Content" xml:space="preserve">
|
<data name="SettingsPageTC.Content" xml:space="preserve">
|
||||||
<value>繁體中文</value>
|
<value>繁體中文</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageTelegram.Header" xml:space="preserve">
|
<data name="SettingsPageTelegram.Content" xml:space="preserve">
|
||||||
<value>Telegram</value>
|
<value>Telegram</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageTheme.Header" xml:space="preserve">
|
<data name="SettingsPageTheme.Header" xml:space="preserve">
|
||||||
|
|||||||
@@ -135,8 +135,8 @@
|
|||||||
<data name="AllLyricsSettingsControlStandard.Content" xml:space="preserve">
|
<data name="AllLyricsSettingsControlStandard.Content" xml:space="preserve">
|
||||||
<value>標準モード</value>
|
<value>標準モード</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BaseWindowAOTFlyoutItem.Text" xml:space="preserve">
|
<data name="AppSettingsControlGeneral.Content" xml:space="preserve">
|
||||||
<value>常にトップ</value>
|
<value>一般的な</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BaseWindowEnterFullScreenHint" xml:space="preserve">
|
<data name="BaseWindowEnterFullScreenHint" xml:space="preserve">
|
||||||
<value>ESCを押して、フルスクリーンモードを終了します</value>
|
<value>ESCを押して、フルスクリーンモードを終了します</value>
|
||||||
@@ -150,9 +150,6 @@
|
|||||||
<data name="BaseWindowMiniFlyoutItem.Text" xml:space="preserve">
|
<data name="BaseWindowMiniFlyoutItem.Text" xml:space="preserve">
|
||||||
<value>ピクチャーインピクチャーモード</value>
|
<value>ピクチャーインピクチャーモード</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BaseWindowUnMiniFlyoutItem.Text" xml:space="preserve">
|
|
||||||
<value>ピクチャーインピクチャーモードを終了します</value>
|
|
||||||
</data>
|
|
||||||
<data name="Cancel" xml:space="preserve">
|
<data name="Cancel" xml:space="preserve">
|
||||||
<value>キャンセル</value>
|
<value>キャンセル</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -199,7 +196,7 @@
|
|||||||
<value>ブラウザの承認を完了してください</value>
|
<value>ブラウザの承認を完了してください</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LastFMRequestAuthTitle" xml:space="preserve">
|
<data name="LastFMRequestAuthTitle" xml:space="preserve">
|
||||||
<value>BetterLyricsにLast.fmアカウントへのアクセスを許可してください!</value>
|
<value>BetterLyricsにLast.fmアカウントへのアクセスを許可してください</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LastFMRequestUnAuthConfirm" xml:space="preserve">
|
<data name="LastFMRequestUnAuthConfirm" xml:space="preserve">
|
||||||
<value>認可をキャンセルしました</value>
|
<value>認可をキャンセルしました</value>
|
||||||
@@ -208,7 +205,7 @@
|
|||||||
<value>ブラウザでキャンセル操作を完了してください</value>
|
<value>ブラウザでキャンセル操作を完了してください</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LastFMRequestUnAuthTitle" xml:space="preserve">
|
<data name="LastFMRequestUnAuthTitle" xml:space="preserve">
|
||||||
<value>Last.fmアカウントへのBetterLyricsアクセスを取り消します!</value>
|
<value>Last.fmアカウントへのBetterLyricsアクセスを取り消します</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LibreTranslateFailed" xml:space="preserve">
|
<data name="LibreTranslateFailed" xml:space="preserve">
|
||||||
<value>リブレットランスレートからの翻訳のリクエストが失敗しました。設定またはネイティブリブレットランレート構成を確認してください</value>
|
<value>リブレットランスレートからの翻訳のリクエストが失敗しました。設定またはネイティブリブレットランレート構成を確認してください</value>
|
||||||
@@ -222,6 +219,9 @@
|
|||||||
<data name="LyricsPageLyricsProviderPrefix.Header" xml:space="preserve">
|
<data name="LyricsPageLyricsProviderPrefix.Header" xml:space="preserve">
|
||||||
<value>歌詞プロバイダー</value>
|
<value>歌詞プロバイダー</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="LyricsPageLyricsSearchButtonToolTip.Content" xml:space="preserve">
|
||||||
|
<value>手動で歌詞を検索します</value>
|
||||||
|
</data>
|
||||||
<data name="LyricsPageLyricsSettingsButtonToolTip.Content" xml:space="preserve">
|
<data name="LyricsPageLyricsSettingsButtonToolTip.Content" xml:space="preserve">
|
||||||
<value>歌詞スタイルと効果クイック設定</value>
|
<value>歌詞スタイルと効果クイック設定</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -252,6 +252,42 @@
|
|||||||
<data name="LyricsPageTranslationProviderPrefix.Header" xml:space="preserve">
|
<data name="LyricsPageTranslationProviderPrefix.Header" xml:space="preserve">
|
||||||
<value>翻訳プロバイダー</value>
|
<value>翻訳プロバイダー</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="LyricsSearchControlArtist.Header" xml:space="preserve">
|
||||||
|
<value>アーティスト</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlHelp.Text" xml:space="preserve">
|
||||||
|
<value>*保存変更はすぐに有効になります。その後、トラックの歌詞がマッピング情報とターゲット歌詞で取得されます。純粋な音楽としてのマーキングは、純粋な音楽プレースホルダーの歌詞に直接戻ります。元のデータで取得するためにリセット。</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlMappedAs.Text" xml:space="preserve">
|
||||||
|
<value>としてマッピングされました</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlMarkAsPureMusic.Content" xml:space="preserve">
|
||||||
|
<value>純粋な音楽としてマークしてください</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlNotFound.Text" xml:space="preserve">
|
||||||
|
<value>見つかりませんでした</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlReset.Content" xml:space="preserve">
|
||||||
|
<value>リセット</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlSaveChanges.Content" xml:space="preserve">
|
||||||
|
<value>変更を保存</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlSearch.Content" xml:space="preserve">
|
||||||
|
<value>検索する</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlSongInfoMapping.Header" xml:space="preserve">
|
||||||
|
<value>曲情報マッピング</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlTargetSearchProvider.Header" xml:space="preserve">
|
||||||
|
<value>ターゲット歌詞検索プロバイダー</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlTitle.Header" xml:space="preserve">
|
||||||
|
<value>タイトル</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchPageTitle" xml:space="preserve">
|
||||||
|
<value>歌詞検索 - BetterLyrics</value>
|
||||||
|
</data>
|
||||||
<data name="LyricsSearchProviderEslrcFile" xml:space="preserve">
|
<data name="LyricsSearchProviderEslrcFile" xml:space="preserve">
|
||||||
<value>ローカル.ESLRCファイル</value>
|
<value>ローカル.ESLRCファイル</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -406,6 +442,15 @@
|
|||||||
<data name="MusicGalleryPageTitle" xml:space="preserve">
|
<data name="MusicGalleryPageTitle" xml:space="preserve">
|
||||||
<value>音楽ギャラリー - BetterLyrics</value>
|
<value>音楽ギャラリー - BetterLyrics</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SetingsPageDonation.Text" xml:space="preserve">
|
||||||
|
<value>寄付</value>
|
||||||
|
</data>
|
||||||
|
<data name="SetingsPageFeedback.Text" xml:space="preserve">
|
||||||
|
<value>フィードバック</value>
|
||||||
|
</data>
|
||||||
|
<data name="SetingsPageThanks.Text" xml:space="preserve">
|
||||||
|
<value>このプロジェクトが気に入っている場合は、寄付してサポートすることを検討してください。あなたのサポートは、プロジェクトを生かし続け、さらなる開発を促進するのに役立ちます。</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageAbout.Content" xml:space="preserve">
|
<data name="SettingsPageAbout.Content" xml:space="preserve">
|
||||||
<value>について</value>
|
<value>について</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -442,6 +487,9 @@
|
|||||||
<data name="SettingsPageAmount.Header" xml:space="preserve">
|
<data name="SettingsPageAmount.Header" xml:space="preserve">
|
||||||
<value>量</value>
|
<value>量</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageAOT.Header" xml:space="preserve">
|
||||||
|
<value>常にトップ</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageApp.Content" xml:space="preserve">
|
<data name="SettingsPageApp.Content" xml:space="preserve">
|
||||||
<value>アプリの外観と動作</value>
|
<value>アプリの外観と動作</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -451,17 +499,8 @@
|
|||||||
<data name="SettingsPageAppBehavior.Text" xml:space="preserve">
|
<data name="SettingsPageAppBehavior.Text" xml:space="preserve">
|
||||||
<value>アプリの動作</value>
|
<value>アプリの動作</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageAppDesktop.Text" xml:space="preserve">
|
<data name="SettingsPageApply.Content" xml:space="preserve">
|
||||||
<value>デスクトップモード</value>
|
<value>適用する</value>
|
||||||
</data>
|
|
||||||
<data name="SettingsPageAppDock.Text" xml:space="preserve">
|
|
||||||
<value>ドックモード</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageAppPictureInPicture.Text" xml:space="preserve">
|
|
||||||
<value>ピクチャーインピクチャーモード</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageAppStandard.Text" xml:space="preserve">
|
|
||||||
<value>標準モード</value>
|
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageAutoLock.Header" xml:space="preserve">
|
<data name="SettingsPageAutoLock.Header" xml:space="preserve">
|
||||||
<value>デスクトップモードをアクティブにするときの自動ロック</value>
|
<value>デスクトップモードをアクティブにするときの自動ロック</value>
|
||||||
@@ -478,6 +517,9 @@
|
|||||||
<data name="SettingsPageAutoStartInAppLyrics.Content" xml:space="preserve">
|
<data name="SettingsPageAutoStartInAppLyrics.Content" xml:space="preserve">
|
||||||
<value>標準モードをアクティブにします</value>
|
<value>標準モードをアクティブにします</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageAutoStartPIPLyrics.Content" xml:space="preserve">
|
||||||
|
<value>ピクチャーインピクチャーモードを開始します</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageAutoStartWindow.Header" xml:space="preserve">
|
<data name="SettingsPageAutoStartWindow.Header" xml:space="preserve">
|
||||||
<value>アプリを起動するとき</value>
|
<value>アプリを起動するとき</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -485,7 +527,7 @@
|
|||||||
<value>歌詞の背景素材</value>
|
<value>歌詞の背景素材</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageBackgroundAcrylicEffectAmount.Header" xml:space="preserve">
|
<data name="SettingsPageBackgroundAcrylicEffectAmount.Header" xml:space="preserve">
|
||||||
<value>アルバムの背景アクリル効果の強さ!</value>
|
<value>アルバムの背景アクリル効果の強さ</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageBackgroundOverlay.Content" xml:space="preserve">
|
<data name="SettingsPageBackgroundOverlay.Content" xml:space="preserve">
|
||||||
<value>歌詞の背景</value>
|
<value>歌詞の背景</value>
|
||||||
@@ -496,22 +538,37 @@
|
|||||||
<data name="SettingsPageCache.Header" xml:space="preserve">
|
<data name="SettingsPageCache.Header" xml:space="preserve">
|
||||||
<value>キャッシュ</value>
|
<value>キャッシュ</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageChinese.Header" xml:space="preserve">
|
||||||
|
<value>中国の発音</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageChinesePreference.Header" xml:space="preserve">
|
||||||
|
<value>中国人を伝統的な中国人に変換します</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageCompactTitleBar.Content" xml:space="preserve">
|
<data name="SettingsPageCompactTitleBar.Content" xml:space="preserve">
|
||||||
<value>コンパクト</value>
|
<value>コンパクト</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageCurrentLyricsWindowStatus.Text" xml:space="preserve">
|
||||||
|
<value>現在の歌詞ウィンドウステータス</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageDark.Content" xml:space="preserve">
|
<data name="SettingsPageDark.Content" xml:space="preserve">
|
||||||
<value>暗い</value>
|
<value>暗い</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageDebugOverlay.Header" xml:space="preserve">
|
<data name="SettingsPageDebugOverlay.Header" xml:space="preserve">
|
||||||
<value>デバッグオーバーレイを表示します</value>
|
<value>デバッグオーバーレイを表示します</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageDelete.Content" xml:space="preserve">
|
||||||
|
<value>消去</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageDesktopAcrylic.Content" xml:space="preserve">
|
<data name="SettingsPageDesktopAcrylic.Content" xml:space="preserve">
|
||||||
<value>デスクトップアクリル</value>
|
<value>デスクトップアクリル</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageDev.Content" xml:space="preserve">
|
<data name="SettingsPageDev.Content" xml:space="preserve">
|
||||||
<value>高度なオプション</value>
|
<value>高度なオプション</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageDiscord.Header" xml:space="preserve">
|
<data name="SettingsPageDisclaimer.Text" xml:space="preserve">
|
||||||
|
<value>このプロジェクトは、いかなる種類の保証もなく現状のまま提供されています。すべての歌詞、フォント、アイコン、およびその他のサードパーティのリソースは、それぞれの著作権所有者の財産です。このプロジェクトの作成者は、そのようなリソースの所有権を主張していません。このプロジェクトは非営利的であり、いかなる権利も侵害するために使用すべきではありません。ユーザーは、自らの使用が適用される法律およびライセンスに準拠していることを確認する責任があります。</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageDiscord.Content" xml:space="preserve">
|
||||||
<value>Discord</value>
|
<value>Discord</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageDisplayTypeSwitcher.Header" xml:space="preserve">
|
<data name="SettingsPageDisplayTypeSwitcher.Header" xml:space="preserve">
|
||||||
@@ -532,6 +589,9 @@
|
|||||||
<data name="SettingsPageDockWindowHeight.Header" xml:space="preserve">
|
<data name="SettingsPageDockWindowHeight.Header" xml:space="preserve">
|
||||||
<value>窓の高さ</value>
|
<value>窓の高さ</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageDynamicLyricsFontSize.Header" xml:space="preserve">
|
||||||
|
<value>自動調整</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageEasingFuncType.Header" xml:space="preserve">
|
<data name="SettingsPageEasingFuncType.Header" xml:space="preserve">
|
||||||
<value>アニメーションタイプを緩和します</value>
|
<value>アニメーションタイプを緩和します</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -586,7 +646,7 @@
|
|||||||
<data name="SettingsPageFan.Header" xml:space="preserve">
|
<data name="SettingsPageFan.Header" xml:space="preserve">
|
||||||
<value>ファンの歌詞</value>
|
<value>ファンの歌詞</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageFAQ.Header" xml:space="preserve">
|
<data name="SettingsPageFAQ.Content" xml:space="preserve">
|
||||||
<value>よくある質問</value>
|
<value>よくある質問</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageFixedTimeStep.Header" xml:space="preserve">
|
<data name="SettingsPageFixedTimeStep.Header" xml:space="preserve">
|
||||||
@@ -598,15 +658,6 @@
|
|||||||
<data name="SettingsPageFPS.Header" xml:space="preserve">
|
<data name="SettingsPageFPS.Header" xml:space="preserve">
|
||||||
<value>レンダリングフレームレート</value>
|
<value>レンダリングフレームレート</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageGitHub.ActionIconToolTip" xml:space="preserve">
|
|
||||||
<value>新しいウィンドウで開きます</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageGitHub.Description" xml:space="preserve">
|
|
||||||
<value>GitHubのソースコードを参照してください</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageGitHub.Header" xml:space="preserve">
|
|
||||||
<value>これはオープンソースアプリです</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageGlobalDrag.Description" xml:space="preserve">
|
<data name="SettingsPageGlobalDrag.Description" xml:space="preserve">
|
||||||
<value>タイトルバーをページ全体に拡張して、ウィンドウを非対話領域でドラッグできるようにします</value>
|
<value>タイトルバーをページ全体に拡張して、ウィンドウを非対話領域でドラッグできるようにします</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -614,10 +665,10 @@
|
|||||||
<value>グローバルドラッグ</value>
|
<value>グローバルドラッグ</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageHideWindow.Description" xml:space="preserve">
|
<data name="SettingsPageHideWindow.Description" xml:space="preserve">
|
||||||
<value>ドックモードやデスクトップモードで再生されている曲がないときにウィンドウを自動的に非表示にする</value>
|
<value>ドッキングモードまたはデスクトップモードでは、曲が再生されていない場合、ウィンドウは自動的に非表示になります。それ以外の場合、ウィンドウが自動的に表示されます。</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageHideWindow.Header" xml:space="preserve">
|
<data name="SettingsPageHideWindow.Header" xml:space="preserve">
|
||||||
<value>自動ハイドウィンドウ</value>
|
<value>Windowsを自動的に非表示/表示します</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageIgnoreFullscreenWindow.Description" xml:space="preserve">
|
<data name="SettingsPageIgnoreFullscreenWindow.Description" xml:space="preserve">
|
||||||
<value>このアプリは、ドッキングまたはデスクトップモードが有効になっているときにフルスクリーンアプリの上に表示されます</value>
|
<value>このアプリは、ドッキングまたはデスクトップモードが有効になっているときにフルスクリーンアプリの上に表示されます</value>
|
||||||
@@ -634,9 +685,15 @@
|
|||||||
<data name="SettingsPageJA.Content" xml:space="preserve">
|
<data name="SettingsPageJA.Content" xml:space="preserve">
|
||||||
<value>日本語</value>
|
<value>日本語</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageJapanese.Header" xml:space="preserve">
|
||||||
|
<value>日本の注釈</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageJoinNowButton.Content" xml:space="preserve">
|
<data name="SettingsPageJoinNowButton.Content" xml:space="preserve">
|
||||||
<value>今すぐ参加してください</value>
|
<value>今すぐ参加してください</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageJyutping.Content" xml:space="preserve">
|
||||||
|
<value>広東語のピンイン</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageKO.Content" xml:space="preserve">
|
<data name="SettingsPageKO.Content" xml:space="preserve">
|
||||||
<value>한국어</value>
|
<value>한국어</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -695,13 +752,13 @@
|
|||||||
<value>歌詞の背景</value>
|
<value>歌詞の背景</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsBackgroundBlurAmount.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsBackgroundBlurAmount.Header" xml:space="preserve">
|
||||||
<value>アルバムの背景レイヤーの曖昧さ!</value>
|
<value>アルバムの背景レイヤーの曖昧さ</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsBackgroundOpacity.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsBackgroundOpacity.Header" xml:space="preserve">
|
||||||
<value>アルバムの背景レイヤーの不透明度!</value>
|
<value>アルバムの背景レイヤーの不透明度</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsBackgroundSpeed.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsBackgroundSpeed.Header" xml:space="preserve">
|
||||||
<value>アルバムの背景レイヤーのモーションレート!</value>
|
<value>アルバムの背景レイヤーのモーションレート</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsBgFontColor.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsBgFontColor.Header" xml:space="preserve">
|
||||||
<value>フォントカラー(非電流再生エリア)</value>
|
<value>フォントカラー(非電流再生エリア)</value>
|
||||||
@@ -779,7 +836,7 @@
|
|||||||
<value>グロー効果</value>
|
<value>グロー効果</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsHighlightScope.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsHighlightScope.Header" xml:space="preserve">
|
||||||
<value>ハイライトスコープ</value>
|
<value>オリジナルのハイライト範囲</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsLeft.Content" xml:space="preserve">
|
<data name="SettingsPageLyricsLeft.Content" xml:space="preserve">
|
||||||
<value>左</value>
|
<value>左</value>
|
||||||
@@ -838,18 +895,27 @@
|
|||||||
<data name="SettingsPageLyricsThin.Content" xml:space="preserve">
|
<data name="SettingsPageLyricsThin.Content" xml:space="preserve">
|
||||||
<value>薄い</value>
|
<value>薄い</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageLyricsTimeline.Header" xml:space="preserve">
|
||||||
|
<value>歌詞のタイムラインを同期</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageLyricsTimelineThreshold.Description" xml:space="preserve">
|
<data name="SettingsPageLyricsTimelineThreshold.Description" xml:space="preserve">
|
||||||
<value>歌詞の進行が不安定な場合は、このしきい値を増やしてみてください。この値を変更すると、歌詞の同期が逸脱する可能性があります</value>
|
<value>歌詞の進行が不安定な場合は、このしきい値を増やしてみてください。この値を変更すると、歌詞の同期が逸脱する可能性があります</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsTimelineThreshold.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsTimelineThreshold.Header" xml:space="preserve">
|
||||||
<value>歌詞タイムライン同期しきい値</value>
|
<value>歌詞タイムライン同期しきい値</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageLyricsTranslationHighlight.Header" xml:space="preserve">
|
||||||
|
<value>翻訳ハイライト</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageLyricsTranslationSeparator.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsTranslationSeparator.Header" xml:space="preserve">
|
||||||
<value>ソースおよび翻訳セパレーター</value>
|
<value>ソースおよび翻訳セパレーター</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsVerticalEdgeOpacity.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsVerticalEdgeOpacity.Header" xml:space="preserve">
|
||||||
<value>上端と下端の不透明度</value>
|
<value>上端と下端の不透明度</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageLyricsWindowManager.Header" xml:space="preserve">
|
||||||
|
<value>歌詞ウィンドウマネージャー</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageMediaLib.Content" xml:space="preserve">
|
<data name="SettingsPageMediaLib.Content" xml:space="preserve">
|
||||||
<value>メディアライブラリ</value>
|
<value>メディアライブラリ</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -895,6 +961,9 @@
|
|||||||
<data name="SettingsPagePathNotFound.Text" xml:space="preserve">
|
<data name="SettingsPagePathNotFound.Text" xml:space="preserve">
|
||||||
<value>パスはコンピューターでは見つかりません</value>
|
<value>パスはコンピューターでは見つかりません</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPagePinyin.Content" xml:space="preserve">
|
||||||
|
<value>マンダリンのピンイン</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPagePlaybackLib.Content" xml:space="preserve">
|
<data name="SettingsPagePlaybackLib.Content" xml:space="preserve">
|
||||||
<value>再生ソース</value>
|
<value>再生ソース</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -913,9 +982,15 @@
|
|||||||
<data name="SettingsPagePreviousSongHotKey.Header" xml:space="preserve">
|
<data name="SettingsPagePreviousSongHotKey.Header" xml:space="preserve">
|
||||||
<value>前のトラックのショートカットキー</value>
|
<value>前のトラックのショートカットキー</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageQQGroup.Header" xml:space="preserve">
|
<data name="SettingsPageQQGroup.Content" xml:space="preserve">
|
||||||
<value>QQフィードバック&チャットグループ</value>
|
<value>QQフィードバック&チャットグループ</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageRecord.Content" xml:space="preserve">
|
||||||
|
<value>記録</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageRecordedWindowStatus.Text" xml:space="preserve">
|
||||||
|
<value>記録されたウィンドウステータス</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageRemoveInfo.Message" xml:space="preserve">
|
<data name="SettingsPageRemoveInfo.Message" xml:space="preserve">
|
||||||
<value>このパスの元のファイルとフォルダーは、このアプリから削除するときに削除されません</value>
|
<value>このパスの元のファイルとフォルダーは、このアプリから削除するときに削除されません</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -928,23 +1003,32 @@
|
|||||||
<data name="SettingsPageRestart.Content" xml:space="preserve">
|
<data name="SettingsPageRestart.Content" xml:space="preserve">
|
||||||
<value>変更を適用するためのアプリを再起動します</value>
|
<value>変更を適用するためのアプリを再起動します</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageRomaji.Header" xml:space="preserve">
|
||||||
|
<value>日本の注釈</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageSC.Content" xml:space="preserve">
|
<data name="SettingsPageSC.Content" xml:space="preserve">
|
||||||
<value>简体中文</value>
|
<value>简体中文</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageScope.Header" xml:space="preserve">
|
<data name="SettingsPageScope.Header" xml:space="preserve">
|
||||||
<value>範囲</value>
|
<value>範囲</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageScrollBottomDelay.Header" xml:space="preserve">
|
||||||
|
<value>テールラインの遅延</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageScrollBottomDuration.Header" xml:space="preserve">
|
<data name="SettingsPageScrollBottomDuration.Header" xml:space="preserve">
|
||||||
<value>歌詞スクロールアニメーション期間(最終行)</value>
|
<value>最終ライン期間</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageScrollDuration.Header" xml:space="preserve">
|
<data name="SettingsPageScrollDuration.Header" xml:space="preserve">
|
||||||
<value>歌詞スクロールアニメーション期間(現在の行)</value>
|
<value>現在のライン期間</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageScrollEasing.Header" xml:space="preserve">
|
<data name="SettingsPageScrollEasing.Header" xml:space="preserve">
|
||||||
<value>歌詞スクロールアニメーションタイプ</value>
|
<value>歌詞スクロールアニメーションタイプ</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageScrollTopDelay.Header" xml:space="preserve">
|
||||||
|
<value>最初の行の遅延</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageScrollTopDuration.Header" xml:space="preserve">
|
<data name="SettingsPageScrollTopDuration.Header" xml:space="preserve">
|
||||||
<value>歌詞スクロールアニメーション期間(最初の行)</value>
|
<value>最初の行の期間</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageServerTestButton.Content" xml:space="preserve">
|
<data name="SettingsPageServerTestButton.Content" xml:space="preserve">
|
||||||
<value>テストサーバー</value>
|
<value>テストサーバー</value>
|
||||||
@@ -958,6 +1042,15 @@
|
|||||||
<data name="SettingsPageSettingsManager.Header" xml:space="preserve">
|
<data name="SettingsPageSettingsManager.Header" xml:space="preserve">
|
||||||
<value>設定マネージャー</value>
|
<value>設定マネージャー</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageShortcutRegFailInfo" xml:space="preserve">
|
||||||
|
<value>このホットキーは正常に登録されていません</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageShortcutRegSuccessInfo" xml:space="preserve">
|
||||||
|
<value>このホットキーは正常に登録されています</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageShowHideHotKey.Header" xml:space="preserve">
|
||||||
|
<value>歌詞ウィンドウディスプレイとショートカットキーを非表示にします</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageSliderPrefix.Text" xml:space="preserve">
|
<data name="SettingsPageSliderPrefix.Text" xml:space="preserve">
|
||||||
<value>現在の値: </value>
|
<value>現在の値: </value>
|
||||||
</data>
|
</data>
|
||||||
@@ -985,7 +1078,7 @@
|
|||||||
<data name="SettingsPageTC.Content" xml:space="preserve">
|
<data name="SettingsPageTC.Content" xml:space="preserve">
|
||||||
<value>繁體中文</value>
|
<value>繁體中文</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageTelegram.Header" xml:space="preserve">
|
<data name="SettingsPageTelegram.Content" xml:space="preserve">
|
||||||
<value>Telegram</value>
|
<value>Telegram</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageTheme.Header" xml:space="preserve">
|
<data name="SettingsPageTheme.Header" xml:space="preserve">
|
||||||
@@ -1043,6 +1136,6 @@
|
|||||||
<value>翻訳サーバーは設定されていません。最初に設定で構成してください</value>
|
<value>翻訳サーバーは設定されていません。最初に設定で構成してください</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TryRunMultipleInstance" xml:space="preserve">
|
<data name="TryRunMultipleInstance" xml:space="preserve">
|
||||||
<value>BetterLyrics はすでに実行されています!</value>
|
<value>BetterLyrics はすでに実行されています</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -135,8 +135,8 @@
|
|||||||
<data name="AllLyricsSettingsControlStandard.Content" xml:space="preserve">
|
<data name="AllLyricsSettingsControlStandard.Content" xml:space="preserve">
|
||||||
<value>표준 모드</value>
|
<value>표준 모드</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BaseWindowAOTFlyoutItem.Text" xml:space="preserve">
|
<data name="AppSettingsControlGeneral.Content" xml:space="preserve">
|
||||||
<value>항상 위에</value>
|
<value>일반적인</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BaseWindowEnterFullScreenHint" xml:space="preserve">
|
<data name="BaseWindowEnterFullScreenHint" xml:space="preserve">
|
||||||
<value>ESC를 눌러 전체 화면 모드를 종료하십시오</value>
|
<value>ESC를 눌러 전체 화면 모드를 종료하십시오</value>
|
||||||
@@ -150,9 +150,6 @@
|
|||||||
<data name="BaseWindowMiniFlyoutItem.Text" xml:space="preserve">
|
<data name="BaseWindowMiniFlyoutItem.Text" xml:space="preserve">
|
||||||
<value>사진 인당 모드</value>
|
<value>사진 인당 모드</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BaseWindowUnMiniFlyoutItem.Text" xml:space="preserve">
|
|
||||||
<value>Picture-in-Picture 모드 종료</value>
|
|
||||||
</data>
|
|
||||||
<data name="Cancel" xml:space="preserve">
|
<data name="Cancel" xml:space="preserve">
|
||||||
<value>취소</value>
|
<value>취소</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -199,7 +196,7 @@
|
|||||||
<value>브라우저에서 승인을 완료하십시오</value>
|
<value>브라우저에서 승인을 완료하십시오</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LastFMRequestAuthTitle" xml:space="preserve">
|
<data name="LastFMRequestAuthTitle" xml:space="preserve">
|
||||||
<value>Last.fm 계정에 BetterLyrics 액세스 권한을 부여하세요!</value>
|
<value>Last.fm 계정에 BetterLyrics 액세스 권한을 부여하세요</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LastFMRequestUnAuthConfirm" xml:space="preserve">
|
<data name="LastFMRequestUnAuthConfirm" xml:space="preserve">
|
||||||
<value>내 승인을 취소했습니다</value>
|
<value>내 승인을 취소했습니다</value>
|
||||||
@@ -208,7 +205,7 @@
|
|||||||
<value>브라우저에서 취소 작업을 완료하십시오</value>
|
<value>브라우저에서 취소 작업을 완료하십시오</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LastFMRequestUnAuthTitle" xml:space="preserve">
|
<data name="LastFMRequestUnAuthTitle" xml:space="preserve">
|
||||||
<value>Last.fm 계정에 대한 BetterLyrics 액세스를 취소하십시오!</value>
|
<value>Last.fm 계정에 대한 BetterLyrics 액세스를 취소하십시오</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LibreTranslateFailed" xml:space="preserve">
|
<data name="LibreTranslateFailed" xml:space="preserve">
|
||||||
<value>LibreTranslate에서 번역 요청 실패, 설정 또는 기본 LibreTranslate 구성을 확인하십시오.</value>
|
<value>LibreTranslate에서 번역 요청 실패, 설정 또는 기본 LibreTranslate 구성을 확인하십시오.</value>
|
||||||
@@ -222,6 +219,9 @@
|
|||||||
<data name="LyricsPageLyricsProviderPrefix.Header" xml:space="preserve">
|
<data name="LyricsPageLyricsProviderPrefix.Header" xml:space="preserve">
|
||||||
<value>가사 제공자</value>
|
<value>가사 제공자</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="LyricsPageLyricsSearchButtonToolTip.Content" xml:space="preserve">
|
||||||
|
<value>가사를 수동으로 검색합니다</value>
|
||||||
|
</data>
|
||||||
<data name="LyricsPageLyricsSettingsButtonToolTip.Content" xml:space="preserve">
|
<data name="LyricsPageLyricsSettingsButtonToolTip.Content" xml:space="preserve">
|
||||||
<value>가사 스타일과 효과 빠른 설정</value>
|
<value>가사 스타일과 효과 빠른 설정</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -252,6 +252,42 @@
|
|||||||
<data name="LyricsPageTranslationProviderPrefix.Header" xml:space="preserve">
|
<data name="LyricsPageTranslationProviderPrefix.Header" xml:space="preserve">
|
||||||
<value>번역 제공자</value>
|
<value>번역 제공자</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="LyricsSearchControlArtist.Header" xml:space="preserve">
|
||||||
|
<value>아티스트</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlHelp.Text" xml:space="preserve">
|
||||||
|
<value>* 변경 사항 저장 변경은 즉시 적용되며, 그 후 트랙 가사는 맵핑 정보와 대상 가사로 검색됩니다. 순수한 음악으로 표시하면 순수한 음악 자리 표시 자 가사로 직접 돌아갑니다. 원래 데이터로 검색하도록 재설정하십시오.</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlMappedAs.Text" xml:space="preserve">
|
||||||
|
<value>로 매핑됨</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlMarkAsPureMusic.Content" xml:space="preserve">
|
||||||
|
<value>순수한 음악으로 표시하세요</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlNotFound.Text" xml:space="preserve">
|
||||||
|
<value>찾을 수 없음</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlReset.Content" xml:space="preserve">
|
||||||
|
<value>재설정</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlSaveChanges.Content" xml:space="preserve">
|
||||||
|
<value>변경 사항 저장</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlSearch.Content" xml:space="preserve">
|
||||||
|
<value>검색</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlSongInfoMapping.Header" xml:space="preserve">
|
||||||
|
<value>노래 정보 매핑</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlTargetSearchProvider.Header" xml:space="preserve">
|
||||||
|
<value>가사 검색 공급자를 타겟팅하십시오</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlTitle.Header" xml:space="preserve">
|
||||||
|
<value>제목</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchPageTitle" xml:space="preserve">
|
||||||
|
<value>가사 검색 - BetterLyrics</value>
|
||||||
|
</data>
|
||||||
<data name="LyricsSearchProviderEslrcFile" xml:space="preserve">
|
<data name="LyricsSearchProviderEslrcFile" xml:space="preserve">
|
||||||
<value>로컬 .ESLRC 파일</value>
|
<value>로컬 .ESLRC 파일</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -406,6 +442,15 @@
|
|||||||
<data name="MusicGalleryPageTitle" xml:space="preserve">
|
<data name="MusicGalleryPageTitle" xml:space="preserve">
|
||||||
<value>음악 갤러리 - BetterLyrics</value>
|
<value>음악 갤러리 - BetterLyrics</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SetingsPageDonation.Text" xml:space="preserve">
|
||||||
|
<value>기부</value>
|
||||||
|
</data>
|
||||||
|
<data name="SetingsPageFeedback.Text" xml:space="preserve">
|
||||||
|
<value>피드백</value>
|
||||||
|
</data>
|
||||||
|
<data name="SetingsPageThanks.Text" xml:space="preserve">
|
||||||
|
<value>이 프로젝트가 마음에 들면 기부하여 지원을 고려하십시오. 귀하의 지원은 프로젝트를 계속 유지하고 추가 개발을 장려하는 데 도움이 될 것입니다.</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageAbout.Content" xml:space="preserve">
|
<data name="SettingsPageAbout.Content" xml:space="preserve">
|
||||||
<value>에 대한</value>
|
<value>에 대한</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -442,6 +487,9 @@
|
|||||||
<data name="SettingsPageAmount.Header" xml:space="preserve">
|
<data name="SettingsPageAmount.Header" xml:space="preserve">
|
||||||
<value>금액</value>
|
<value>금액</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageAOT.Header" xml:space="preserve">
|
||||||
|
<value>항상 위에</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageApp.Content" xml:space="preserve">
|
<data name="SettingsPageApp.Content" xml:space="preserve">
|
||||||
<value>앱 외관과 행동</value>
|
<value>앱 외관과 행동</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -451,17 +499,8 @@
|
|||||||
<data name="SettingsPageAppBehavior.Text" xml:space="preserve">
|
<data name="SettingsPageAppBehavior.Text" xml:space="preserve">
|
||||||
<value>앱 동작</value>
|
<value>앱 동작</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageAppDesktop.Text" xml:space="preserve">
|
<data name="SettingsPageApply.Content" xml:space="preserve">
|
||||||
<value>데스크탑 모드</value>
|
<value>적용하다</value>
|
||||||
</data>
|
|
||||||
<data name="SettingsPageAppDock.Text" xml:space="preserve">
|
|
||||||
<value>도크 모드</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageAppPictureInPicture.Text" xml:space="preserve">
|
|
||||||
<value>사진 인당 모드</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageAppStandard.Text" xml:space="preserve">
|
|
||||||
<value>표준 모드</value>
|
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageAutoLock.Header" xml:space="preserve">
|
<data name="SettingsPageAutoLock.Header" xml:space="preserve">
|
||||||
<value>데스크탑 모드를 활성화 할 때 자동 잠금</value>
|
<value>데스크탑 모드를 활성화 할 때 자동 잠금</value>
|
||||||
@@ -478,6 +517,9 @@
|
|||||||
<data name="SettingsPageAutoStartInAppLyrics.Content" xml:space="preserve">
|
<data name="SettingsPageAutoStartInAppLyrics.Content" xml:space="preserve">
|
||||||
<value>표준 모드를 활성화합니다</value>
|
<value>표준 모드를 활성화합니다</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageAutoStartPIPLyrics.Content" xml:space="preserve">
|
||||||
|
<value>Picture-in-Picture 모드를 시작하십시오</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageAutoStartWindow.Header" xml:space="preserve">
|
<data name="SettingsPageAutoStartWindow.Header" xml:space="preserve">
|
||||||
<value>앱을 시작할 때</value>
|
<value>앱을 시작할 때</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -485,7 +527,7 @@
|
|||||||
<value>가사 배경 자료</value>
|
<value>가사 배경 자료</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageBackgroundAcrylicEffectAmount.Header" xml:space="preserve">
|
<data name="SettingsPageBackgroundAcrylicEffectAmount.Header" xml:space="preserve">
|
||||||
<value>앨범 배경 아크릴 효과 강도!</value>
|
<value>앨범 배경 아크릴 효과 강도</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageBackgroundOverlay.Content" xml:space="preserve">
|
<data name="SettingsPageBackgroundOverlay.Content" xml:space="preserve">
|
||||||
<value>가사 배경</value>
|
<value>가사 배경</value>
|
||||||
@@ -496,22 +538,37 @@
|
|||||||
<data name="SettingsPageCache.Header" xml:space="preserve">
|
<data name="SettingsPageCache.Header" xml:space="preserve">
|
||||||
<value>은닉처</value>
|
<value>은닉처</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageChinese.Header" xml:space="preserve">
|
||||||
|
<value>화음</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageChinesePreference.Header" xml:space="preserve">
|
||||||
|
<value>중국어를 전통적인 중국어로 전환합니다</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageCompactTitleBar.Content" xml:space="preserve">
|
<data name="SettingsPageCompactTitleBar.Content" xml:space="preserve">
|
||||||
<value>콤팩트</value>
|
<value>콤팩트</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageCurrentLyricsWindowStatus.Text" xml:space="preserve">
|
||||||
|
<value>현재 가사 창 상태</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageDark.Content" xml:space="preserve">
|
<data name="SettingsPageDark.Content" xml:space="preserve">
|
||||||
<value>어두운</value>
|
<value>어두운</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageDebugOverlay.Header" xml:space="preserve">
|
<data name="SettingsPageDebugOverlay.Header" xml:space="preserve">
|
||||||
<value>디버그 오버레이를 표시하십시오</value>
|
<value>디버그 오버레이를 표시하십시오</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageDelete.Content" xml:space="preserve">
|
||||||
|
<value>삭제</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageDesktopAcrylic.Content" xml:space="preserve">
|
<data name="SettingsPageDesktopAcrylic.Content" xml:space="preserve">
|
||||||
<value>데스크탑 아크릴</value>
|
<value>데스크탑 아크릴</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageDev.Content" xml:space="preserve">
|
<data name="SettingsPageDev.Content" xml:space="preserve">
|
||||||
<value>고급 옵션</value>
|
<value>고급 옵션</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageDiscord.Header" xml:space="preserve">
|
<data name="SettingsPageDisclaimer.Text" xml:space="preserve">
|
||||||
|
<value>이 프로젝트는 어떠한 종류의 보증도 없이 그대로 제공됩니다. 모든 가사, 글꼴, 아이콘 및 기타 제3자 리소스는 해당 저작권 소유자의 재산입니다. 이 프로젝트의 저자는 그러한 자원의 소유권을 주장하지 않습니다. 이 프로젝트는 비상업적이기 때문에 어떠한 권리도 침해해서는 안 됩니다. 사용자는 자신의 사용이 관련 법률 및 라이센스를 준수하는지 확인할 책임이 있습니다.</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageDiscord.Content" xml:space="preserve">
|
||||||
<value>Discord</value>
|
<value>Discord</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageDisplayTypeSwitcher.Header" xml:space="preserve">
|
<data name="SettingsPageDisplayTypeSwitcher.Header" xml:space="preserve">
|
||||||
@@ -532,6 +589,9 @@
|
|||||||
<data name="SettingsPageDockWindowHeight.Header" xml:space="preserve">
|
<data name="SettingsPageDockWindowHeight.Header" xml:space="preserve">
|
||||||
<value>창 높이</value>
|
<value>창 높이</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageDynamicLyricsFontSize.Header" xml:space="preserve">
|
||||||
|
<value>자동 조정</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageEasingFuncType.Header" xml:space="preserve">
|
<data name="SettingsPageEasingFuncType.Header" xml:space="preserve">
|
||||||
<value>애니메이션 유형 완화</value>
|
<value>애니메이션 유형 완화</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -586,7 +646,7 @@
|
|||||||
<data name="SettingsPageFan.Header" xml:space="preserve">
|
<data name="SettingsPageFan.Header" xml:space="preserve">
|
||||||
<value>팬 가사</value>
|
<value>팬 가사</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageFAQ.Header" xml:space="preserve">
|
<data name="SettingsPageFAQ.Content" xml:space="preserve">
|
||||||
<value>자주 묻는 질문</value>
|
<value>자주 묻는 질문</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageFixedTimeStep.Header" xml:space="preserve">
|
<data name="SettingsPageFixedTimeStep.Header" xml:space="preserve">
|
||||||
@@ -598,15 +658,6 @@
|
|||||||
<data name="SettingsPageFPS.Header" xml:space="preserve">
|
<data name="SettingsPageFPS.Header" xml:space="preserve">
|
||||||
<value>렌더링 프레임 속도</value>
|
<value>렌더링 프레임 속도</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageGitHub.ActionIconToolTip" xml:space="preserve">
|
|
||||||
<value>새 창에서 열립니다</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageGitHub.Description" xml:space="preserve">
|
|
||||||
<value>GitHub의 소스 코드를 참조하십시오</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageGitHub.Header" xml:space="preserve">
|
|
||||||
<value>이것은 오픈 소스 앱입니다</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageGlobalDrag.Description" xml:space="preserve">
|
<data name="SettingsPageGlobalDrag.Description" xml:space="preserve">
|
||||||
<value>비 중과 영역에서 창을 드래그 할 수 있도록 제목 표시 줄을 전체 페이지로 확장하십시오.</value>
|
<value>비 중과 영역에서 창을 드래그 할 수 있도록 제목 표시 줄을 전체 페이지로 확장하십시오.</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -614,10 +665,10 @@
|
|||||||
<value>글로벌 드래그</value>
|
<value>글로벌 드래그</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageHideWindow.Description" xml:space="preserve">
|
<data name="SettingsPageHideWindow.Description" xml:space="preserve">
|
||||||
<value>도크 모드 또는 데스크탑 모드에서 재생되지 않을 때는 창을 자동으로 숨기고 있습니다</value>
|
<value>도킹 모드 또는 데스크탑 모드에서는 노래가 재생되지 않으면 창이 자동으로 숨겨집니다. 그렇지 않으면 창이 자동으로 표시됩니다.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageHideWindow.Header" xml:space="preserve">
|
<data name="SettingsPageHideWindow.Header" xml:space="preserve">
|
||||||
<value>자동 가죽 창</value>
|
<value>Windows를 자동으로 숨기고 표시합니다</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageIgnoreFullscreenWindow.Description" xml:space="preserve">
|
<data name="SettingsPageIgnoreFullscreenWindow.Description" xml:space="preserve">
|
||||||
<value>도킹 또는 데스크탑 모드가 활성화 될 때이 앱이 전체 화면 앱 위에 나타나도록 강요</value>
|
<value>도킹 또는 데스크탑 모드가 활성화 될 때이 앱이 전체 화면 앱 위에 나타나도록 강요</value>
|
||||||
@@ -634,9 +685,15 @@
|
|||||||
<data name="SettingsPageJA.Content" xml:space="preserve">
|
<data name="SettingsPageJA.Content" xml:space="preserve">
|
||||||
<value>日本語</value>
|
<value>日本語</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageJapanese.Header" xml:space="preserve">
|
||||||
|
<value>일본 주석</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageJoinNowButton.Content" xml:space="preserve">
|
<data name="SettingsPageJoinNowButton.Content" xml:space="preserve">
|
||||||
<value>지금 가입하십시오</value>
|
<value>지금 가입하십시오</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageJyutping.Content" xml:space="preserve">
|
||||||
|
<value>광동어 Pinyin</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageKO.Content" xml:space="preserve">
|
<data name="SettingsPageKO.Content" xml:space="preserve">
|
||||||
<value>한국어</value>
|
<value>한국어</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -695,13 +752,13 @@
|
|||||||
<value>가사 배경</value>
|
<value>가사 배경</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsBackgroundBlurAmount.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsBackgroundBlurAmount.Header" xml:space="preserve">
|
||||||
<value>앨범 배경 레이어 모호성!</value>
|
<value>앨범 배경 레이어 모호성</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsBackgroundOpacity.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsBackgroundOpacity.Header" xml:space="preserve">
|
||||||
<value>앨범 배경 레이어 불투명도!</value>
|
<value>앨범 배경 레이어 불투명도</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsBackgroundSpeed.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsBackgroundSpeed.Header" xml:space="preserve">
|
||||||
<value>앨범 배경 레이어 모션 속도!</value>
|
<value>앨범 배경 레이어 모션 속도</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsBgFontColor.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsBgFontColor.Header" xml:space="preserve">
|
||||||
<value>글꼴 색상 (비 전류 재생 영역)</value>
|
<value>글꼴 색상 (비 전류 재생 영역)</value>
|
||||||
@@ -779,7 +836,7 @@
|
|||||||
<value>글로우 효과</value>
|
<value>글로우 효과</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsHighlightScope.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsHighlightScope.Header" xml:space="preserve">
|
||||||
<value>하이라이트 범위</value>
|
<value>원래 하이라이트 범위</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsLeft.Content" xml:space="preserve">
|
<data name="SettingsPageLyricsLeft.Content" xml:space="preserve">
|
||||||
<value>왼쪽</value>
|
<value>왼쪽</value>
|
||||||
@@ -838,18 +895,27 @@
|
|||||||
<data name="SettingsPageLyricsThin.Content" xml:space="preserve">
|
<data name="SettingsPageLyricsThin.Content" xml:space="preserve">
|
||||||
<value>얇은</value>
|
<value>얇은</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageLyricsTimeline.Header" xml:space="preserve">
|
||||||
|
<value>가사 타임라인 동기화</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageLyricsTimelineThreshold.Description" xml:space="preserve">
|
<data name="SettingsPageLyricsTimelineThreshold.Description" xml:space="preserve">
|
||||||
<value>가사 진행 상황이 불안하다면이 임계 값을 높이십시오. 이 값을 변경하면 가사가 동기화 될 수 있습니다</value>
|
<value>가사 진행 상황이 불안하다면이 임계 값을 높이십시오. 이 값을 변경하면 가사가 동기화 될 수 있습니다</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsTimelineThreshold.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsTimelineThreshold.Header" xml:space="preserve">
|
||||||
<value>가사 타임 라인 동기화 임계 값</value>
|
<value>가사 타임 라인 동기화 임계 값</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageLyricsTranslationHighlight.Header" xml:space="preserve">
|
||||||
|
<value>번역 하이라이트</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageLyricsTranslationSeparator.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsTranslationSeparator.Header" xml:space="preserve">
|
||||||
<value>소스 및 번역 분리기</value>
|
<value>소스 및 번역 분리기</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsVerticalEdgeOpacity.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsVerticalEdgeOpacity.Header" xml:space="preserve">
|
||||||
<value>상단 및 하단 가장자리 불투명도</value>
|
<value>상단 및 하단 가장자리 불투명도</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageLyricsWindowManager.Header" xml:space="preserve">
|
||||||
|
<value>가사 창 관리자</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageMediaLib.Content" xml:space="preserve">
|
<data name="SettingsPageMediaLib.Content" xml:space="preserve">
|
||||||
<value>미디어 라이브러리</value>
|
<value>미디어 라이브러리</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -895,6 +961,9 @@
|
|||||||
<data name="SettingsPagePathNotFound.Text" xml:space="preserve">
|
<data name="SettingsPagePathNotFound.Text" xml:space="preserve">
|
||||||
<value>경로는 컴퓨터에서 찾을 수 없습니다</value>
|
<value>경로는 컴퓨터에서 찾을 수 없습니다</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPagePinyin.Content" xml:space="preserve">
|
||||||
|
<value>만다린의 피니 인</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPagePlaybackLib.Content" xml:space="preserve">
|
<data name="SettingsPagePlaybackLib.Content" xml:space="preserve">
|
||||||
<value>재생 소스</value>
|
<value>재생 소스</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -913,9 +982,15 @@
|
|||||||
<data name="SettingsPagePreviousSongHotKey.Header" xml:space="preserve">
|
<data name="SettingsPagePreviousSongHotKey.Header" xml:space="preserve">
|
||||||
<value>이전 트랙의 바로 가기 키</value>
|
<value>이전 트랙의 바로 가기 키</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageQQGroup.Header" xml:space="preserve">
|
<data name="SettingsPageQQGroup.Content" xml:space="preserve">
|
||||||
<value>QQ 피드백 및 채팅 그룹</value>
|
<value>QQ 피드백 및 채팅 그룹</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageRecord.Content" xml:space="preserve">
|
||||||
|
<value>기록</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageRecordedWindowStatus.Text" xml:space="preserve">
|
||||||
|
<value>기록 된 창 상태</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageRemoveInfo.Message" xml:space="preserve">
|
<data name="SettingsPageRemoveInfo.Message" xml:space="preserve">
|
||||||
<value>이 경로의 원본 파일과 폴더는이 앱에서 제거 할 때 삭제되지 않습니다.</value>
|
<value>이 경로의 원본 파일과 폴더는이 앱에서 제거 할 때 삭제되지 않습니다.</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -928,23 +1003,32 @@
|
|||||||
<data name="SettingsPageRestart.Content" xml:space="preserve">
|
<data name="SettingsPageRestart.Content" xml:space="preserve">
|
||||||
<value>변경 사항을 적용하려면 앱을 다시 시작하십시오</value>
|
<value>변경 사항을 적용하려면 앱을 다시 시작하십시오</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageRomaji.Header" xml:space="preserve">
|
||||||
|
<value>일본 주석</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageSC.Content" xml:space="preserve">
|
<data name="SettingsPageSC.Content" xml:space="preserve">
|
||||||
<value>简体中文</value>
|
<value>简体中文</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageScope.Header" xml:space="preserve">
|
<data name="SettingsPageScope.Header" xml:space="preserve">
|
||||||
<value>범위</value>
|
<value>범위</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageScrollBottomDelay.Header" xml:space="preserve">
|
||||||
|
<value>테일 라인 지연</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageScrollBottomDuration.Header" xml:space="preserve">
|
<data name="SettingsPageScrollBottomDuration.Header" xml:space="preserve">
|
||||||
<value>가사 스크롤 애니메이션 지속 시간 (마지막 줄)</value>
|
<value>최종 라인 기간</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageScrollDuration.Header" xml:space="preserve">
|
<data name="SettingsPageScrollDuration.Header" xml:space="preserve">
|
||||||
<value>가사 스크롤 애니메이션 지속 시간 (현재 줄)</value>
|
<value>현재 라인 기간</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageScrollEasing.Header" xml:space="preserve">
|
<data name="SettingsPageScrollEasing.Header" xml:space="preserve">
|
||||||
<value>가사 스크롤링 애니메이션 유형</value>
|
<value>가사 스크롤링 애니메이션 유형</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageScrollTopDelay.Header" xml:space="preserve">
|
||||||
|
<value>첫 번째 줄 지연</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageScrollTopDuration.Header" xml:space="preserve">
|
<data name="SettingsPageScrollTopDuration.Header" xml:space="preserve">
|
||||||
<value>가사 스크롤 애니메이션 지속 시간 (첫 번째 줄)</value>
|
<value>첫 번째 줄의 기간</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageServerTestButton.Content" xml:space="preserve">
|
<data name="SettingsPageServerTestButton.Content" xml:space="preserve">
|
||||||
<value>테스트 서버</value>
|
<value>테스트 서버</value>
|
||||||
@@ -958,6 +1042,15 @@
|
|||||||
<data name="SettingsPageSettingsManager.Header" xml:space="preserve">
|
<data name="SettingsPageSettingsManager.Header" xml:space="preserve">
|
||||||
<value>설정 관리자</value>
|
<value>설정 관리자</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageShortcutRegFailInfo" xml:space="preserve">
|
||||||
|
<value>이 핫키는 성공적으로 등록되지 않았습니다</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageShortcutRegSuccessInfo" xml:space="preserve">
|
||||||
|
<value>이 핫키는 성공적으로 등록되었습니다</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageShowHideHotKey.Header" xml:space="preserve">
|
||||||
|
<value>가사 창 디스플레이 및 바로 가기 키 숨기기</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageSliderPrefix.Text" xml:space="preserve">
|
<data name="SettingsPageSliderPrefix.Text" xml:space="preserve">
|
||||||
<value>현재 가치 : </value>
|
<value>현재 가치 : </value>
|
||||||
</data>
|
</data>
|
||||||
@@ -985,7 +1078,7 @@
|
|||||||
<data name="SettingsPageTC.Content" xml:space="preserve">
|
<data name="SettingsPageTC.Content" xml:space="preserve">
|
||||||
<value>繁體中文</value>
|
<value>繁體中文</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageTelegram.Header" xml:space="preserve">
|
<data name="SettingsPageTelegram.Content" xml:space="preserve">
|
||||||
<value>Telegram</value>
|
<value>Telegram</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageTheme.Header" xml:space="preserve">
|
<data name="SettingsPageTheme.Header" xml:space="preserve">
|
||||||
|
|||||||
@@ -135,8 +135,8 @@
|
|||||||
<data name="AllLyricsSettingsControlStandard.Content" xml:space="preserve">
|
<data name="AllLyricsSettingsControlStandard.Content" xml:space="preserve">
|
||||||
<value>标准模式</value>
|
<value>标准模式</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BaseWindowAOTFlyoutItem.Text" xml:space="preserve">
|
<data name="AppSettingsControlGeneral.Content" xml:space="preserve">
|
||||||
<value>将应用置于顶层</value>
|
<value>通用</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BaseWindowEnterFullScreenHint" xml:space="preserve">
|
<data name="BaseWindowEnterFullScreenHint" xml:space="preserve">
|
||||||
<value>按 Esc 退出全屏模式</value>
|
<value>按 Esc 退出全屏模式</value>
|
||||||
@@ -150,9 +150,6 @@
|
|||||||
<data name="BaseWindowMiniFlyoutItem.Text" xml:space="preserve">
|
<data name="BaseWindowMiniFlyoutItem.Text" xml:space="preserve">
|
||||||
<value>画中画模式</value>
|
<value>画中画模式</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BaseWindowUnMiniFlyoutItem.Text" xml:space="preserve">
|
|
||||||
<value>退出画中画模式</value>
|
|
||||||
</data>
|
|
||||||
<data name="Cancel" xml:space="preserve">
|
<data name="Cancel" xml:space="preserve">
|
||||||
<value>取消</value>
|
<value>取消</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -222,6 +219,9 @@
|
|||||||
<data name="LyricsPageLyricsProviderPrefix.Header" xml:space="preserve">
|
<data name="LyricsPageLyricsProviderPrefix.Header" xml:space="preserve">
|
||||||
<value>歌词来源</value>
|
<value>歌词来源</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="LyricsPageLyricsSearchButtonToolTip.Content" xml:space="preserve">
|
||||||
|
<value>手动检索歌词</value>
|
||||||
|
</data>
|
||||||
<data name="LyricsPageLyricsSettingsButtonToolTip.Content" xml:space="preserve">
|
<data name="LyricsPageLyricsSettingsButtonToolTip.Content" xml:space="preserve">
|
||||||
<value>歌词样式与效果快捷设置</value>
|
<value>歌词样式与效果快捷设置</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -252,6 +252,42 @@
|
|||||||
<data name="LyricsPageTranslationProviderPrefix.Header" xml:space="preserve">
|
<data name="LyricsPageTranslationProviderPrefix.Header" xml:space="preserve">
|
||||||
<value>翻译来源</value>
|
<value>翻译来源</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="LyricsSearchControlArtist.Header" xml:space="preserve">
|
||||||
|
<value>艺术家</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlHelp.Text" xml:space="preserve">
|
||||||
|
<value>* 保存更改立即生效,此后将以映射信息和目标歌词源检索该曲目歌词;标记为纯音乐将直接返回纯音乐占位歌词。重置以按原始数据检索。</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlMappedAs.Text" xml:space="preserve">
|
||||||
|
<value>映射为</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlMarkAsPureMusic.Content" xml:space="preserve">
|
||||||
|
<value>标记为纯音乐</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlNotFound.Text" xml:space="preserve">
|
||||||
|
<value>未找到</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlReset.Content" xml:space="preserve">
|
||||||
|
<value>重置</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlSaveChanges.Content" xml:space="preserve">
|
||||||
|
<value>保存更改</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlSearch.Content" xml:space="preserve">
|
||||||
|
<value>搜索</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlSongInfoMapping.Header" xml:space="preserve">
|
||||||
|
<value>歌曲信息映射</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlTargetSearchProvider.Header" xml:space="preserve">
|
||||||
|
<value>目标歌词搜索提供商</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlTitle.Header" xml:space="preserve">
|
||||||
|
<value>标题</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchPageTitle" xml:space="preserve">
|
||||||
|
<value>歌词搜索 - BetterLyrics</value>
|
||||||
|
</data>
|
||||||
<data name="LyricsSearchProviderEslrcFile" xml:space="preserve">
|
<data name="LyricsSearchProviderEslrcFile" xml:space="preserve">
|
||||||
<value>本地 .ESLRC 文件</value>
|
<value>本地 .ESLRC 文件</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -406,6 +442,15 @@
|
|||||||
<data name="MusicGalleryPageTitle" xml:space="preserve">
|
<data name="MusicGalleryPageTitle" xml:space="preserve">
|
||||||
<value>音乐库 - BetterLyrics</value>
|
<value>音乐库 - BetterLyrics</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SetingsPageDonation.Text" xml:space="preserve">
|
||||||
|
<value>捐贈</value>
|
||||||
|
</data>
|
||||||
|
<data name="SetingsPageFeedback.Text" xml:space="preserve">
|
||||||
|
<value>反馈</value>
|
||||||
|
</data>
|
||||||
|
<data name="SetingsPageThanks.Text" xml:space="preserve">
|
||||||
|
<value>如果您喜欢这个项目,请考虑通过捐赠来支持它。您的支持将有助于保持项目的生命并鼓励进一步的发展。</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageAbout.Content" xml:space="preserve">
|
<data name="SettingsPageAbout.Content" xml:space="preserve">
|
||||||
<value>关于</value>
|
<value>关于</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -442,6 +487,9 @@
|
|||||||
<data name="SettingsPageAmount.Header" xml:space="preserve">
|
<data name="SettingsPageAmount.Header" xml:space="preserve">
|
||||||
<value>量</value>
|
<value>量</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageAOT.Header" xml:space="preserve">
|
||||||
|
<value>将应用置于顶层</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageApp.Content" xml:space="preserve">
|
<data name="SettingsPageApp.Content" xml:space="preserve">
|
||||||
<value>应用外观与行为</value>
|
<value>应用外观与行为</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -451,17 +499,8 @@
|
|||||||
<data name="SettingsPageAppBehavior.Text" xml:space="preserve">
|
<data name="SettingsPageAppBehavior.Text" xml:space="preserve">
|
||||||
<value>应用行为</value>
|
<value>应用行为</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageAppDesktop.Text" xml:space="preserve">
|
<data name="SettingsPageApply.Content" xml:space="preserve">
|
||||||
<value>桌面模式</value>
|
<value>应用</value>
|
||||||
</data>
|
|
||||||
<data name="SettingsPageAppDock.Text" xml:space="preserve">
|
|
||||||
<value>停靠模式</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageAppPictureInPicture.Text" xml:space="preserve">
|
|
||||||
<value>画中画模式</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageAppStandard.Text" xml:space="preserve">
|
|
||||||
<value>标准模式</value>
|
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageAutoLock.Header" xml:space="preserve">
|
<data name="SettingsPageAutoLock.Header" xml:space="preserve">
|
||||||
<value>启动桌面模式时随即锁定窗口</value>
|
<value>启动桌面模式时随即锁定窗口</value>
|
||||||
@@ -478,6 +517,9 @@
|
|||||||
<data name="SettingsPageAutoStartInAppLyrics.Content" xml:space="preserve">
|
<data name="SettingsPageAutoStartInAppLyrics.Content" xml:space="preserve">
|
||||||
<value>启动标准模式</value>
|
<value>启动标准模式</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageAutoStartPIPLyrics.Content" xml:space="preserve">
|
||||||
|
<value>启动画中画模式</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageAutoStartWindow.Header" xml:space="preserve">
|
<data name="SettingsPageAutoStartWindow.Header" xml:space="preserve">
|
||||||
<value>启动应用时</value>
|
<value>启动应用时</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -496,22 +538,37 @@
|
|||||||
<data name="SettingsPageCache.Header" xml:space="preserve">
|
<data name="SettingsPageCache.Header" xml:space="preserve">
|
||||||
<value>缓存</value>
|
<value>缓存</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageChinese.Header" xml:space="preserve">
|
||||||
|
<value>中文注音</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageChinesePreference.Header" xml:space="preserve">
|
||||||
|
<value>中文转换为繁体</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageCompactTitleBar.Content" xml:space="preserve">
|
<data name="SettingsPageCompactTitleBar.Content" xml:space="preserve">
|
||||||
<value>紧凑</value>
|
<value>紧凑</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageCurrentLyricsWindowStatus.Text" xml:space="preserve">
|
||||||
|
<value>当前歌词窗口状态</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageDark.Content" xml:space="preserve">
|
<data name="SettingsPageDark.Content" xml:space="preserve">
|
||||||
<value>深色</value>
|
<value>深色</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageDebugOverlay.Header" xml:space="preserve">
|
<data name="SettingsPageDebugOverlay.Header" xml:space="preserve">
|
||||||
<value>显示调试覆盖层</value>
|
<value>显示调试覆盖层</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageDelete.Content" xml:space="preserve">
|
||||||
|
<value>删除</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageDesktopAcrylic.Content" xml:space="preserve">
|
<data name="SettingsPageDesktopAcrylic.Content" xml:space="preserve">
|
||||||
<value>亚克力(桌面)</value>
|
<value>亚克力(桌面)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageDev.Content" xml:space="preserve">
|
<data name="SettingsPageDev.Content" xml:space="preserve">
|
||||||
<value>高级选项</value>
|
<value>高级选项</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageDiscord.Header" xml:space="preserve">
|
<data name="SettingsPageDisclaimer.Text" xml:space="preserve">
|
||||||
|
<value>本项目按原样提供,不提供任何形式的保证。所有歌词、字体、图标和其他第三方资源均为其各自版权所有者的财产。本项目的作者不主张此类资源的所有权。本项目为非商业性项目,不得用于侵犯任何权利。用户有责任确保自己的使用符合适用的法律和许可。</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageDiscord.Content" xml:space="preserve">
|
||||||
<value>Discord</value>
|
<value>Discord</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageDisplayTypeSwitcher.Header" xml:space="preserve">
|
<data name="SettingsPageDisplayTypeSwitcher.Header" xml:space="preserve">
|
||||||
@@ -532,6 +589,9 @@
|
|||||||
<data name="SettingsPageDockWindowHeight.Header" xml:space="preserve">
|
<data name="SettingsPageDockWindowHeight.Header" xml:space="preserve">
|
||||||
<value>窗口高度</value>
|
<value>窗口高度</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageDynamicLyricsFontSize.Header" xml:space="preserve">
|
||||||
|
<value>自动调整</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageEasingFuncType.Header" xml:space="preserve">
|
<data name="SettingsPageEasingFuncType.Header" xml:space="preserve">
|
||||||
<value>缓动动画类型</value>
|
<value>缓动动画类型</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -586,7 +646,7 @@
|
|||||||
<data name="SettingsPageFan.Header" xml:space="preserve">
|
<data name="SettingsPageFan.Header" xml:space="preserve">
|
||||||
<value>扇形歌词</value>
|
<value>扇形歌词</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageFAQ.Header" xml:space="preserve">
|
<data name="SettingsPageFAQ.Content" xml:space="preserve">
|
||||||
<value>常见问题与解答</value>
|
<value>常见问题与解答</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageFixedTimeStep.Header" xml:space="preserve">
|
<data name="SettingsPageFixedTimeStep.Header" xml:space="preserve">
|
||||||
@@ -598,15 +658,6 @@
|
|||||||
<data name="SettingsPageFPS.Header" xml:space="preserve">
|
<data name="SettingsPageFPS.Header" xml:space="preserve">
|
||||||
<value>渲染帧率</value>
|
<value>渲染帧率</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageGitHub.ActionIconToolTip" xml:space="preserve">
|
|
||||||
<value>在新窗口中打开</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageGitHub.Description" xml:space="preserve">
|
|
||||||
<value>在 GitHub 上查看源代码</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageGitHub.Header" xml:space="preserve">
|
|
||||||
<value>此应用已开源</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageGlobalDrag.Description" xml:space="preserve">
|
<data name="SettingsPageGlobalDrag.Description" xml:space="preserve">
|
||||||
<value>将标题栏扩展至整个页面使得在任意非交互区域均可拖拽窗口</value>
|
<value>将标题栏扩展至整个页面使得在任意非交互区域均可拖拽窗口</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -614,10 +665,10 @@
|
|||||||
<value>全局拖拽</value>
|
<value>全局拖拽</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageHideWindow.Description" xml:space="preserve">
|
<data name="SettingsPageHideWindow.Description" xml:space="preserve">
|
||||||
<value>停靠模式或桌面模式下,无歌曲正在播放时,自动隐藏窗口</value>
|
<value>停靠模式或桌面模式下,无歌曲正在播放时,自动隐藏窗口;反之自动显示窗口</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageHideWindow.Header" xml:space="preserve">
|
<data name="SettingsPageHideWindow.Header" xml:space="preserve">
|
||||||
<value>自动隐藏窗口</value>
|
<value>自动隐藏/显示窗口</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageIgnoreFullscreenWindow.Description" xml:space="preserve">
|
<data name="SettingsPageIgnoreFullscreenWindow.Description" xml:space="preserve">
|
||||||
<value>当启用停靠模式或桌面模式时强制将本应用显示在全屏应用的上方</value>
|
<value>当启用停靠模式或桌面模式时强制将本应用显示在全屏应用的上方</value>
|
||||||
@@ -634,9 +685,15 @@
|
|||||||
<data name="SettingsPageJA.Content" xml:space="preserve">
|
<data name="SettingsPageJA.Content" xml:space="preserve">
|
||||||
<value>日本語</value>
|
<value>日本語</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageJapanese.Header" xml:space="preserve">
|
||||||
|
<value>日语注音</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageJoinNowButton.Content" xml:space="preserve">
|
<data name="SettingsPageJoinNowButton.Content" xml:space="preserve">
|
||||||
<value>立即加入</value>
|
<value>立即加入</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageJyutping.Content" xml:space="preserve">
|
||||||
|
<value>广东话拼音</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageKO.Content" xml:space="preserve">
|
<data name="SettingsPageKO.Content" xml:space="preserve">
|
||||||
<value>한국어</value>
|
<value>한국어</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -779,7 +836,7 @@
|
|||||||
<value>辉光效果</value>
|
<value>辉光效果</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsHighlightScope.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsHighlightScope.Header" xml:space="preserve">
|
||||||
<value>高亮显示范围</value>
|
<value>原文高亮显示范围</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsLeft.Content" xml:space="preserve">
|
<data name="SettingsPageLyricsLeft.Content" xml:space="preserve">
|
||||||
<value>靠左</value>
|
<value>靠左</value>
|
||||||
@@ -838,18 +895,27 @@
|
|||||||
<data name="SettingsPageLyricsThin.Content" xml:space="preserve">
|
<data name="SettingsPageLyricsThin.Content" xml:space="preserve">
|
||||||
<value>极细</value>
|
<value>极细</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageLyricsTimeline.Header" xml:space="preserve">
|
||||||
|
<value>歌词时间轴同步</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageLyricsTimelineThreshold.Description" xml:space="preserve">
|
<data name="SettingsPageLyricsTimelineThreshold.Description" xml:space="preserve">
|
||||||
<value>当歌词进度抖动时,请尝试增加该阈值;更改此值会导致歌词同步有偏差</value>
|
<value>当歌词进度抖动时,请尝试增加该阈值;更改此值会导致歌词同步有偏差</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsTimelineThreshold.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsTimelineThreshold.Header" xml:space="preserve">
|
||||||
<value>歌词时间轴同步阈值</value>
|
<value>歌词时间轴同步阈值</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageLyricsTranslationHighlight.Header" xml:space="preserve">
|
||||||
|
<value>翻译高亮</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageLyricsTranslationSeparator.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsTranslationSeparator.Header" xml:space="preserve">
|
||||||
<value>原文译文分隔符</value>
|
<value>原文译文分隔符</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsVerticalEdgeOpacity.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsVerticalEdgeOpacity.Header" xml:space="preserve">
|
||||||
<value>上下边缘不透明度</value>
|
<value>上下边缘不透明度</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageLyricsWindowManager.Header" xml:space="preserve">
|
||||||
|
<value>歌词窗口管理</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageMediaLib.Content" xml:space="preserve">
|
<data name="SettingsPageMediaLib.Content" xml:space="preserve">
|
||||||
<value>媒体库</value>
|
<value>媒体库</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -895,6 +961,9 @@
|
|||||||
<data name="SettingsPagePathNotFound.Text" xml:space="preserve">
|
<data name="SettingsPagePathNotFound.Text" xml:space="preserve">
|
||||||
<value>无法在您的计算机中找到该路径</value>
|
<value>无法在您的计算机中找到该路径</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPagePinyin.Content" xml:space="preserve">
|
||||||
|
<value>普通话拼音</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPagePlaybackLib.Content" xml:space="preserve">
|
<data name="SettingsPagePlaybackLib.Content" xml:space="preserve">
|
||||||
<value>播放源</value>
|
<value>播放源</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -913,9 +982,15 @@
|
|||||||
<data name="SettingsPagePreviousSongHotKey.Header" xml:space="preserve">
|
<data name="SettingsPagePreviousSongHotKey.Header" xml:space="preserve">
|
||||||
<value>上一首曲目快捷键</value>
|
<value>上一首曲目快捷键</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageQQGroup.Header" xml:space="preserve">
|
<data name="SettingsPageQQGroup.Content" xml:space="preserve">
|
||||||
<value>QQ 反馈交流群</value>
|
<value>QQ 反馈交流群</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageRecord.Content" xml:space="preserve">
|
||||||
|
<value>记录</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageRecordedWindowStatus.Text" xml:space="preserve">
|
||||||
|
<value>记录的窗口状态</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageRemoveInfo.Message" xml:space="preserve">
|
<data name="SettingsPageRemoveInfo.Message" xml:space="preserve">
|
||||||
<value>路径中的原始文件和文件夹不会被删除</value>
|
<value>路径中的原始文件和文件夹不会被删除</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -928,23 +1003,32 @@
|
|||||||
<data name="SettingsPageRestart.Content" xml:space="preserve">
|
<data name="SettingsPageRestart.Content" xml:space="preserve">
|
||||||
<value>重启应用以应用更改</value>
|
<value>重启应用以应用更改</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageRomaji.Header" xml:space="preserve">
|
||||||
|
<value>日语注音</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageSC.Content" xml:space="preserve">
|
<data name="SettingsPageSC.Content" xml:space="preserve">
|
||||||
<value>简体中文</value>
|
<value>简体中文</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageScope.Header" xml:space="preserve">
|
<data name="SettingsPageScope.Header" xml:space="preserve">
|
||||||
<value>范围</value>
|
<value>范围</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageScrollBottomDelay.Header" xml:space="preserve">
|
||||||
|
<value>尾行延时</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageScrollBottomDuration.Header" xml:space="preserve">
|
<data name="SettingsPageScrollBottomDuration.Header" xml:space="preserve">
|
||||||
<value>歌词滚动动画持续时间(最后一行)</value>
|
<value>尾行持续时间</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageScrollDuration.Header" xml:space="preserve">
|
<data name="SettingsPageScrollDuration.Header" xml:space="preserve">
|
||||||
<value>歌词滚动动画持续时间(当前行)</value>
|
<value>当前行持续时间</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageScrollEasing.Header" xml:space="preserve">
|
<data name="SettingsPageScrollEasing.Header" xml:space="preserve">
|
||||||
<value>歌词滚动动画类型</value>
|
<value>歌词滚动动画类型</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageScrollTopDelay.Header" xml:space="preserve">
|
||||||
|
<value>首行延时</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageScrollTopDuration.Header" xml:space="preserve">
|
<data name="SettingsPageScrollTopDuration.Header" xml:space="preserve">
|
||||||
<value>歌词滚动动画持续时间(第一行)</value>
|
<value>首行持续时间</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageServerTestButton.Content" xml:space="preserve">
|
<data name="SettingsPageServerTestButton.Content" xml:space="preserve">
|
||||||
<value>测试服务器</value>
|
<value>测试服务器</value>
|
||||||
@@ -958,6 +1042,15 @@
|
|||||||
<data name="SettingsPageSettingsManager.Header" xml:space="preserve">
|
<data name="SettingsPageSettingsManager.Header" xml:space="preserve">
|
||||||
<value>设置管理器</value>
|
<value>设置管理器</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageShortcutRegFailInfo" xml:space="preserve">
|
||||||
|
<value>该热键未成功注册</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageShortcutRegSuccessInfo" xml:space="preserve">
|
||||||
|
<value>该热键已成功注册</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageShowHideHotKey.Header" xml:space="preserve">
|
||||||
|
<value>歌词窗口显示和隐藏快捷键</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageSliderPrefix.Text" xml:space="preserve">
|
<data name="SettingsPageSliderPrefix.Text" xml:space="preserve">
|
||||||
<value>当前值: </value>
|
<value>当前值: </value>
|
||||||
</data>
|
</data>
|
||||||
@@ -985,7 +1078,7 @@
|
|||||||
<data name="SettingsPageTC.Content" xml:space="preserve">
|
<data name="SettingsPageTC.Content" xml:space="preserve">
|
||||||
<value>繁體中文</value>
|
<value>繁體中文</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageTelegram.Header" xml:space="preserve">
|
<data name="SettingsPageTelegram.Content" xml:space="preserve">
|
||||||
<value>Telegram</value>
|
<value>Telegram</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageTheme.Header" xml:space="preserve">
|
<data name="SettingsPageTheme.Header" xml:space="preserve">
|
||||||
|
|||||||
@@ -135,8 +135,8 @@
|
|||||||
<data name="AllLyricsSettingsControlStandard.Content" xml:space="preserve">
|
<data name="AllLyricsSettingsControlStandard.Content" xml:space="preserve">
|
||||||
<value>標準模式</value>
|
<value>標準模式</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BaseWindowAOTFlyoutItem.Text" xml:space="preserve">
|
<data name="AppSettingsControlGeneral.Content" xml:space="preserve">
|
||||||
<value>將應用置於頂層</value>
|
<value>一般</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BaseWindowEnterFullScreenHint" xml:space="preserve">
|
<data name="BaseWindowEnterFullScreenHint" xml:space="preserve">
|
||||||
<value>按 Esc 退出全螢幕模式</value>
|
<value>按 Esc 退出全螢幕模式</value>
|
||||||
@@ -150,9 +150,6 @@
|
|||||||
<data name="BaseWindowMiniFlyoutItem.Text" xml:space="preserve">
|
<data name="BaseWindowMiniFlyoutItem.Text" xml:space="preserve">
|
||||||
<value>畫中畫模式</value>
|
<value>畫中畫模式</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BaseWindowUnMiniFlyoutItem.Text" xml:space="preserve">
|
|
||||||
<value>退出畫中畫模式</value>
|
|
||||||
</data>
|
|
||||||
<data name="Cancel" xml:space="preserve">
|
<data name="Cancel" xml:space="preserve">
|
||||||
<value>取消</value>
|
<value>取消</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -222,6 +219,9 @@
|
|||||||
<data name="LyricsPageLyricsProviderPrefix.Header" xml:space="preserve">
|
<data name="LyricsPageLyricsProviderPrefix.Header" xml:space="preserve">
|
||||||
<value>歌詞來源</value>
|
<value>歌詞來源</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="LyricsPageLyricsSearchButtonToolTip.Content" xml:space="preserve">
|
||||||
|
<value>手動檢索歌詞</value>
|
||||||
|
</data>
|
||||||
<data name="LyricsPageLyricsSettingsButtonToolTip.Content" xml:space="preserve">
|
<data name="LyricsPageLyricsSettingsButtonToolTip.Content" xml:space="preserve">
|
||||||
<value>歌詞樣式與效果快捷設置</value>
|
<value>歌詞樣式與效果快捷設置</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -252,6 +252,42 @@
|
|||||||
<data name="LyricsPageTranslationProviderPrefix.Header" xml:space="preserve">
|
<data name="LyricsPageTranslationProviderPrefix.Header" xml:space="preserve">
|
||||||
<value>翻譯來源</value>
|
<value>翻譯來源</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="LyricsSearchControlArtist.Header" xml:space="preserve">
|
||||||
|
<value>藝術家</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlHelp.Text" xml:space="preserve">
|
||||||
|
<value>* 保存更改立即生效,此後將以映射信息和目標歌詞源檢索該曲目歌詞;標記為純音樂將直接返回純音樂佔位歌詞。重置以按原始數據檢索。</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlMappedAs.Text" xml:space="preserve">
|
||||||
|
<value>映射爲</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlMarkAsPureMusic.Content" xml:space="preserve">
|
||||||
|
<value>標記為純音樂</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlNotFound.Text" xml:space="preserve">
|
||||||
|
<value>找不到</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlReset.Content" xml:space="preserve">
|
||||||
|
<value>重設</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlSaveChanges.Content" xml:space="preserve">
|
||||||
|
<value>保存更改</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlSearch.Content" xml:space="preserve">
|
||||||
|
<value>搜索</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlSongInfoMapping.Header" xml:space="preserve">
|
||||||
|
<value>歌曲信息映射</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlTargetSearchProvider.Header" xml:space="preserve">
|
||||||
|
<value>目標歌詞搜尋提供者</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchControlTitle.Header" xml:space="preserve">
|
||||||
|
<value>標題</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyricsSearchPageTitle" xml:space="preserve">
|
||||||
|
<value>歌詞搜尋 - BetterLyrics</value>
|
||||||
|
</data>
|
||||||
<data name="LyricsSearchProviderEslrcFile" xml:space="preserve">
|
<data name="LyricsSearchProviderEslrcFile" xml:space="preserve">
|
||||||
<value>本地 .ESLRC 文件</value>
|
<value>本地 .ESLRC 文件</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -406,6 +442,15 @@
|
|||||||
<data name="MusicGalleryPageTitle" xml:space="preserve">
|
<data name="MusicGalleryPageTitle" xml:space="preserve">
|
||||||
<value>音樂庫 - BetterLyrics</value>
|
<value>音樂庫 - BetterLyrics</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SetingsPageDonation.Text" xml:space="preserve">
|
||||||
|
<value>捐贈</value>
|
||||||
|
</data>
|
||||||
|
<data name="SetingsPageFeedback.Text" xml:space="preserve">
|
||||||
|
<value>回饋</value>
|
||||||
|
</data>
|
||||||
|
<data name="SetingsPageThanks.Text" xml:space="preserve">
|
||||||
|
<value>如果您喜歡這個項目,請考慮通過捐贈來支持它。您的支持將有助於保持項目的生命並鼓勵進一步的發展。</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageAbout.Content" xml:space="preserve">
|
<data name="SettingsPageAbout.Content" xml:space="preserve">
|
||||||
<value>關於</value>
|
<value>關於</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -442,6 +487,9 @@
|
|||||||
<data name="SettingsPageAmount.Header" xml:space="preserve">
|
<data name="SettingsPageAmount.Header" xml:space="preserve">
|
||||||
<value>量</value>
|
<value>量</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageAOT.Header" xml:space="preserve">
|
||||||
|
<value>將應用置於頂層</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageApp.Content" xml:space="preserve">
|
<data name="SettingsPageApp.Content" xml:space="preserve">
|
||||||
<value>應用外觀與行為</value>
|
<value>應用外觀與行為</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -451,17 +499,8 @@
|
|||||||
<data name="SettingsPageAppBehavior.Text" xml:space="preserve">
|
<data name="SettingsPageAppBehavior.Text" xml:space="preserve">
|
||||||
<value>應用行為</value>
|
<value>應用行為</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageAppDesktop.Text" xml:space="preserve">
|
<data name="SettingsPageApply.Content" xml:space="preserve">
|
||||||
<value>桌面模式</value>
|
<value>應用</value>
|
||||||
</data>
|
|
||||||
<data name="SettingsPageAppDock.Text" xml:space="preserve">
|
|
||||||
<value>停靠模式</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageAppPictureInPicture.Text" xml:space="preserve">
|
|
||||||
<value>畫中畫模式</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageAppStandard.Text" xml:space="preserve">
|
|
||||||
<value>標準模式</value>
|
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageAutoLock.Header" xml:space="preserve">
|
<data name="SettingsPageAutoLock.Header" xml:space="preserve">
|
||||||
<value>啟動桌面模式時隨即鎖定窗口</value>
|
<value>啟動桌面模式時隨即鎖定窗口</value>
|
||||||
@@ -478,6 +517,9 @@
|
|||||||
<data name="SettingsPageAutoStartInAppLyrics.Content" xml:space="preserve">
|
<data name="SettingsPageAutoStartInAppLyrics.Content" xml:space="preserve">
|
||||||
<value>啟動標準模式</value>
|
<value>啟動標準模式</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageAutoStartPIPLyrics.Content" xml:space="preserve">
|
||||||
|
<value>啟動畫中畫模式</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageAutoStartWindow.Header" xml:space="preserve">
|
<data name="SettingsPageAutoStartWindow.Header" xml:space="preserve">
|
||||||
<value>啟動應用程式時</value>
|
<value>啟動應用程式時</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -485,7 +527,7 @@
|
|||||||
<value>歌詞背景材質</value>
|
<value>歌詞背景材質</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageBackgroundAcrylicEffectAmount.Header" xml:space="preserve">
|
<data name="SettingsPageBackgroundAcrylicEffectAmount.Header" xml:space="preserve">
|
||||||
<value>專輯背景壓克力效果強度!</value>
|
<value>專輯背景壓克力效果強度</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageBackgroundOverlay.Content" xml:space="preserve">
|
<data name="SettingsPageBackgroundOverlay.Content" xml:space="preserve">
|
||||||
<value>歌詞背景</value>
|
<value>歌詞背景</value>
|
||||||
@@ -496,22 +538,37 @@
|
|||||||
<data name="SettingsPageCache.Header" xml:space="preserve">
|
<data name="SettingsPageCache.Header" xml:space="preserve">
|
||||||
<value>快取</value>
|
<value>快取</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageChinese.Header" xml:space="preserve">
|
||||||
|
<value>中文注音</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageChinesePreference.Header" xml:space="preserve">
|
||||||
|
<value>中文轉換為繁體</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageCompactTitleBar.Content" xml:space="preserve">
|
<data name="SettingsPageCompactTitleBar.Content" xml:space="preserve">
|
||||||
<value>緊湊</value>
|
<value>緊湊</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageCurrentLyricsWindowStatus.Text" xml:space="preserve">
|
||||||
|
<value>當前歌詞窗口狀態</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageDark.Content" xml:space="preserve">
|
<data name="SettingsPageDark.Content" xml:space="preserve">
|
||||||
<value>深色</value>
|
<value>深色</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageDebugOverlay.Header" xml:space="preserve">
|
<data name="SettingsPageDebugOverlay.Header" xml:space="preserve">
|
||||||
<value>顯示調試覆蓋層</value>
|
<value>顯示調試覆蓋層</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageDelete.Content" xml:space="preserve">
|
||||||
|
<value>刪除</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageDesktopAcrylic.Content" xml:space="preserve">
|
<data name="SettingsPageDesktopAcrylic.Content" xml:space="preserve">
|
||||||
<value>亞克力(桌面)</value>
|
<value>亞克力(桌面)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageDev.Content" xml:space="preserve">
|
<data name="SettingsPageDev.Content" xml:space="preserve">
|
||||||
<value>高級選項</value>
|
<value>高級選項</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageDiscord.Header" xml:space="preserve">
|
<data name="SettingsPageDisclaimer.Text" xml:space="preserve">
|
||||||
|
<value>本項目按原樣提供,不提供任何形式的保證。所有歌詞、字型、圖示和其他第三方資源均屬其各自的版權擁有者所有。此專案的作者並未聲明此類資源的所有權。此專案為非商業專案,不應用於侵犯任何權利。用戶有責任確保自己的使用符合適用的法律和許可證。</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageDiscord.Content" xml:space="preserve">
|
||||||
<value>Discord</value>
|
<value>Discord</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageDisplayTypeSwitcher.Header" xml:space="preserve">
|
<data name="SettingsPageDisplayTypeSwitcher.Header" xml:space="preserve">
|
||||||
@@ -532,6 +589,9 @@
|
|||||||
<data name="SettingsPageDockWindowHeight.Header" xml:space="preserve">
|
<data name="SettingsPageDockWindowHeight.Header" xml:space="preserve">
|
||||||
<value>窗口高度</value>
|
<value>窗口高度</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageDynamicLyricsFontSize.Header" xml:space="preserve">
|
||||||
|
<value>自動調整</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageEasingFuncType.Header" xml:space="preserve">
|
<data name="SettingsPageEasingFuncType.Header" xml:space="preserve">
|
||||||
<value>緩動動畫類型</value>
|
<value>緩動動畫類型</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -586,7 +646,7 @@
|
|||||||
<data name="SettingsPageFan.Header" xml:space="preserve">
|
<data name="SettingsPageFan.Header" xml:space="preserve">
|
||||||
<value>扇形歌詞</value>
|
<value>扇形歌詞</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageFAQ.Header" xml:space="preserve">
|
<data name="SettingsPageFAQ.Content" xml:space="preserve">
|
||||||
<value>常見問題與解答</value>
|
<value>常見問題與解答</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageFixedTimeStep.Header" xml:space="preserve">
|
<data name="SettingsPageFixedTimeStep.Header" xml:space="preserve">
|
||||||
@@ -598,15 +658,6 @@
|
|||||||
<data name="SettingsPageFPS.Header" xml:space="preserve">
|
<data name="SettingsPageFPS.Header" xml:space="preserve">
|
||||||
<value>渲染幀率</value>
|
<value>渲染幀率</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageGitHub.ActionIconToolTip" xml:space="preserve">
|
|
||||||
<value>在新視窗中開啟</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageGitHub.Description" xml:space="preserve">
|
|
||||||
<value>在 GitHub 上查看原始碼</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageGitHub.Header" xml:space="preserve">
|
|
||||||
<value>此應用程式已開源</value>
|
|
||||||
</data>
|
|
||||||
<data name="SettingsPageGlobalDrag.Description" xml:space="preserve">
|
<data name="SettingsPageGlobalDrag.Description" xml:space="preserve">
|
||||||
<value>將標題列擴展至整個頁面使得在任意非互動區域均可拖曳窗口</value>
|
<value>將標題列擴展至整個頁面使得在任意非互動區域均可拖曳窗口</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -614,10 +665,10 @@
|
|||||||
<value>全域拖曳</value>
|
<value>全域拖曳</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageHideWindow.Description" xml:space="preserve">
|
<data name="SettingsPageHideWindow.Description" xml:space="preserve">
|
||||||
<value>停靠模式或桌面模式下,無歌曲正在播放時,自動隱藏窗口</value>
|
<value>停靠模式或桌面模式下,無歌曲正在播放時,自動隱藏窗口;反之自動顯示窗口</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageHideWindow.Header" xml:space="preserve">
|
<data name="SettingsPageHideWindow.Header" xml:space="preserve">
|
||||||
<value>自動隱藏窗口</value>
|
<value>自動隱藏/顯示窗口</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageIgnoreFullscreenWindow.Description" xml:space="preserve">
|
<data name="SettingsPageIgnoreFullscreenWindow.Description" xml:space="preserve">
|
||||||
<value>啟用停靠模式或桌面模式時強制將本應用程式顯示在全螢幕應用程式的上方</value>
|
<value>啟用停靠模式或桌面模式時強制將本應用程式顯示在全螢幕應用程式的上方</value>
|
||||||
@@ -634,9 +685,15 @@
|
|||||||
<data name="SettingsPageJA.Content" xml:space="preserve">
|
<data name="SettingsPageJA.Content" xml:space="preserve">
|
||||||
<value>日本語</value>
|
<value>日本語</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageJapanese.Header" xml:space="preserve">
|
||||||
|
<value>日語注音</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageJoinNowButton.Content" xml:space="preserve">
|
<data name="SettingsPageJoinNowButton.Content" xml:space="preserve">
|
||||||
<value>立即加入</value>
|
<value>立即加入</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageJyutping.Content" xml:space="preserve">
|
||||||
|
<value>廣東話拼音</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageKO.Content" xml:space="preserve">
|
<data name="SettingsPageKO.Content" xml:space="preserve">
|
||||||
<value>한국어</value>
|
<value>한국어</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -695,13 +752,13 @@
|
|||||||
<value>歌詞背景</value>
|
<value>歌詞背景</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsBackgroundBlurAmount.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsBackgroundBlurAmount.Header" xml:space="preserve">
|
||||||
<value>專輯背景層模糊度!</value>
|
<value>專輯背景層模糊度</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsBackgroundOpacity.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsBackgroundOpacity.Header" xml:space="preserve">
|
||||||
<value>專輯背景層不透明度!</value>
|
<value>專輯背景層不透明度</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsBackgroundSpeed.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsBackgroundSpeed.Header" xml:space="preserve">
|
||||||
<value>專輯背景層運動速率!</value>
|
<value>專輯背景層運動速率</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsBgFontColor.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsBgFontColor.Header" xml:space="preserve">
|
||||||
<value>字體顏色(非當前播放區域)</value>
|
<value>字體顏色(非當前播放區域)</value>
|
||||||
@@ -779,7 +836,7 @@
|
|||||||
<value>輝光效果</value>
|
<value>輝光效果</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsHighlightScope.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsHighlightScope.Header" xml:space="preserve">
|
||||||
<value>高亮顯示範圍</value>
|
<value>原文高亮顯示範圍</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsLeft.Content" xml:space="preserve">
|
<data name="SettingsPageLyricsLeft.Content" xml:space="preserve">
|
||||||
<value>靠左</value>
|
<value>靠左</value>
|
||||||
@@ -838,18 +895,27 @@
|
|||||||
<data name="SettingsPageLyricsThin.Content" xml:space="preserve">
|
<data name="SettingsPageLyricsThin.Content" xml:space="preserve">
|
||||||
<value>極細</value>
|
<value>極細</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageLyricsTimeline.Header" xml:space="preserve">
|
||||||
|
<value>歌詞時間軌同步閾值</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageLyricsTimelineThreshold.Description" xml:space="preserve">
|
<data name="SettingsPageLyricsTimelineThreshold.Description" xml:space="preserve">
|
||||||
<value>當歌詞進度抖動時,請嘗試增加該閾值;更改此值會導致歌詞同步偏差</value>
|
<value>當歌詞進度抖動時,請嘗試增加該閾值;更改此值會導致歌詞同步偏差</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsTimelineThreshold.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsTimelineThreshold.Header" xml:space="preserve">
|
||||||
<value>歌詞時間軌同步閾值</value>
|
<value>歌詞時間軌同步閾值</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageLyricsTranslationHighlight.Header" xml:space="preserve">
|
||||||
|
<value>翻譯高亮</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageLyricsTranslationSeparator.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsTranslationSeparator.Header" xml:space="preserve">
|
||||||
<value>原文譯文分隔符</value>
|
<value>原文譯文分隔符</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageLyricsVerticalEdgeOpacity.Header" xml:space="preserve">
|
<data name="SettingsPageLyricsVerticalEdgeOpacity.Header" xml:space="preserve">
|
||||||
<value>上下邊緣不透明度</value>
|
<value>上下邊緣不透明度</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageLyricsWindowManager.Header" xml:space="preserve">
|
||||||
|
<value>歌詞視窗管理</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageMediaLib.Content" xml:space="preserve">
|
<data name="SettingsPageMediaLib.Content" xml:space="preserve">
|
||||||
<value>媒體庫</value>
|
<value>媒體庫</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -895,6 +961,9 @@
|
|||||||
<data name="SettingsPagePathNotFound.Text" xml:space="preserve">
|
<data name="SettingsPagePathNotFound.Text" xml:space="preserve">
|
||||||
<value>無法在您的電腦中找到該路徑</value>
|
<value>無法在您的電腦中找到該路徑</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPagePinyin.Content" xml:space="preserve">
|
||||||
|
<value>普通話拼音</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPagePlaybackLib.Content" xml:space="preserve">
|
<data name="SettingsPagePlaybackLib.Content" xml:space="preserve">
|
||||||
<value>播放源</value>
|
<value>播放源</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -913,9 +982,15 @@
|
|||||||
<data name="SettingsPagePreviousSongHotKey.Header" xml:space="preserve">
|
<data name="SettingsPagePreviousSongHotKey.Header" xml:space="preserve">
|
||||||
<value>上一首曲目快捷鍵</value>
|
<value>上一首曲目快捷鍵</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageQQGroup.Header" xml:space="preserve">
|
<data name="SettingsPageQQGroup.Content" xml:space="preserve">
|
||||||
<value>QQ 回饋交流群</value>
|
<value>QQ 回饋交流群</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageRecord.Content" xml:space="preserve">
|
||||||
|
<value>記錄</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageRecordedWindowStatus.Text" xml:space="preserve">
|
||||||
|
<value>記錄的窗口狀態</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageRemoveInfo.Message" xml:space="preserve">
|
<data name="SettingsPageRemoveInfo.Message" xml:space="preserve">
|
||||||
<value>路徑中的原始檔案和資料夾不會被刪除</value>
|
<value>路徑中的原始檔案和資料夾不會被刪除</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -928,23 +1003,32 @@
|
|||||||
<data name="SettingsPageRestart.Content" xml:space="preserve">
|
<data name="SettingsPageRestart.Content" xml:space="preserve">
|
||||||
<value>重啟應用程式以應用更改</value>
|
<value>重啟應用程式以應用更改</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageRomaji.Header" xml:space="preserve">
|
||||||
|
<value>日語注音</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageSC.Content" xml:space="preserve">
|
<data name="SettingsPageSC.Content" xml:space="preserve">
|
||||||
<value>简体中文</value>
|
<value>简体中文</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageScope.Header" xml:space="preserve">
|
<data name="SettingsPageScope.Header" xml:space="preserve">
|
||||||
<value>範圍</value>
|
<value>範圍</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageScrollBottomDelay.Header" xml:space="preserve">
|
||||||
|
<value>尾行延時</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageScrollBottomDuration.Header" xml:space="preserve">
|
<data name="SettingsPageScrollBottomDuration.Header" xml:space="preserve">
|
||||||
<value>歌詞滾動動畫持續時間(最後一行)</value>
|
<value>尾行持續時間</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageScrollDuration.Header" xml:space="preserve">
|
<data name="SettingsPageScrollDuration.Header" xml:space="preserve">
|
||||||
<value>歌詞滾動動畫持續時間(當前行)</value>
|
<value>當前行持續時間</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageScrollEasing.Header" xml:space="preserve">
|
<data name="SettingsPageScrollEasing.Header" xml:space="preserve">
|
||||||
<value>歌詞滾動動畫類型</value>
|
<value>歌詞滾動動畫類型</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageScrollTopDelay.Header" xml:space="preserve">
|
||||||
|
<value>首行延時</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageScrollTopDuration.Header" xml:space="preserve">
|
<data name="SettingsPageScrollTopDuration.Header" xml:space="preserve">
|
||||||
<value>歌詞滾動動畫持續時間(第一行)</value>
|
<value>首行持續時間</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageServerTestButton.Content" xml:space="preserve">
|
<data name="SettingsPageServerTestButton.Content" xml:space="preserve">
|
||||||
<value>測試服務器</value>
|
<value>測試服務器</value>
|
||||||
@@ -958,6 +1042,15 @@
|
|||||||
<data name="SettingsPageSettingsManager.Header" xml:space="preserve">
|
<data name="SettingsPageSettingsManager.Header" xml:space="preserve">
|
||||||
<value>設置管理器</value>
|
<value>設置管理器</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsPageShortcutRegFailInfo" xml:space="preserve">
|
||||||
|
<value>該熱鍵未成功註冊</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageShortcutRegSuccessInfo" xml:space="preserve">
|
||||||
|
<value>該熱鍵已成功註冊</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsPageShowHideHotKey.Header" xml:space="preserve">
|
||||||
|
<value>歌詞窗口顯示和隱藏快捷鍵</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsPageSliderPrefix.Text" xml:space="preserve">
|
<data name="SettingsPageSliderPrefix.Text" xml:space="preserve">
|
||||||
<value>目前值: </value>
|
<value>目前值: </value>
|
||||||
</data>
|
</data>
|
||||||
@@ -985,7 +1078,7 @@
|
|||||||
<data name="SettingsPageTC.Content" xml:space="preserve">
|
<data name="SettingsPageTC.Content" xml:space="preserve">
|
||||||
<value>繁體中文</value>
|
<value>繁體中文</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageTelegram.Header" xml:space="preserve">
|
<data name="SettingsPageTelegram.Content" xml:space="preserve">
|
||||||
<value>Telegram</value>
|
<value>Telegram</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageTheme.Header" xml:space="preserve">
|
<data name="SettingsPageTheme.Header" xml:space="preserve">
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ namespace BetterLyrics.WinUI3.ViewModels
|
|||||||
{
|
{
|
||||||
if (message.Sender is LiveStates)
|
if (message.Sender is LiveStates)
|
||||||
{
|
{
|
||||||
if (message.PropertyName == nameof(LiveStates.CurrentLyricsWindowMode))
|
if (message.PropertyName == nameof(LiveStates.LyricsWindowMode))
|
||||||
{
|
{
|
||||||
SelectedTabIndex = (int)message.NewValue;
|
SelectedTabIndex = (int)message.NewValue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
using BetterLyrics.WinUI3.Helper;
|
using BetterLyrics.WinUI3.Helper;
|
||||||
|
using BetterLyrics.WinUI3.Models;
|
||||||
using BetterLyrics.WinUI3.Models.Settings;
|
using BetterLyrics.WinUI3.Models.Settings;
|
||||||
|
using BetterLyrics.WinUI3.Services.LiveStatesService;
|
||||||
using BetterLyrics.WinUI3.Services.SettingsService;
|
using BetterLyrics.WinUI3.Services.SettingsService;
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
@@ -13,19 +15,25 @@ namespace BetterLyrics.WinUI3.ViewModels
|
|||||||
public partial class AppSettingsControlViewModel : BaseViewModel
|
public partial class AppSettingsControlViewModel : BaseViewModel
|
||||||
{
|
{
|
||||||
private readonly ISettingsService _settingsService;
|
private readonly ISettingsService _settingsService;
|
||||||
|
private readonly ILiveStatesService _liveStatesService;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public partial AppSettings AppSettings { get; set; }
|
public partial AppSettings AppSettings { get; set; }
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
public partial LiveStates LiveStates { get; set; }
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public partial ObservableCollection<string> MonitorDeviceNames { get; set; }
|
public partial ObservableCollection<string> MonitorDeviceNames { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public AppSettingsControlViewModel(ISettingsService settingsService)
|
public AppSettingsControlViewModel(ISettingsService settingsService, ILiveStatesService liveStatesService)
|
||||||
{
|
{
|
||||||
_settingsService = settingsService;
|
_settingsService = settingsService;
|
||||||
|
_liveStatesService = liveStatesService;
|
||||||
MonitorDeviceNames = [.. MonitorHelper.GetAllMonitorDeviceNames()];
|
MonitorDeviceNames = [.. MonitorHelper.GetAllMonitorDeviceNames()];
|
||||||
AppSettings = _settingsService.AppSettings;
|
AppSettings = _settingsService.AppSettings;
|
||||||
|
LiveStates = _liveStatesService.LiveStates;
|
||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
@@ -41,6 +49,19 @@ namespace BetterLyrics.WinUI3.ViewModels
|
|||||||
AppSettings.DockModeSettings.DockMonitorDeviceName = MonitorHelper.GetPrimaryMonitorDeviceName();
|
AppSettings.DockModeSettings.DockMonitorDeviceName = MonitorHelper.GetPrimaryMonitorDeviceName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[RelayCommand]
|
||||||
|
private void RecordCurrentWindowBounds()
|
||||||
|
{
|
||||||
|
AppSettings.WindowBoundsRecords.Add(new WindowBoundsRecord
|
||||||
|
{
|
||||||
|
WindowBounds = LiveStates.LyricsWindowBounds,
|
||||||
|
MonitorDeviceName = LiveStates.LyricsWindowMonitorName,
|
||||||
|
MonitorBounds = LiveStates.LyricsWindowMonitorBounds,
|
||||||
|
DemoWindowBounds = LiveStates.DemoLyricsWindowBounds,
|
||||||
|
DemoMonitorBounds = LiveStates.DemoLyricsWindowMonitorBounds
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<bool> ToggleAutoStartupAsync(bool target)
|
public async Task<bool> ToggleAutoStartupAsync(bool target)
|
||||||
{
|
{
|
||||||
StartupTask startupTask = await StartupTask.GetAsync(Constants.App.AutoStartupTaskId);
|
StartupTask startupTask = await StartupTask.GetAsync(Constants.App.AutoStartupTaskId);
|
||||||
|
|||||||
@@ -102,6 +102,15 @@ namespace BetterLyrics.WinUI3.ViewModels
|
|||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public partial bool IsSongPlaying { get; set; }
|
public partial bool IsSongPlaying { get; set; }
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
public partial float TimelineSliderThumbOpacity { get; set; } = 0f;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
public partial LyricsLine? TimelineSliderThumbLyricsLine { get; set; }
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
public partial double TimelineSliderThumbSeconds { get; set; } = 0;
|
||||||
|
|
||||||
public void Receive(PropertyChangedMessage<bool> message)
|
public void Receive(PropertyChangedMessage<bool> message)
|
||||||
{
|
{
|
||||||
if (message.Sender is LyricsWindowViewModel)
|
if (message.Sender is LyricsWindowViewModel)
|
||||||
@@ -157,6 +166,11 @@ namespace BetterLyrics.WinUI3.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
partial void OnTimelineSliderThumbSecondsChanged(double value)
|
||||||
|
{
|
||||||
|
TimelineSliderThumbLyricsLine = _mediaSessionsService.CurrentLyricsData?.GetLyricsLine(value);
|
||||||
|
}
|
||||||
|
|
||||||
//partial void OnVolumeChanged(int value)
|
//partial void OnVolumeChanged(int value)
|
||||||
//{
|
//{
|
||||||
// SystemVolumeHelper.SetMasterVolume(value);
|
// SystemVolumeHelper.SetMasterVolume(value);
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
using var combined = new CanvasCommandList(control);
|
using var combined = new CanvasCommandList(control);
|
||||||
using var combinedDs = combined.CreateDrawingSession();
|
using var combinedDs = combined.CreateDrawingSession();
|
||||||
|
|
||||||
switch (_liveStatesService.LiveStates.CurrentLyricsWindowMode)
|
switch (_liveStatesService.LiveStates.LyricsWindowMode)
|
||||||
{
|
{
|
||||||
case LyricsWindowMode.DockMode:
|
case LyricsWindowMode.DockMode:
|
||||||
FillBackground(control, combinedDs, _immersiveBgColorTransition.Value, 0f,
|
FillBackground(control, combinedDs, _immersiveBgColorTransition.Value, 0f,
|
||||||
@@ -234,11 +234,9 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
using var combined = new CanvasCommandList(control);
|
using var combined = new CanvasCommandList(control);
|
||||||
using var combinedDs = combined.CreateDrawingSession();
|
using var combinedDs = combined.CreateDrawingSession();
|
||||||
|
|
||||||
// Mock gradient blurred lyrics layer
|
|
||||||
// 先铺一层带默认透明度的已经加了模糊效果的歌词作为最底层(背景歌词层次)
|
// 先铺一层带默认透明度的已经加了模糊效果的歌词作为最底层(背景歌词层次)
|
||||||
// Current line will not be blurred
|
|
||||||
using var backgroundFontEffect = CanvasHelper.CreateFontEffect(line, control, _strokeFontColor,
|
using var backgroundFontEffect = CanvasHelper.CreateFontEffect(line, control, _strokeFontColor,
|
||||||
_liveStatesService.LiveStates.CurrentLyricsStyleSettings.LyricsFontStrokeWidth, _bgFontColor);
|
_liveStatesService.LiveStates.LyricsStyleSettings.LyricsFontStrokeWidth, _bgFontColor);
|
||||||
using var backgroundEffect = CanvasHelper.CreateBackgroundEffect(line, backgroundFontEffect, _lyricsOpacityTransition.Value);
|
using var backgroundEffect = CanvasHelper.CreateBackgroundEffect(line, backgroundFontEffect, _lyricsOpacityTransition.Value);
|
||||||
combinedDs.DrawImage(backgroundEffect);
|
combinedDs.DrawImage(backgroundEffect);
|
||||||
|
|
||||||
@@ -249,34 +247,45 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
|
|
||||||
using var charMask = CanvasHelper.CreateCharMask(control, line, charStartIndex, charLength, charProgress);
|
using var charMask = CanvasHelper.CreateCharMask(control, line, charStartIndex, charLength, charProgress);
|
||||||
using var lineStartToCharMask = CanvasHelper.CreateLineStartToCharMask(control, line, charStartIndex, charLength, charProgress,
|
using var lineStartToCharMask = CanvasHelper.CreateLineStartToCharMask(control, line, charStartIndex, charLength, charProgress,
|
||||||
_liveStatesService.LiveStates.CurrentLyricsEffectSettings.IsLyricsLineFadeEnabled);
|
_liveStatesService.LiveStates.LyricsEffectSettings.IsLyricsLineFadeEnabled);
|
||||||
using var lineMask = CanvasHelper.CreateLineMask(control, line);
|
using var lineMask = CanvasHelper.CreateLineMask(control, line);
|
||||||
|
|
||||||
using var foregroundFontEffect = CanvasHelper.CreateFontEffect(line, control, _strokeFontColor,
|
using var foregroundFontEffect = CanvasHelper.CreateFontEffect(line, control, _strokeFontColor,
|
||||||
_liveStatesService.LiveStates.CurrentLyricsStyleSettings.LyricsFontStrokeWidth, _bgFontColor);
|
_liveStatesService.LiveStates.LyricsStyleSettings.LyricsFontStrokeWidth, _fgFontColor);
|
||||||
|
|
||||||
using var effectLayer = new CanvasCommandList(control);
|
using var effectLayer = new CanvasCommandList(control);
|
||||||
using var effectLayerDs = effectLayer.CreateDrawingSession();
|
using var effectLayerDs = effectLayer.CreateDrawingSession();
|
||||||
if (_liveStatesService.LiveStates.CurrentLyricsEffectSettings.IsLyricsShadowEnabled)
|
if (line.OriginalText != line.DisplayedText && _liveStatesService.LiveStates.LyricsEffectSettings.LyricsTranslationHighlightAmount != 0)
|
||||||
|
{
|
||||||
|
using var translationHighlightMask = CanvasHelper.CreateTranslationHighlightMask(control, line);
|
||||||
|
using var foregroundTranslationHighlightEffect = CanvasHelper.CreateForegroundHighlightEffect(foregroundFontEffect, translationHighlightMask,
|
||||||
|
_liveStatesService.LiveStates.LyricsEffectSettings.LyricsTranslationHighlightAmount / 100.0);
|
||||||
|
effectLayerDs.DrawImage(foregroundTranslationHighlightEffect);
|
||||||
|
}
|
||||||
|
if (_liveStatesService.LiveStates.LyricsEffectSettings.IsLyricsShadowEnabled)
|
||||||
{
|
{
|
||||||
var shadowEffectMask = CanvasHelper.GetAlphaMask(control, charMask, lineStartToCharMask, lineMask,
|
var shadowEffectMask = CanvasHelper.GetAlphaMask(control, charMask, lineStartToCharMask, lineMask,
|
||||||
_liveStatesService.LiveStates.CurrentLyricsEffectSettings.LyricsShadowScope);
|
_liveStatesService.LiveStates.LyricsEffectSettings.LyricsShadowScope);
|
||||||
using var foregroundShadowEffect = CanvasHelper.CreateForegroundShadowEffect(foregroundFontEffect, shadowEffectMask,
|
using var foregroundShadowEffect = CanvasHelper.CreateForegroundShadowEffect(foregroundFontEffect, shadowEffectMask,
|
||||||
_albumArtAccentColorTransition.Value, _liveStatesService.LiveStates.CurrentLyricsEffectSettings.LyricsShadowAmount);
|
_albumArtAccentColorTransition.Value, _liveStatesService.LiveStates.LyricsEffectSettings.LyricsShadowAmount);
|
||||||
effectLayerDs.DrawImage(foregroundShadowEffect);
|
effectLayerDs.DrawImage(foregroundShadowEffect);
|
||||||
}
|
}
|
||||||
if (_liveStatesService.LiveStates.CurrentLyricsEffectSettings.IsLyricsGlowEffectEnabled)
|
if (_liveStatesService.LiveStates.LyricsEffectSettings.IsLyricsGlowEffectEnabled)
|
||||||
{
|
{
|
||||||
var blurEffectMask = CanvasHelper.GetAlphaMask(control, charMask, lineStartToCharMask, lineMask,
|
var blurEffectMask = CanvasHelper.GetAlphaMask(control, charMask, lineStartToCharMask, lineMask,
|
||||||
_liveStatesService.LiveStates.CurrentLyricsEffectSettings.LyricsGlowEffectScope);
|
_liveStatesService.LiveStates.LyricsEffectSettings.LyricsGlowEffectScope);
|
||||||
using var foregroundBlurEffect = CanvasHelper.CreateForegroundBlurEffect(foregroundFontEffect, blurEffectMask,
|
using var foregroundBlurEffect = CanvasHelper.CreateForegroundBlurEffect(foregroundFontEffect, blurEffectMask,
|
||||||
_liveStatesService.LiveStates.CurrentLyricsEffectSettings.LyricsGlowEffectAmount);
|
_liveStatesService.LiveStates.LyricsEffectSettings.LyricsGlowEffectAmount);
|
||||||
effectLayerDs.DrawImage(foregroundBlurEffect);
|
effectLayerDs.DrawImage(foregroundBlurEffect);
|
||||||
}
|
}
|
||||||
var highlightEffectMask = CanvasHelper.GetAlphaMask(control, charMask, lineStartToCharMask, lineMask,
|
if (_liveStatesService.LiveStates.LyricsEffectSettings.LyricsHighlightAmount != 0)
|
||||||
_liveStatesService.LiveStates.CurrentLyricsEffectSettings.LyricsHighlightScope);
|
{
|
||||||
using var foregroundHighlightEffect = CanvasHelper.CreateForegroundHighlightEffect(foregroundFontEffect, highlightEffectMask);
|
var highlightEffectMask = CanvasHelper.GetAlphaMask(control, charMask, lineStartToCharMask, lineMask,
|
||||||
effectLayerDs.DrawImage(foregroundHighlightEffect);
|
_liveStatesService.LiveStates.LyricsEffectSettings.LyricsHighlightScope);
|
||||||
|
using var foregroundHighlightEffect = CanvasHelper.CreateForegroundHighlightEffect(foregroundFontEffect, highlightEffectMask,
|
||||||
|
_liveStatesService.LiveStates.LyricsEffectSettings.LyricsHighlightAmount / 100.0);
|
||||||
|
effectLayerDs.DrawImage(foregroundHighlightEffect);
|
||||||
|
}
|
||||||
|
|
||||||
combinedDs.DrawImage(new OpacityEffect
|
combinedDs.DrawImage(new OpacityEffect
|
||||||
{
|
{
|
||||||
@@ -286,7 +295,7 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
|
|
||||||
if (i == _playingLineIndex)
|
if (i == _playingLineIndex)
|
||||||
{
|
{
|
||||||
if (_liveStatesService.LiveStates.CurrentLyricsEffectSettings.IsLyricsFloatAnimationEnabled)
|
if (_liveStatesService.LiveStates.LyricsEffectSettings.IsLyricsFloatAnimationEnabled)
|
||||||
{
|
{
|
||||||
ds.DrawImage(new DisplacementMapEffect
|
ds.DrawImage(new DisplacementMapEffect
|
||||||
{
|
{
|
||||||
@@ -294,7 +303,7 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
Displacement = lineStartToCharMask,
|
Displacement = lineStartToCharMask,
|
||||||
XChannelSelect = EffectChannelSelect.Red,
|
XChannelSelect = EffectChannelSelect.Red,
|
||||||
YChannelSelect = EffectChannelSelect.Alpha,
|
YChannelSelect = EffectChannelSelect.Alpha,
|
||||||
Amount = _liveStatesService.LiveStates.CurrentLyricsEffectSettings.LyricsFloatAmount,
|
Amount = _liveStatesService.LiveStates.LyricsEffectSettings.LyricsFloatAmount,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -73,6 +73,13 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
UpdateIsLastFMTrackEnabled();
|
UpdateIsLastFMTrackEnabled();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (message.Sender is LyricsStyleSettings)
|
||||||
|
{
|
||||||
|
if (message.PropertyName == nameof(LyricsStyleSettings.IsDynamicLyricsFontSize))
|
||||||
|
{
|
||||||
|
_isLayoutChanged = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Receive(PropertyChangedMessage<Color> message)
|
public void Receive(PropertyChangedMessage<Color> message)
|
||||||
@@ -126,6 +133,10 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
{
|
{
|
||||||
_isAlbumArtShadowAmountChanged = true;
|
_isAlbumArtShadowAmountChanged = true;
|
||||||
}
|
}
|
||||||
|
else if (message.PropertyName == nameof(AlbumArtLayoutSettings.SongInfoFontSize))
|
||||||
|
{
|
||||||
|
UpdateSongInfoFontSize();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (message.Sender is LyricsBackgroundSettings)
|
else if (message.Sender is LyricsBackgroundSettings)
|
||||||
{
|
{
|
||||||
@@ -167,6 +178,14 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
{
|
{
|
||||||
_isLayoutChanged = true;
|
_isLayoutChanged = true;
|
||||||
}
|
}
|
||||||
|
else if (message.PropertyName == nameof(LyricsEffectSettings.LyricsScrollTopDelay))
|
||||||
|
{
|
||||||
|
_isLayoutChanged = true;
|
||||||
|
}
|
||||||
|
else if (message.PropertyName == nameof(LyricsEffectSettings.LyricsScrollBottomDelay))
|
||||||
|
{
|
||||||
|
_isLayoutChanged = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (message.Sender is LyricsStyleSettings)
|
else if (message.Sender is LyricsStyleSettings)
|
||||||
{
|
{
|
||||||
@@ -234,7 +253,7 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
{
|
{
|
||||||
if (message.Sender is LiveStates)
|
if (message.Sender is LiveStates)
|
||||||
{
|
{
|
||||||
if (message.PropertyName == nameof(LiveStates.CurrentLyricsDisplayType))
|
if (message.PropertyName == nameof(LiveStates.LyricsDisplayType))
|
||||||
{
|
{
|
||||||
_isDisplayTypeChanged = true;
|
_isDisplayTypeChanged = true;
|
||||||
}
|
}
|
||||||
@@ -308,7 +327,7 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
{
|
{
|
||||||
if (message.Sender is LiveStates)
|
if (message.Sender is LiveStates)
|
||||||
{
|
{
|
||||||
if (message.PropertyName == nameof(LiveStates.CurrentLyricsWindowMode))
|
if (message.PropertyName == nameof(LiveStates.LyricsWindowMode))
|
||||||
{
|
{
|
||||||
UpdateColorConfig();
|
UpdateColorConfig();
|
||||||
UpdateImmersiveBackgroundOpacity();
|
UpdateImmersiveBackgroundOpacity();
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
|
|
||||||
if (_isCanvasWidthChanged)
|
if (_isCanvasWidthChanged)
|
||||||
{
|
{
|
||||||
if (_canvasWidth < 450)
|
if (_canvasWidth < 500)
|
||||||
{
|
{
|
||||||
_lyricsLayoutOrientation = LyricsLayoutOrientation.Vertical;
|
_lyricsLayoutOrientation = LyricsLayoutOrientation.Vertical;
|
||||||
}
|
}
|
||||||
@@ -119,7 +119,7 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
_albumArtYTransition.StartTransition((_canvasHeight - _albumArtSize * 1.05 - _titleTextFormat.FontSize - _artistTextFormat.FontSize) / 2.0, jumpTo);
|
_albumArtYTransition.StartTransition((_canvasHeight - _albumArtSize * 1.05 - _titleTextFormat.FontSize - _artistTextFormat.FontSize) / 2.0, jumpTo);
|
||||||
_titleYTransition.StartTransition(_albumArtYTransition.TargetValue + _albumArtSize * 1.05, jumpTo);
|
_titleYTransition.StartTransition(_albumArtYTransition.TargetValue + _albumArtSize * 1.05, jumpTo);
|
||||||
_lyricsYTransition.StartTransition(0, jumpTo);
|
_lyricsYTransition.StartTransition(0, jumpTo);
|
||||||
switch (_liveStatesService.LiveStates.CurrentLyricsDisplayType)
|
switch (_liveStatesService.LiveStates.LyricsDisplayType)
|
||||||
{
|
{
|
||||||
case LyricsDisplayType.AlbumArtOnly:
|
case LyricsDisplayType.AlbumArtOnly:
|
||||||
_lyricsOpacityTransition.StartTransition(0f, jumpTo);
|
_lyricsOpacityTransition.StartTransition(0f, jumpTo);
|
||||||
@@ -148,7 +148,7 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
_lyricsXTransition.StartTransition(_leftMargin, jumpTo);
|
_lyricsXTransition.StartTransition(_leftMargin, jumpTo);
|
||||||
_albumArtXTransition.StartTransition(_leftMargin, jumpTo);
|
_albumArtXTransition.StartTransition(_leftMargin, jumpTo);
|
||||||
_titleXTransition.StartTransition(_leftMargin + _albumArtSize * 1.2, jumpTo);
|
_titleXTransition.StartTransition(_leftMargin + _albumArtSize * 1.2, jumpTo);
|
||||||
switch (_liveStatesService.LiveStates.CurrentLyricsDisplayType)
|
switch (_liveStatesService.LiveStates.LyricsDisplayType)
|
||||||
{
|
{
|
||||||
case LyricsDisplayType.AlbumArtOnly:
|
case LyricsDisplayType.AlbumArtOnly:
|
||||||
_lyricsOpacityTransition.StartTransition(0f, jumpTo);
|
_lyricsOpacityTransition.StartTransition(0f, jumpTo);
|
||||||
@@ -326,12 +326,19 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
if (control == null)
|
if (control == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_lyricsTextFormat.FontSize = _liveStatesService.LiveStates.CurrentLyricsStyleSettings.LyricsFontSize;
|
if (_liveStatesService.LiveStates.LyricsStyleSettings.IsDynamicLyricsFontSize)
|
||||||
_lyricsTextFormat.FontWeight = _liveStatesService.LiveStates.CurrentLyricsStyleSettings.LyricsFontWeight.ToFontWeight();
|
{
|
||||||
_lyricsTextFormat.FontFamily = _artistTextFormat.FontFamily = _titleTextFormat.FontFamily = _liveStatesService.LiveStates.CurrentLyricsStyleSettings.LyricsFontFamily;
|
_lyricsTextFormat.FontSize = (float)Math.Clamp(Math.Min(_canvasHeight, _canvasWidth) / 10, 12, 72);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_lyricsTextFormat.FontSize = _liveStatesService.LiveStates.LyricsStyleSettings.LyricsFontSize;
|
||||||
|
}
|
||||||
|
_lyricsTextFormat.FontWeight = _liveStatesService.LiveStates.LyricsStyleSettings.LyricsFontWeight.ToFontWeight();
|
||||||
|
_lyricsTextFormat.FontFamily = _artistTextFormat.FontFamily = _titleTextFormat.FontFamily = _liveStatesService.LiveStates.LyricsStyleSettings.LyricsFontFamily;
|
||||||
|
|
||||||
_canvasYScrollTransition.SetDuration(_liveStatesService.LiveStates.CurrentLyricsEffectSettings.LyricsScrollDuration / 1000.0);
|
_canvasYScrollTransition.SetDuration(_liveStatesService.LiveStates.LyricsEffectSettings.LyricsScrollDuration / 1000.0);
|
||||||
_canvasYScrollTransition.SetEasingType(_liveStatesService.LiveStates.CurrentLyricsEffectSettings.LyricsScrollEasingType);
|
_canvasYScrollTransition.SetEasingType(_liveStatesService.LiveStates.LyricsEffectSettings.LyricsScrollEasingType);
|
||||||
|
|
||||||
double y = 0;
|
double y = 0;
|
||||||
|
|
||||||
@@ -346,15 +353,15 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
line.Position = new Vector2(0, (float)y);
|
line.Position = new Vector2(0, (float)y);
|
||||||
line.RecreateTextLayout(control, _lyricsTextFormat, _maxLyricsWidth, _canvasHeight, _liveStatesService.LiveStates.CurrentLyricsStyleSettings.LyricsAlignmentType);
|
line.RecreateTextLayout(control, _lyricsTextFormat, _maxLyricsWidth, _canvasHeight, _liveStatesService.LiveStates.LyricsStyleSettings.LyricsAlignmentType);
|
||||||
line.UpdateCenterPosition(_maxLyricsWidth, _liveStatesService.LiveStates.CurrentLyricsStyleSettings.LyricsAlignmentType);
|
line.UpdateCenterPosition(_maxLyricsWidth, _liveStatesService.LiveStates.LyricsStyleSettings.LyricsAlignmentType);
|
||||||
|
|
||||||
line.RecreateTextGeometry();
|
line.RecreateTextGeometry();
|
||||||
|
|
||||||
y +=
|
y +=
|
||||||
(double)line.CanvasTextLayout!.LayoutBounds.Height
|
(double)line.CanvasTextLayout!.LayoutBounds.Height
|
||||||
/ line.CanvasTextLayout.LineCount
|
/ line.CanvasTextLayout.LineCount
|
||||||
* (line.CanvasTextLayout.LineCount + _liveStatesService.LiveStates.CurrentLyricsStyleSettings.LyricsLineSpacingFactor);
|
* (line.CanvasTextLayout.LineCount + _liveStatesService.LiveStates.LyricsStyleSettings.LyricsLineSpacingFactor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -451,8 +458,8 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
|
|
||||||
private void UpdateColorConfig()
|
private void UpdateColorConfig()
|
||||||
{
|
{
|
||||||
if (_liveStatesService.LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.DesktopMode ||
|
if (_liveStatesService.LiveStates.LyricsWindowMode == LyricsWindowMode.DesktopMode ||
|
||||||
_liveStatesService.LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.DockMode)
|
_liveStatesService.LiveStates.LyricsWindowMode == LyricsWindowMode.DockMode)
|
||||||
{
|
{
|
||||||
ThemeTypeSent = Helper.ColorHelper.GetElementThemeFromBackgroundColor(_environmentalColor);
|
ThemeTypeSent = Helper.ColorHelper.GetElementThemeFromBackgroundColor(_environmentalColor);
|
||||||
}
|
}
|
||||||
@@ -488,8 +495,8 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
|
|
||||||
_lyricsBgBrightnessTransition.StartTransition(brightness);
|
_lyricsBgBrightnessTransition.StartTransition(brightness);
|
||||||
|
|
||||||
if (_liveStatesService.LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.DockMode ||
|
if (_liveStatesService.LiveStates.LyricsWindowMode == LyricsWindowMode.DockMode ||
|
||||||
_liveStatesService.LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.DesktopMode)
|
_liveStatesService.LiveStates.LyricsWindowMode == LyricsWindowMode.DesktopMode)
|
||||||
{
|
{
|
||||||
_adaptiveColoredFontColor = Helper.ColorHelper.GetForegroundColor(_environmentalColor);
|
_adaptiveColoredFontColor = Helper.ColorHelper.GetForegroundColor(_environmentalColor);
|
||||||
}
|
}
|
||||||
@@ -505,7 +512,7 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (_liveStatesService.LiveStates.CurrentLyricsStyleSettings.LyricsBgFontColorType)
|
switch (_liveStatesService.LiveStates.LyricsStyleSettings.LyricsBgFontColorType)
|
||||||
{
|
{
|
||||||
case LyricsFontColorType.AdaptiveGrayed:
|
case LyricsFontColorType.AdaptiveGrayed:
|
||||||
_bgFontColor = _adaptiveGrayedFontColor;
|
_bgFontColor = _adaptiveGrayedFontColor;
|
||||||
@@ -514,13 +521,13 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
_bgFontColor = _adaptiveColoredFontColor ?? _adaptiveGrayedFontColor;
|
_bgFontColor = _adaptiveColoredFontColor ?? _adaptiveGrayedFontColor;
|
||||||
break;
|
break;
|
||||||
case LyricsFontColorType.Custom:
|
case LyricsFontColorType.Custom:
|
||||||
_bgFontColor = _liveStatesService.LiveStates.CurrentLyricsStyleSettings.LyricsCustomBgFontColor;
|
_bgFontColor = _liveStatesService.LiveStates.LyricsStyleSettings.LyricsCustomBgFontColor;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (_liveStatesService.LiveStates.CurrentLyricsStyleSettings.LyricsFgFontColorType)
|
switch (_liveStatesService.LiveStates.LyricsStyleSettings.LyricsFgFontColorType)
|
||||||
{
|
{
|
||||||
case LyricsFontColorType.AdaptiveGrayed:
|
case LyricsFontColorType.AdaptiveGrayed:
|
||||||
_fgFontColor = _adaptiveGrayedFontColor;
|
_fgFontColor = _adaptiveGrayedFontColor;
|
||||||
@@ -529,13 +536,13 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
_fgFontColor = _adaptiveColoredFontColor ?? _adaptiveGrayedFontColor;
|
_fgFontColor = _adaptiveColoredFontColor ?? _adaptiveGrayedFontColor;
|
||||||
break;
|
break;
|
||||||
case LyricsFontColorType.Custom:
|
case LyricsFontColorType.Custom:
|
||||||
_fgFontColor = _liveStatesService.LiveStates.CurrentLyricsStyleSettings.LyricsCustomFgFontColor;
|
_fgFontColor = _liveStatesService.LiveStates.LyricsStyleSettings.LyricsCustomFgFontColor;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (_liveStatesService.LiveStates.CurrentLyricsStyleSettings.LyricsStrokeFontColorType)
|
switch (_liveStatesService.LiveStates.LyricsStyleSettings.LyricsStrokeFontColorType)
|
||||||
{
|
{
|
||||||
case LyricsFontColorType.AdaptiveGrayed:
|
case LyricsFontColorType.AdaptiveGrayed:
|
||||||
_strokeFontColor = _grayedEnvironmentalColor.WithBrightness(0.7);
|
_strokeFontColor = _grayedEnvironmentalColor.WithBrightness(0.7);
|
||||||
@@ -544,7 +551,7 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
_strokeFontColor = _environmentalColor.WithBrightness(0.7);
|
_strokeFontColor = _environmentalColor.WithBrightness(0.7);
|
||||||
break;
|
break;
|
||||||
case LyricsFontColorType.Custom:
|
case LyricsFontColorType.Custom:
|
||||||
_strokeFontColor = _liveStatesService.LiveStates.CurrentLyricsStyleSettings.LyricsCustomStrokeFontColor;
|
_strokeFontColor = _liveStatesService.LiveStates.LyricsStyleSettings.LyricsCustomStrokeFontColor;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -572,7 +579,7 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
double distanceFromPlayingLine = Math.Abs(line.Position.Y - currentPlayingLine.Position.Y);
|
double distanceFromPlayingLine = Math.Abs(line.Position.Y - currentPlayingLine.Position.Y);
|
||||||
double distanceFactor = Math.Clamp(distanceFromPlayingLine / (_canvasHeight / 2), 0, 1);
|
double distanceFactor = Math.Clamp(distanceFromPlayingLine / (_canvasHeight / 2), 0, 1);
|
||||||
|
|
||||||
line.AngleTransition.StartTransition(_liveStatesService.LiveStates.CurrentLyricsEffectSettings.IsFanLyricsEnabled
|
line.AngleTransition.StartTransition(_liveStatesService.LiveStates.LyricsEffectSettings.IsFanLyricsEnabled
|
||||||
? Math.PI
|
? Math.PI
|
||||||
* (30.0 / 180.0)
|
* (30.0 / 180.0)
|
||||||
* distanceFactor
|
* distanceFactor
|
||||||
@@ -580,34 +587,40 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
: 0
|
: 0
|
||||||
);
|
);
|
||||||
|
|
||||||
line.BlurAmountTransition.StartTransition(_liveStatesService.LiveStates.CurrentLyricsEffectSettings.LyricsBlurAmount * distanceFactor);
|
line.BlurAmountTransition.StartTransition(_liveStatesService.LiveStates.LyricsEffectSettings.LyricsBlurAmount * distanceFactor);
|
||||||
line.ScaleTransition.StartTransition(_highlightedScale - distanceFactor * (_highlightedScale - _defaultScale));
|
line.ScaleTransition.StartTransition(_highlightedScale - distanceFactor * (_highlightedScale - _defaultScale));
|
||||||
line.OpacityTransition.StartTransition(
|
line.OpacityTransition.StartTransition(
|
||||||
_liveStatesService.LiveStates.CurrentLyricsStyleSettings.LyricsBgFontOpacity / 100.0 -
|
_liveStatesService.LiveStates.LyricsStyleSettings.LyricsBgFontOpacity / 100.0 -
|
||||||
distanceFactor * _liveStatesService.LiveStates.CurrentLyricsStyleSettings.LyricsBgFontOpacity / 100.0 *
|
distanceFactor * _liveStatesService.LiveStates.LyricsStyleSettings.LyricsBgFontOpacity / 100.0 *
|
||||||
(1 - _liveStatesService.LiveStates.CurrentLyricsEffectSettings.LyricsVerticalEdgeOpacity / 100.0));
|
(1 - _liveStatesService.LiveStates.LyricsEffectSettings.LyricsVerticalEdgeOpacity / 100.0));
|
||||||
line.HighlightOpacityTransition.StartTransition(i == _playingLineIndex ? 1f : 0f);
|
line.HighlightOpacityTransition.StartTransition(i == _playingLineIndex ? 1f : 0f);
|
||||||
|
|
||||||
double yScrollDuration;
|
double yScrollDuration;
|
||||||
|
double yScrollDelay;
|
||||||
|
|
||||||
if (lineCountDelta < 0)
|
if (lineCountDelta < 0)
|
||||||
{
|
{
|
||||||
yScrollDuration =
|
yScrollDuration =
|
||||||
_canvasYScrollTransition.DurationSeconds +
|
_canvasYScrollTransition.DurationSeconds +
|
||||||
distanceFactor * (_liveStatesService.LiveStates.CurrentLyricsEffectSettings.LyricsScrollTopDuration / 1000.0 - _canvasYScrollTransition.DurationSeconds);
|
distanceFactor * (_liveStatesService.LiveStates.LyricsEffectSettings.LyricsScrollTopDuration / 1000.0 - _canvasYScrollTransition.DurationSeconds);
|
||||||
|
yScrollDelay = distanceFactor * _liveStatesService.LiveStates.LyricsEffectSettings.LyricsScrollTopDelay / 1000.0;
|
||||||
}
|
}
|
||||||
else if (lineCountDelta == 0)
|
else if (lineCountDelta == 0)
|
||||||
{
|
{
|
||||||
yScrollDuration = _canvasYScrollTransition.DurationSeconds;
|
yScrollDuration = _canvasYScrollTransition.DurationSeconds;
|
||||||
|
yScrollDelay = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
yScrollDuration =
|
yScrollDuration =
|
||||||
_canvasYScrollTransition.DurationSeconds +
|
_canvasYScrollTransition.DurationSeconds +
|
||||||
distanceFactor * (_liveStatesService.LiveStates.CurrentLyricsEffectSettings.LyricsScrollBottomDuration / 1000.0 - _canvasYScrollTransition.DurationSeconds);
|
distanceFactor * (_liveStatesService.LiveStates.LyricsEffectSettings.LyricsScrollBottomDuration / 1000.0 - _canvasYScrollTransition.DurationSeconds);
|
||||||
|
yScrollDelay = distanceFactor * _liveStatesService.LiveStates.LyricsEffectSettings.LyricsScrollBottomDelay / 1000.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
line.YOffsetTransition.SetEasingType(_canvasYScrollTransition.EasingType ?? EasingType.Linear);
|
line.YOffsetTransition.SetEasingType(_canvasYScrollTransition.EasingType ?? EasingType.Linear);
|
||||||
line.YOffsetTransition.SetDuration(yScrollDuration);
|
line.YOffsetTransition.SetDuration(yScrollDuration);
|
||||||
|
line.YOffsetTransition.SetDelay(yScrollDelay);
|
||||||
line.YOffsetTransition.StartTransition(_canvasTargetYScrollOffset, _isLayoutChanged);
|
line.YOffsetTransition.StartTransition(_canvasTargetYScrollOffset, _isLayoutChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -623,7 +636,7 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
private void UpdateImmersiveBackgroundOpacity()
|
private void UpdateImmersiveBackgroundOpacity()
|
||||||
{
|
{
|
||||||
double targetOpacity;
|
double targetOpacity;
|
||||||
if (_liveStatesService.LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.DesktopMode)
|
if (_liveStatesService.LiveStates.LyricsWindowMode == LyricsWindowMode.DesktopMode)
|
||||||
{
|
{
|
||||||
if (_isLyricsWindowLocked)
|
if (_isLyricsWindowLocked)
|
||||||
{
|
{
|
||||||
@@ -667,7 +680,8 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
|
|
||||||
private void UpdateTimelineSyncThreshold()
|
private void UpdateTimelineSyncThreshold()
|
||||||
{
|
{
|
||||||
_timelineSyncThreshold = _mediaSessionsService.GetCurrentMediaSourceProviderInfo()?.TimelineSyncThreshold ?? 0;
|
var current = _mediaSessionsService.GetCurrentMediaSourceProviderInfo();
|
||||||
|
_timelineSyncThreshold = current?.TimelineSyncThreshold ?? 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdatePositionOffset()
|
private void UpdatePositionOffset()
|
||||||
@@ -681,5 +695,11 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
var current = _mediaSessionsService.GetCurrentMediaSourceProviderInfo();
|
var current = _mediaSessionsService.GetCurrentMediaSourceProviderInfo();
|
||||||
_isLastFMTrackEnabled = current?.IsLastFMTrackEnabled ?? false;
|
_isLastFMTrackEnabled = current?.IsLastFMTrackEnabled ?? false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void UpdateSongInfoFontSize()
|
||||||
|
{
|
||||||
|
_titleTextFormat.FontSize = _settingsService.AppSettings.AlbumArtLayoutSettings.SongInfoFontSize;
|
||||||
|
_artistTextFormat.FontSize = _settingsService.AppSettings.AlbumArtLayoutSettings.SongInfoFontSize - 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,6 +190,8 @@ namespace BetterLyrics.WinUI3.ViewModels.LyricsRendererViewModel
|
|||||||
AppSettings = _settingsService.AppSettings;
|
AppSettings = _settingsService.AppSettings;
|
||||||
|
|
||||||
_titleTextFormat.HorizontalAlignment = _artistTextFormat.HorizontalAlignment = _settingsService.AppSettings.AlbumArtLayoutSettings.SongInfoAlignmentType.ToCanvasHorizontalAlignment();
|
_titleTextFormat.HorizontalAlignment = _artistTextFormat.HorizontalAlignment = _settingsService.AppSettings.AlbumArtLayoutSettings.SongInfoAlignmentType.ToCanvasHorizontalAlignment();
|
||||||
|
UpdateSongInfoFontSize();
|
||||||
|
|
||||||
|
|
||||||
_timelineSyncThreshold = 0;
|
_timelineSyncThreshold = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,193 @@
|
|||||||
|
using BetterLyrics.WinUI3.Helper;
|
||||||
|
using BetterLyrics.WinUI3.Models;
|
||||||
|
using BetterLyrics.WinUI3.Models.Settings;
|
||||||
|
using BetterLyrics.WinUI3.Services.LyricsSearchService;
|
||||||
|
using BetterLyrics.WinUI3.Services.MediaSessionsService;
|
||||||
|
using BetterLyrics.WinUI3.Services.SettingsService;
|
||||||
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
using CommunityToolkit.Mvvm.DependencyInjection;
|
||||||
|
using CommunityToolkit.Mvvm.Input;
|
||||||
|
using CommunityToolkit.Mvvm.Messaging;
|
||||||
|
using CommunityToolkit.Mvvm.Messaging.Messages;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace BetterLyrics.WinUI3.ViewModels
|
||||||
|
{
|
||||||
|
public partial class LyricsSearchControlViewModel : BaseViewModel
|
||||||
|
{
|
||||||
|
private readonly ILyricsSearchService _lyricsSearchService;
|
||||||
|
private readonly IMediaSessionsService _mediaSessionsService;
|
||||||
|
private readonly ISettingsService _settingsService;
|
||||||
|
|
||||||
|
private LatestOnlyTaskRunner _lyricsSearchRunner = new();
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
public partial AppSettings AppSettings { get; set; }
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
public partial ObservableCollection<LyricsSearchResult> LyricsSearchResults { get; set; } = [];
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
public partial LyricsSearchResult? SelectedLyricsSearchResult { get; set; }
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
public partial LyricsData? LyricsData { get; set; }
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
public partial LyricsLine? SelectedLyricsLine { get; set; }
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
public partial MappedSongSearchQuery? MappedSongSearchQuery { get; set; }
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
public partial bool IsSearching { get; set; } = false;
|
||||||
|
|
||||||
|
public LyricsSearchControlViewModel(ILyricsSearchService lyricsSearchService, IMediaSessionsService mediaSessionsService, ISettingsService settingsService)
|
||||||
|
{
|
||||||
|
_lyricsSearchService = lyricsSearchService;
|
||||||
|
_mediaSessionsService = mediaSessionsService;
|
||||||
|
_settingsService = settingsService;
|
||||||
|
|
||||||
|
AppSettings = _settingsService.AppSettings;
|
||||||
|
|
||||||
|
_mediaSessionsService.SongInfoChanged += MediaSessionsService_SongInfoChanged;
|
||||||
|
|
||||||
|
InitMappedSongSearchQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MediaSessionsService_SongInfoChanged(object? sender, Events.SongInfoChangedEventArgs e)
|
||||||
|
{
|
||||||
|
InitMappedSongSearchQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitMappedSongSearchQuery()
|
||||||
|
{
|
||||||
|
LyricsSearchResults.Clear();
|
||||||
|
LyricsData = null;
|
||||||
|
if (_mediaSessionsService.SongInfo != null)
|
||||||
|
{
|
||||||
|
var found = GetMappedSongSearchQueryFromSettings();
|
||||||
|
if (found == null)
|
||||||
|
{
|
||||||
|
MappedSongSearchQuery = new MappedSongSearchQuery
|
||||||
|
{
|
||||||
|
OriginalTitle = _mediaSessionsService.SongInfo.Title,
|
||||||
|
OriginalArtist = _mediaSessionsService.SongInfo.Artist,
|
||||||
|
MappedTitle = _mediaSessionsService.SongInfo.Title,
|
||||||
|
MappedArtist = _mediaSessionsService.SongInfo.Artist,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MappedSongSearchQuery = found.Clone();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private MappedSongSearchQuery? GetMappedSongSearchQueryFromSettings()
|
||||||
|
{
|
||||||
|
if (_mediaSessionsService.SongInfo == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
var found = AppSettings.MappedSongSearchQueries
|
||||||
|
.Where(x => x.OriginalTitle == _mediaSessionsService.SongInfo.Title && x.OriginalArtist == _mediaSessionsService.SongInfo.Artist).FirstOrDefault();
|
||||||
|
return found;
|
||||||
|
}
|
||||||
|
|
||||||
|
[RelayCommand]
|
||||||
|
private void Search()
|
||||||
|
{
|
||||||
|
if (MappedSongSearchQuery == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
IsSearching = true;
|
||||||
|
LyricsSearchResults.Clear();
|
||||||
|
MappedSongSearchQuery.LyricsSearchProvider = null;
|
||||||
|
_ = _lyricsSearchRunner.RunAsync(async (token) =>
|
||||||
|
{
|
||||||
|
LyricsSearchResults = [..await Task.Run(async () =>
|
||||||
|
{
|
||||||
|
return await _lyricsSearchService.SearchAllAsync(
|
||||||
|
MappedSongSearchQuery.MappedTitle,
|
||||||
|
MappedSongSearchQuery.MappedArtist,
|
||||||
|
_mediaSessionsService.SongInfo?.Album ?? "",
|
||||||
|
_mediaSessionsService.SongInfo?.DurationMs ?? 0, token);
|
||||||
|
}, token)];
|
||||||
|
IsSearching = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
[RelayCommand]
|
||||||
|
private void Save()
|
||||||
|
{
|
||||||
|
if (MappedSongSearchQuery == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var existing = GetMappedSongSearchQueryFromSettings();
|
||||||
|
if (existing != null)
|
||||||
|
{
|
||||||
|
AppSettings.MappedSongSearchQueries.Remove(existing);
|
||||||
|
}
|
||||||
|
AppSettings.MappedSongSearchQueries.Add(MappedSongSearchQuery);
|
||||||
|
MappedSongSearchQuery = MappedSongSearchQuery.Clone();
|
||||||
|
}
|
||||||
|
|
||||||
|
[RelayCommand]
|
||||||
|
private void Reset()
|
||||||
|
{
|
||||||
|
var existing = GetMappedSongSearchQueryFromSettings();
|
||||||
|
if (existing != null)
|
||||||
|
{
|
||||||
|
AppSettings.MappedSongSearchQueries.Remove(existing);
|
||||||
|
}
|
||||||
|
InitMappedSongSearchQuery();
|
||||||
|
SelectedLyricsSearchResult = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
[RelayCommand]
|
||||||
|
private void ResetMappedTitle()
|
||||||
|
{
|
||||||
|
MappedSongSearchQuery?.MappedTitle = MappedSongSearchQuery?.OriginalTitle ?? string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
[RelayCommand]
|
||||||
|
private void ResetMappedArtist()
|
||||||
|
{
|
||||||
|
MappedSongSearchQuery?.MappedArtist = MappedSongSearchQuery?.OriginalArtist ?? string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
partial void OnSelectedLyricsSearchResultChanged(LyricsSearchResult? value)
|
||||||
|
{
|
||||||
|
MappedSongSearchQuery?.LyricsSearchProvider = value?.Provider;
|
||||||
|
if (value?.Raw != null)
|
||||||
|
{
|
||||||
|
var lyricsParser = new LyricsParser();
|
||||||
|
var lyricsDataArr = lyricsParser.Parse(value?.Raw, (int?)_mediaSessionsService.SongInfo?.DurationMs);
|
||||||
|
LyricsData = lyricsDataArr.FirstOrDefault();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LyricsData = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
partial void OnSelectedLyricsLineChanged(LyricsLine? value)
|
||||||
|
{
|
||||||
|
if (value?.StartMs == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_mediaSessionsService.ChangePosition(value.StartMs / 1000.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -105,14 +105,16 @@ namespace BetterLyrics.WinUI3
|
|||||||
[NotifyPropertyChangedRecipients]
|
[NotifyPropertyChangedRecipients]
|
||||||
public partial bool IsMouseWithinWindow { get; set; } = false;
|
public partial bool IsMouseWithinWindow { get; set; } = false;
|
||||||
|
|
||||||
[ObservableProperty] public partial Visibility AOTFlyoutItemVisibility { get; set; } = Visibility.Visible;
|
|
||||||
[ObservableProperty] public partial Visibility FullScreenFlyoutItemVisibility { get; set; } = Visibility.Visible;
|
[ObservableProperty] public partial Visibility FullScreenFlyoutItemVisibility { get; set; } = Visibility.Visible;
|
||||||
[ObservableProperty] public partial Visibility LockButtonVisibility { get; set; } = Visibility.Visible;
|
[ObservableProperty] public partial Visibility LockButtonVisibility { get; set; } = Visibility.Visible;
|
||||||
[ObservableProperty] public partial Visibility DesktopFlyoutItemVisibility { get; set; } = Visibility.Visible;
|
[ObservableProperty] public partial Visibility DesktopFlyoutItemVisibility { get; set; } = Visibility.Visible;
|
||||||
[ObservableProperty] public partial Visibility PIPFlyoutItemVisibility { get; set; } = Visibility.Visible;
|
[ObservableProperty] public partial Visibility PIPFlyoutItemVisibility { get; set; } = Visibility.Visible;
|
||||||
[ObservableProperty] public partial Visibility DockFlyoutItemVisibility { get; set; } = Visibility.Visible;
|
[ObservableProperty] public partial Visibility DockFlyoutItemVisibility { get; set; } = Visibility.Visible;
|
||||||
|
[ObservableProperty] public partial Visibility MinimiseButtonVisibility { get; set; } = Visibility.Visible;
|
||||||
|
[ObservableProperty] public partial Visibility MaximiseButtonVisibility { get; set; } = Visibility.Visible;
|
||||||
|
[ObservableProperty] public partial Visibility RestoreButtonVisibility { get; set; } = Visibility.Visible;
|
||||||
|
[ObservableProperty] public partial Visibility CloseButtonVisibility { get; set; } = Visibility.Visible;
|
||||||
|
|
||||||
[ObservableProperty] public partial bool IsAOTFlyoutItemChecked { get; set; } = false;
|
|
||||||
[ObservableProperty] public partial bool IsFullScreenFlyoutItemChecked { get; set; } = false;
|
[ObservableProperty] public partial bool IsFullScreenFlyoutItemChecked { get; set; } = false;
|
||||||
[ObservableProperty] public partial bool IsDesktopFlyoutItemChecked { get; set; } = false;
|
[ObservableProperty] public partial bool IsDesktopFlyoutItemChecked { get; set; } = false;
|
||||||
[ObservableProperty] public partial bool IsPIPFlyoutItemChecked { get; set; } = false;
|
[ObservableProperty] public partial bool IsPIPFlyoutItemChecked { get; set; } = false;
|
||||||
@@ -126,11 +128,11 @@ namespace BetterLyrics.WinUI3
|
|||||||
|
|
||||||
var hwnd = WindowNative.GetWindowHandle(window);
|
var hwnd = WindowNative.GetWindowHandle(window);
|
||||||
|
|
||||||
if (LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.DockMode || LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.DesktopMode)
|
if (LiveStates.LyricsWindowMode == LyricsWindowMode.DockMode || LiveStates.LyricsWindowMode == LyricsWindowMode.DesktopMode)
|
||||||
{
|
{
|
||||||
if (_hideWindowWhenNotPlaying && !_mediaSessionsService.IsPlaying)
|
if (_hideWindowWhenNotPlaying && !_mediaSessionsService.IsPlaying)
|
||||||
{
|
{
|
||||||
if (LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.DockMode)
|
if (LiveStates.LyricsWindowMode == LyricsWindowMode.DockMode)
|
||||||
{
|
{
|
||||||
DockModeHelper.UpdateAppBarHeight(hwnd, _dockMonitorDeviceName, 0, _dockPlacement);
|
DockModeHelper.UpdateAppBarHeight(hwnd, _dockMonitorDeviceName, 0, _dockPlacement);
|
||||||
}
|
}
|
||||||
@@ -138,7 +140,7 @@ namespace BetterLyrics.WinUI3
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.DockMode)
|
if (LiveStates.LyricsWindowMode == LyricsWindowMode.DockMode)
|
||||||
{
|
{
|
||||||
DockModeHelper.UpdateAppBarHeight(hwnd, _dockMonitorDeviceName, _dockWindowHeight, _dockPlacement);
|
DockModeHelper.UpdateAppBarHeight(hwnd, _dockMonitorDeviceName, _dockWindowHeight, _dockPlacement);
|
||||||
}
|
}
|
||||||
@@ -176,6 +178,7 @@ namespace BetterLyrics.WinUI3
|
|||||||
if (message.PropertyName == nameof(GeneralSettings.IgnoreFullscreenWindow))
|
if (message.PropertyName == nameof(GeneralSettings.IgnoreFullscreenWindow))
|
||||||
{
|
{
|
||||||
_ignoreFullscreenWindow = message.NewValue;
|
_ignoreFullscreenWindow = message.NewValue;
|
||||||
|
SetIsAlwaysOnTop();
|
||||||
}
|
}
|
||||||
else if (message.PropertyName == nameof(GeneralSettings.HideWindowWhenNotPlaying))
|
else if (message.PropertyName == nameof(GeneralSettings.HideWindowWhenNotPlaying))
|
||||||
{
|
{
|
||||||
@@ -183,6 +186,13 @@ namespace BetterLyrics.WinUI3
|
|||||||
UpdateDockOrDesktopWindow();
|
UpdateDockOrDesktopWindow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (message.Sender is LiveStates)
|
||||||
|
{
|
||||||
|
if (message.PropertyName == nameof(LiveStates.IsAlwaysOnTop))
|
||||||
|
{
|
||||||
|
SetIsAlwaysOnTop();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Receive(PropertyChangedMessage<ElementTheme> message)
|
public void Receive(PropertyChangedMessage<ElementTheme> message)
|
||||||
@@ -210,20 +220,40 @@ namespace BetterLyrics.WinUI3
|
|||||||
|
|
||||||
public void InitShortcuts()
|
public void InitShortcuts()
|
||||||
{
|
{
|
||||||
UpdateDesktopLockShortcut();
|
UpdateDesktopLockUnlockShortcut();
|
||||||
UpdateDesktopToggleShortcut();
|
UpdateDesktopToggleShortcut();
|
||||||
UpdateDockToggleShortcut();
|
UpdateDockToggleShortcut();
|
||||||
UpdatePictureInPictureToggleShortcut();
|
UpdatePictureInPictureToggleShortcut();
|
||||||
|
UpdateLyricsWindowShowHideShortcut();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateDesktopLockShortcut()
|
private void UpdateLyricsWindowShowHideShortcut()
|
||||||
{
|
{
|
||||||
GlobalHotKeyHelper.UnregisterHotKey<LyricsWindow>(ShortcutID.DesktopLock);
|
GlobalHotKeyHelper.UpdateHotKey<LyricsWindow>(ShortcutID.LyricsWindowShowOrHide,
|
||||||
GlobalHotKeyHelper.RegisterHotKey<LyricsWindow>(ShortcutID.DesktopLock,
|
_settingsService.AppSettings.GeneralSettings.ShowOrHideLyricsWindowShortcut,
|
||||||
|
() =>
|
||||||
|
{
|
||||||
|
var window = WindowHelper.GetWindowByWindowType<LyricsWindow>();
|
||||||
|
if (window == null) return;
|
||||||
|
if (window.Visible)
|
||||||
|
{
|
||||||
|
window.Hide();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WindowHelper.OpenWindow<LyricsWindow>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateDesktopLockUnlockShortcut()
|
||||||
|
{
|
||||||
|
GlobalHotKeyHelper.UpdateHotKey<LyricsWindow>(ShortcutID.DesktopLockOrUnlock,
|
||||||
_settingsService.AppSettings.DesktopModeSettings.LockShortcut,
|
_settingsService.AppSettings.DesktopModeSettings.LockShortcut,
|
||||||
() =>
|
() =>
|
||||||
{
|
{
|
||||||
if (LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.DesktopMode)
|
if (LiveStates.LyricsWindowMode == LyricsWindowMode.DesktopMode)
|
||||||
{
|
{
|
||||||
ToggleLockWindow();
|
ToggleLockWindow();
|
||||||
}
|
}
|
||||||
@@ -233,13 +263,12 @@ namespace BetterLyrics.WinUI3
|
|||||||
|
|
||||||
private void UpdateDesktopToggleShortcut()
|
private void UpdateDesktopToggleShortcut()
|
||||||
{
|
{
|
||||||
GlobalHotKeyHelper.UnregisterHotKey<LyricsWindow>(ShortcutID.DesktopToggle);
|
GlobalHotKeyHelper.UpdateHotKey<LyricsWindow>(ShortcutID.DesktopToggle,
|
||||||
GlobalHotKeyHelper.RegisterHotKey<LyricsWindow>(ShortcutID.DesktopToggle,
|
|
||||||
_settingsService.AppSettings.DesktopModeSettings.ToggleShortcut,
|
_settingsService.AppSettings.DesktopModeSettings.ToggleShortcut,
|
||||||
() =>
|
() =>
|
||||||
{
|
{
|
||||||
if (LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.DesktopMode ||
|
if (LiveStates.LyricsWindowMode == LyricsWindowMode.DesktopMode ||
|
||||||
LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.StandardMode)
|
LiveStates.LyricsWindowMode == LyricsWindowMode.StandardMode)
|
||||||
{
|
{
|
||||||
ToggleDesktopMode();
|
ToggleDesktopMode();
|
||||||
}
|
}
|
||||||
@@ -249,13 +278,12 @@ namespace BetterLyrics.WinUI3
|
|||||||
|
|
||||||
private void UpdateDockToggleShortcut()
|
private void UpdateDockToggleShortcut()
|
||||||
{
|
{
|
||||||
GlobalHotKeyHelper.UnregisterHotKey<LyricsWindow>(ShortcutID.DockToggle);
|
GlobalHotKeyHelper.UpdateHotKey<LyricsWindow>(ShortcutID.DockToggle,
|
||||||
GlobalHotKeyHelper.RegisterHotKey<LyricsWindow>(ShortcutID.DockToggle,
|
|
||||||
_settingsService.AppSettings.DockModeSettings.ToggleShortcut,
|
_settingsService.AppSettings.DockModeSettings.ToggleShortcut,
|
||||||
() =>
|
() =>
|
||||||
{
|
{
|
||||||
if (LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.DockMode ||
|
if (LiveStates.LyricsWindowMode == LyricsWindowMode.DockMode ||
|
||||||
LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.StandardMode)
|
LiveStates.LyricsWindowMode == LyricsWindowMode.StandardMode)
|
||||||
{
|
{
|
||||||
ToggleDockMode();
|
ToggleDockMode();
|
||||||
}
|
}
|
||||||
@@ -265,13 +293,12 @@ namespace BetterLyrics.WinUI3
|
|||||||
|
|
||||||
private void UpdatePictureInPictureToggleShortcut()
|
private void UpdatePictureInPictureToggleShortcut()
|
||||||
{
|
{
|
||||||
GlobalHotKeyHelper.UnregisterHotKey<LyricsWindow>(ShortcutID.PictureInPictureToggle);
|
GlobalHotKeyHelper.UpdateHotKey<LyricsWindow>(ShortcutID.PictureInPictureToggle,
|
||||||
GlobalHotKeyHelper.RegisterHotKey<LyricsWindow>(ShortcutID.PictureInPictureToggle,
|
|
||||||
_settingsService.AppSettings.PictureInPictureModeSettings.ToggleShortcut,
|
_settingsService.AppSettings.PictureInPictureModeSettings.ToggleShortcut,
|
||||||
() =>
|
() =>
|
||||||
{
|
{
|
||||||
if (LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.PictureInPictureMode ||
|
if (LiveStates.LyricsWindowMode == LyricsWindowMode.PictureInPictureMode ||
|
||||||
LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.StandardMode)
|
LiveStates.LyricsWindowMode == LyricsWindowMode.StandardMode)
|
||||||
{
|
{
|
||||||
TogglePictureInPictureMode();
|
TogglePictureInPictureMode();
|
||||||
}
|
}
|
||||||
@@ -281,14 +308,18 @@ namespace BetterLyrics.WinUI3
|
|||||||
|
|
||||||
private void SetFullscreenTitleBarControlsStatus()
|
private void SetFullscreenTitleBarControlsStatus()
|
||||||
{
|
{
|
||||||
AOTFlyoutItemVisibility = LockButtonVisibility = DesktopFlyoutItemVisibility = PIPFlyoutItemVisibility = DockFlyoutItemVisibility = Visibility.Collapsed;
|
LockButtonVisibility = DesktopFlyoutItemVisibility = PIPFlyoutItemVisibility = DockFlyoutItemVisibility = Visibility.Collapsed;
|
||||||
|
MinimiseButtonVisibility = MaximiseButtonVisibility = RestoreButtonVisibility = Visibility.Collapsed;
|
||||||
|
CloseButtonVisibility = Visibility.Visible;
|
||||||
IsFullScreenFlyoutItemChecked = true;
|
IsFullScreenFlyoutItemChecked = true;
|
||||||
IsImmersiveMode = true;
|
IsImmersiveMode = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetPIPModeTitleBarControlsStatus()
|
private void SetPIPModeTitleBarControlsStatus()
|
||||||
{
|
{
|
||||||
AOTFlyoutItemVisibility = DesktopFlyoutItemVisibility = FullScreenFlyoutItemVisibility = DockFlyoutItemVisibility = LockButtonVisibility = Visibility.Collapsed;
|
DesktopFlyoutItemVisibility = FullScreenFlyoutItemVisibility = DockFlyoutItemVisibility = LockButtonVisibility = Visibility.Collapsed;
|
||||||
|
MinimiseButtonVisibility = MaximiseButtonVisibility = RestoreButtonVisibility = Visibility.Collapsed;
|
||||||
|
CloseButtonVisibility = Visibility.Visible;
|
||||||
IsImmersiveMode = true;
|
IsImmersiveMode = true;
|
||||||
IsPIPFlyoutItemChecked = true;
|
IsPIPFlyoutItemChecked = true;
|
||||||
}
|
}
|
||||||
@@ -300,7 +331,9 @@ namespace BetterLyrics.WinUI3
|
|||||||
var overlappedPresenter = (OverlappedPresenter)window.AppWindow.Presenter;
|
var overlappedPresenter = (OverlappedPresenter)window.AppWindow.Presenter;
|
||||||
|
|
||||||
overlappedPresenter.IsMinimizable = overlappedPresenter.IsMaximizable = false;
|
overlappedPresenter.IsMinimizable = overlappedPresenter.IsMaximizable = false;
|
||||||
AOTFlyoutItemVisibility = DesktopFlyoutItemVisibility = LockButtonVisibility = FullScreenFlyoutItemVisibility = PIPFlyoutItemVisibility = Visibility.Collapsed;
|
DesktopFlyoutItemVisibility = LockButtonVisibility = FullScreenFlyoutItemVisibility = PIPFlyoutItemVisibility = Visibility.Collapsed;
|
||||||
|
MinimiseButtonVisibility = MaximiseButtonVisibility = RestoreButtonVisibility = Visibility.Collapsed;
|
||||||
|
CloseButtonVisibility = Visibility.Visible;
|
||||||
IsImmersiveMode = true;
|
IsImmersiveMode = true;
|
||||||
IsDockFlyoutItemChecked = true;
|
IsDockFlyoutItemChecked = true;
|
||||||
}
|
}
|
||||||
@@ -312,8 +345,10 @@ namespace BetterLyrics.WinUI3
|
|||||||
var overlappedPresenter = (OverlappedPresenter)window.AppWindow.Presenter;
|
var overlappedPresenter = (OverlappedPresenter)window.AppWindow.Presenter;
|
||||||
|
|
||||||
overlappedPresenter.IsMinimizable = overlappedPresenter.IsMaximizable = false;
|
overlappedPresenter.IsMinimizable = overlappedPresenter.IsMaximizable = false;
|
||||||
DockFlyoutItemVisibility = AOTFlyoutItemVisibility = FullScreenFlyoutItemVisibility = PIPFlyoutItemVisibility = Visibility.Collapsed;
|
DockFlyoutItemVisibility = FullScreenFlyoutItemVisibility = PIPFlyoutItemVisibility = Visibility.Collapsed;
|
||||||
LockButtonVisibility = Visibility.Visible;
|
LockButtonVisibility = Visibility.Visible;
|
||||||
|
MinimiseButtonVisibility = MaximiseButtonVisibility = RestoreButtonVisibility = Visibility.Collapsed;
|
||||||
|
CloseButtonVisibility = Visibility.Visible;
|
||||||
IsDesktopFlyoutItemChecked = true;
|
IsDesktopFlyoutItemChecked = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -324,10 +359,11 @@ namespace BetterLyrics.WinUI3
|
|||||||
var overlappedPresenter = (OverlappedPresenter)window.AppWindow.Presenter;
|
var overlappedPresenter = (OverlappedPresenter)window.AppWindow.Presenter;
|
||||||
|
|
||||||
overlappedPresenter.IsMinimizable = overlappedPresenter.IsMaximizable = true;
|
overlappedPresenter.IsMinimizable = overlappedPresenter.IsMaximizable = true;
|
||||||
AOTFlyoutItemVisibility = DesktopFlyoutItemVisibility = DockFlyoutItemVisibility = PIPFlyoutItemVisibility = FullScreenFlyoutItemVisibility = Visibility.Visible;
|
DesktopFlyoutItemVisibility = DockFlyoutItemVisibility = PIPFlyoutItemVisibility = FullScreenFlyoutItemVisibility = Visibility.Visible;
|
||||||
LockButtonVisibility = Visibility.Collapsed;
|
LockButtonVisibility = Visibility.Collapsed;
|
||||||
|
MinimiseButtonVisibility = MaximiseButtonVisibility = CloseButtonVisibility = Visibility.Visible;
|
||||||
|
RestoreButtonVisibility = Visibility.Collapsed;
|
||||||
IsFullScreenFlyoutItemChecked = IsDesktopFlyoutItemChecked = IsDockFlyoutItemChecked = IsPIPFlyoutItemChecked = false;
|
IsFullScreenFlyoutItemChecked = IsDesktopFlyoutItemChecked = IsDockFlyoutItemChecked = IsPIPFlyoutItemChecked = false;
|
||||||
IsAOTFlyoutItemChecked = overlappedPresenter.IsAlwaysOnTop;
|
|
||||||
IsImmersiveMode = _settingsService.AppSettings.GeneralSettings.IsImmersiveMode;
|
IsImmersiveMode = _settingsService.AppSettings.GeneralSettings.IsImmersiveMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -343,7 +379,7 @@ namespace BetterLyrics.WinUI3
|
|||||||
{
|
{
|
||||||
_dispatcherQueueTimer.Debounce(() =>
|
_dispatcherQueueTimer.Debounce(() =>
|
||||||
{
|
{
|
||||||
if ((LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.DockMode || LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.DesktopMode) && _ignoreFullscreenWindow && window.AppWindow.Presenter is OverlappedPresenter presenter)
|
if ((LiveStates.LyricsWindowMode == LyricsWindowMode.DockMode || LiveStates.LyricsWindowMode == LyricsWindowMode.DesktopMode) && _ignoreFullscreenWindow && window.AppWindow.Presenter is OverlappedPresenter presenter)
|
||||||
{
|
{
|
||||||
presenter.IsAlwaysOnTop = true;
|
presenter.IsAlwaysOnTop = true;
|
||||||
}
|
}
|
||||||
@@ -363,7 +399,7 @@ namespace BetterLyrics.WinUI3
|
|||||||
|
|
||||||
public void UpdateAccentColor(nint hwnd)
|
public void UpdateAccentColor(nint hwnd)
|
||||||
{
|
{
|
||||||
WindowPixelSampleMode mode = LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.DesktopMode ? WindowPixelSampleMode.WindowEdge : _dockPlacement.ToWindowPixelSampleMode();
|
WindowPixelSampleMode mode = LiveStates.LyricsWindowMode == LyricsWindowMode.DesktopMode ? WindowPixelSampleMode.WindowEdge : _dockPlacement.ToWindowPixelSampleMode();
|
||||||
ActivatedWindowAccentColor = ColorHelper.GetAccentColor(hwnd, _settingsService.AppSettings.DockModeSettings.DockMonitorDeviceName, mode).ToColor();
|
ActivatedWindowAccentColor = ColorHelper.GetAccentColor(hwnd, _settingsService.AppSettings.DockModeSettings.DockMonitorDeviceName, mode).ToColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -409,7 +445,7 @@ namespace BetterLyrics.WinUI3
|
|||||||
StopWatchWindowColorChange();
|
StopWatchWindowColorChange();
|
||||||
|
|
||||||
LiveStates.ToggleLyricsWindowMode(LyricsWindowMode.DesktopMode);
|
LiveStates.ToggleLyricsWindowMode(LyricsWindowMode.DesktopMode);
|
||||||
if (LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.DesktopMode)
|
if (LiveStates.LyricsWindowMode == LyricsWindowMode.DesktopMode)
|
||||||
{
|
{
|
||||||
DesktopModeHelper.Enable(window);
|
DesktopModeHelper.Enable(window);
|
||||||
StartWatchWindowColorChange();
|
StartWatchWindowColorChange();
|
||||||
@@ -428,6 +464,7 @@ namespace BetterLyrics.WinUI3
|
|||||||
DesktopModeHelper.Disable(window);
|
DesktopModeHelper.Disable(window);
|
||||||
SetStandardModeTitleBarControlsStatus();
|
SetStandardModeTitleBarControlsStatus();
|
||||||
}
|
}
|
||||||
|
SetIsAlwaysOnTop();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ToggleDockMode()
|
public void ToggleDockMode()
|
||||||
@@ -438,7 +475,7 @@ namespace BetterLyrics.WinUI3
|
|||||||
StopWatchWindowColorChange();
|
StopWatchWindowColorChange();
|
||||||
|
|
||||||
LiveStates.ToggleLyricsWindowMode(LyricsWindowMode.DockMode);
|
LiveStates.ToggleLyricsWindowMode(LyricsWindowMode.DockMode);
|
||||||
if (LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.DockMode)
|
if (LiveStates.LyricsWindowMode == LyricsWindowMode.DockMode)
|
||||||
{
|
{
|
||||||
window.Restore();
|
window.Restore();
|
||||||
DockModeHelper.Enable(window, _dockMonitorDeviceName, _dockWindowHeight, _dockPlacement);
|
DockModeHelper.Enable(window, _dockMonitorDeviceName, _dockWindowHeight, _dockPlacement);
|
||||||
@@ -452,6 +489,7 @@ namespace BetterLyrics.WinUI3
|
|||||||
}
|
}
|
||||||
|
|
||||||
UpdateDockOrDesktopWindow();
|
UpdateDockOrDesktopWindow();
|
||||||
|
SetIsAlwaysOnTop();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TogglePictureInPictureMode()
|
public void TogglePictureInPictureMode()
|
||||||
@@ -460,9 +498,10 @@ namespace BetterLyrics.WinUI3
|
|||||||
if (window == null) return;
|
if (window == null) return;
|
||||||
|
|
||||||
LiveStates.ToggleLyricsWindowMode(LyricsWindowMode.PictureInPictureMode);
|
LiveStates.ToggleLyricsWindowMode(LyricsWindowMode.PictureInPictureMode);
|
||||||
if (LiveStates.CurrentLyricsWindowMode == LyricsWindowMode.PictureInPictureMode)
|
if (LiveStates.LyricsWindowMode == LyricsWindowMode.PictureInPictureMode)
|
||||||
{
|
{
|
||||||
window.AppWindow.SetPresenter(AppWindowPresenterKind.CompactOverlay);
|
window.AppWindow.SetPresenter(AppWindowPresenterKind.CompactOverlay);
|
||||||
|
window.AppWindow.Move(AppSettings.PictureInPictureModeSettings.WindowPosition.ToPointInt32());
|
||||||
SetPIPModeTitleBarControlsStatus();
|
SetPIPModeTitleBarControlsStatus();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -470,17 +509,17 @@ namespace BetterLyrics.WinUI3
|
|||||||
window.AppWindow.SetPresenter(AppWindowPresenterKind.Overlapped);
|
window.AppWindow.SetPresenter(AppWindowPresenterKind.Overlapped);
|
||||||
SetStandardModeTitleBarControlsStatus();
|
SetStandardModeTitleBarControlsStatus();
|
||||||
}
|
}
|
||||||
|
SetIsAlwaysOnTop();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ToggleAlwaysOnTop()
|
public void SetIsAlwaysOnTop()
|
||||||
{
|
{
|
||||||
var window = WindowHelper.GetWindowByWindowType<LyricsWindow>();
|
var window = WindowHelper.GetWindowByWindowType<LyricsWindow>();
|
||||||
if (window == null) return;
|
if (window == null) return;
|
||||||
|
|
||||||
if (window.AppWindow.Presenter is OverlappedPresenter presenter)
|
if (window.AppWindow.Presenter is OverlappedPresenter presenter)
|
||||||
{
|
{
|
||||||
presenter.IsAlwaysOnTop = !presenter.IsAlwaysOnTop;
|
presenter.IsAlwaysOnTop = _liveStatesService.LiveStates.IsAlwaysOnTop;
|
||||||
IsAOTFlyoutItemChecked = presenter.IsAlwaysOnTop;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -540,7 +579,7 @@ namespace BetterLyrics.WinUI3
|
|||||||
{
|
{
|
||||||
if (message.PropertyName == nameof(DesktopModeSettings.LockShortcut))
|
if (message.PropertyName == nameof(DesktopModeSettings.LockShortcut))
|
||||||
{
|
{
|
||||||
UpdateDesktopLockShortcut();
|
UpdateDesktopLockUnlockShortcut();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (message.Sender is DockModeSettings)
|
else if (message.Sender is DockModeSettings)
|
||||||
@@ -564,6 +603,13 @@ namespace BetterLyrics.WinUI3
|
|||||||
UpdateDesktopToggleShortcut();
|
UpdateDesktopToggleShortcut();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (message.Sender is GeneralSettings)
|
||||||
|
{
|
||||||
|
if (message.PropertyName == nameof(GeneralSettings.ShowOrHideLyricsWindowShortcut))
|
||||||
|
{
|
||||||
|
UpdateLyricsWindowShowHideShortcut();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,11 @@ namespace BetterLyrics.WinUI3.ViewModels
|
|||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public partial TranslationSearchProvider? TranslationSearchProvider { get; set; } = null;
|
public partial TranslationSearchProvider? TranslationSearchProvider { get; set; } = null;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
public partial int SelectedTargetLanguageIndex { get; set; }
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
public partial string AppleMusicMediaUserToken { get; set; }
|
||||||
|
|
||||||
public PlaybackSettingsControlViewModel(
|
public PlaybackSettingsControlViewModel(
|
||||||
ISettingsService settingsService,
|
ISettingsService settingsService,
|
||||||
@@ -77,6 +81,10 @@ namespace BetterLyrics.WinUI3.ViewModels
|
|||||||
AppSettings = _settingsService.AppSettings;
|
AppSettings = _settingsService.AppSettings;
|
||||||
AppSettings.MediaSourceProvidersInfo.CollectionChanged += MediaSourceProvidersInfo_CollectionChanged;
|
AppSettings.MediaSourceProvidersInfo.CollectionChanged += MediaSourceProvidersInfo_CollectionChanged;
|
||||||
|
|
||||||
|
AppleMusicMediaUserToken = PasswordVaultHelper.Get(Constants.App.AppName, Constants.AppleMusic.MediaUserTokenKey) ?? "";
|
||||||
|
|
||||||
|
SelectedTargetLanguageIndex = LanguageHelper.SupportedTargetLanguages.ToList().FindIndex(x => x.Code == AppSettings.TranslationSettings.SelectedTargetLanguageCode);
|
||||||
|
|
||||||
IsLastFMAuthenticated = _lastFMService.IsAuthenticated;
|
IsLastFMAuthenticated = _lastFMService.IsAuthenticated;
|
||||||
LastFMUser = _lastFMService.User;
|
LastFMUser = _lastFMService.User;
|
||||||
|
|
||||||
@@ -103,7 +111,7 @@ namespace BetterLyrics.WinUI3.ViewModels
|
|||||||
|
|
||||||
private void MediaSessionsService_SongInfoChanged(object? sender, Events.SongInfoChangedEventArgs e)
|
private void MediaSessionsService_SongInfoChanged(object? sender, Events.SongInfoChangedEventArgs e)
|
||||||
{
|
{
|
||||||
var current = AppSettings.MediaSourceProvidersInfo.Where(x => x.Provider == e.SongInfo?.SourceAppUserModelId)?.FirstOrDefault();
|
var current = AppSettings.MediaSourceProvidersInfo.Where(x => x.Provider == e.SongInfo?.PlayerId)?.FirstOrDefault();
|
||||||
if (_mediaSessionsService.Position.TotalSeconds <= 1 && current?.ResetPositionOffsetOnSongChanged == true)
|
if (_mediaSessionsService.Position.TotalSeconds <= 1 && current?.ResetPositionOffsetOnSongChanged == true)
|
||||||
{
|
{
|
||||||
current.PositionOffset = 0;
|
current.PositionOffset = 0;
|
||||||
@@ -123,8 +131,8 @@ namespace BetterLyrics.WinUI3.ViewModels
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string targetLangCode = LanguageHelper.SupportedTargetLanguages[AppSettings.TranslationSettings.SelectedTargetLanguageIndex].Code;
|
string result = await _libreTranslateService.TranslateTextAsync(
|
||||||
string result = await _libreTranslateService.TranslateTextAsync("Hello, world!", targetLangCode, new System.Threading.CancellationToken());
|
"Hello, world!", AppSettings.TranslationSettings.SelectedTargetLanguageCode, new System.Threading.CancellationToken());
|
||||||
_dispatcherQueue.TryEnqueue(DispatcherQueuePriority.Low, () =>
|
_dispatcherQueue.TryEnqueue(DispatcherQueuePriority.Low, () =>
|
||||||
{
|
{
|
||||||
App.Current.SettingsWindowNotificationPanel?.Notify(App.ResourceLoader!.GetString("SettingsPageServerTestSuccessInfo"), InfoBarSeverity.Success);
|
App.Current.SettingsWindowNotificationPanel?.Notify(App.ResourceLoader!.GetString("SettingsPageServerTestSuccessInfo"), InfoBarSeverity.Success);
|
||||||
@@ -184,6 +192,13 @@ namespace BetterLyrics.WinUI3.ViewModels
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[RelayCommand]
|
||||||
|
private void SaveAppleMusicMediaUserToken()
|
||||||
|
{
|
||||||
|
PasswordVaultHelper.Save(Constants.App.AppName, Constants.AppleMusic.MediaUserTokenKey, AppleMusicMediaUserToken);
|
||||||
|
_mediaSessionsService.UpdateLyrics();
|
||||||
|
}
|
||||||
|
|
||||||
public void Receive(PropertyChangedMessage<LyricsSearchProvider?> message)
|
public void Receive(PropertyChangedMessage<LyricsSearchProvider?> message)
|
||||||
{
|
{
|
||||||
if (message.Sender is MediaSessionsService)
|
if (message.Sender is MediaSessionsService)
|
||||||
@@ -205,5 +220,10 @@ namespace BetterLyrics.WinUI3.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
partial void OnSelectedTargetLanguageIndexChanged(int value)
|
||||||
|
{
|
||||||
|
AppSettings.TranslationSettings.SelectedTargetLanguageCode = LanguageHelper.SupportedTargetLanguages[value].Code;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ using Microsoft.UI.Dispatching;
|
|||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Controls;
|
using Microsoft.UI.Xaml.Controls;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -29,6 +30,7 @@ namespace BetterLyrics.WinUI3.ViewModels
|
|||||||
public partial class SettingsPageViewModel : BaseViewModel
|
public partial class SettingsPageViewModel : BaseViewModel
|
||||||
{
|
{
|
||||||
private readonly ISettingsService _settingsService;
|
private readonly ISettingsService _settingsService;
|
||||||
|
private readonly IMediaSessionsService _mediaSessionsService;
|
||||||
|
|
||||||
public string Version { get; set; } = MetadataHelper.AppVersion;
|
public string Version { get; set; } = MetadataHelper.AppVersion;
|
||||||
|
|
||||||
@@ -42,16 +44,17 @@ namespace BetterLyrics.WinUI3.ViewModels
|
|||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public partial object NavViewSelectedItemTag { get; set; } = "App";
|
public partial object NavViewSelectedItemTag { get; set; } = "App";
|
||||||
|
|
||||||
public SettingsPageViewModel(ISettingsService settingsService)
|
public SettingsPageViewModel(ISettingsService settingsService, IMediaSessionsService mediaSessionsService)
|
||||||
{
|
{
|
||||||
_settingsService = settingsService;
|
_settingsService = settingsService;
|
||||||
|
_mediaSessionsService = mediaSessionsService;
|
||||||
AppSettings = _settingsService.AppSettings;
|
AppSettings = _settingsService.AppSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
private async Task LaunchProjectGitHubPageAsync()
|
private async Task LaunchProjectGitHubPageAsync()
|
||||||
{
|
{
|
||||||
await Windows.System.Launcher.LaunchUriAsync(new Uri(Constants.Link.GithubUrl));
|
await Windows.System.Launcher.LaunchUriAsync(new Uri(Constants.Link.GitHubUrl));
|
||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
@@ -80,14 +83,17 @@ namespace BetterLyrics.WinUI3.ViewModels
|
|||||||
|
|
||||||
var file = await picker.PickSingleFileAsync();
|
var file = await picker.PickSingleFileAsync();
|
||||||
|
|
||||||
var succeed = _settingsService.ImportSettings(file.Path);
|
if (file != null)
|
||||||
if (succeed)
|
|
||||||
{
|
{
|
||||||
WindowHelper.RestartApp();
|
var succeed = _settingsService.ImportSettings(file.Path);
|
||||||
}
|
if (succeed)
|
||||||
else
|
{
|
||||||
{
|
WindowHelper.RestartApp();
|
||||||
App.Current.SettingsWindowNotificationPanel?.Notify(App.ResourceLoader?.GetString("ImportSettingsFailed") ?? "");
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
App.Current.SettingsWindowNotificationPanel?.Notify(App.ResourceLoader?.GetString("ImportSettingsFailed") ?? "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,8 @@
|
|||||||
x:Uid="MainPageNoMusicPlaying"
|
x:Uid="MainPageNoMusicPlaying"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
FontFamily="{x:Bind ViewModel.LiveStates.CurrentLyricsStyleSettings.LyricsFontFamily, Mode=OneWay}"
|
FontFamily="{x:Bind ViewModel.LiveStates.LyricsStyleSettings.LyricsFontFamily, Mode=OneWay}"
|
||||||
FontSize="{x:Bind ViewModel.LiveStates.CurrentLyricsStyleSettings.LyricsFontSize, Mode=OneWay}" />
|
FontSize="{x:Bind ViewModel.LiveStates.LyricsStyleSettings.LyricsFontSize, Mode=OneWay}" />
|
||||||
<Grid.OpacityTransition>
|
<Grid.OpacityTransition>
|
||||||
<ScalarTransition />
|
<ScalarTransition />
|
||||||
</Grid.OpacityTransition>
|
</Grid.OpacityTransition>
|
||||||
@@ -237,7 +237,17 @@
|
|||||||
</Button.ContextFlyout>
|
</Button.ContextFlyout>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<!-- Lyrics & Translation -->
|
<Button
|
||||||
|
Click="LyricsSearchShortcutButton_Click"
|
||||||
|
Content="{ui:FontIcon FontFamily={StaticResource IconFontFamily},
|
||||||
|
Glyph=}"
|
||||||
|
Style="{StaticResource GhostButtonStyle}">
|
||||||
|
<ToolTipService.ToolTip>
|
||||||
|
<ToolTip x:Uid="LyricsPageLyricsSearchButtonToolTip" />
|
||||||
|
</ToolTipService.ToolTip>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<!-- Playback shortcut settings -->
|
||||||
<Button
|
<Button
|
||||||
Click="PlaybackSettingsShortcutButton_Click"
|
Click="PlaybackSettingsShortcutButton_Click"
|
||||||
Content="{ui:FontIcon FontFamily={StaticResource IconFontFamily},
|
Content="{ui:FontIcon FontFamily={StaticResource IconFontFamily},
|
||||||
@@ -279,9 +289,40 @@
|
|||||||
Maximum="{x:Bind ViewModel.SongDurationSeconds, Mode=OneWay}"
|
Maximum="{x:Bind ViewModel.SongDurationSeconds, Mode=OneWay}"
|
||||||
Minimum="0"
|
Minimum="0"
|
||||||
Style="{StaticResource GhostSliderStyle}"
|
Style="{StaticResource GhostSliderStyle}"
|
||||||
Tapped="TimelineSliderOverlay_Tapped"
|
|
||||||
ThumbToolTipValueConverter="{StaticResource SecondsToFormattedTimeConverter}"
|
ThumbToolTipValueConverter="{StaticResource SecondsToFormattedTimeConverter}"
|
||||||
Value="{x:Bind ViewModel.TimelinePositionSeconds, Mode=OneWay}" />
|
Value="{x:Bind ViewModel.TimelinePositionSeconds, Mode=OneWay}" />
|
||||||
|
<Grid
|
||||||
|
x:Name="TimelineSliderLyricsLineInfo"
|
||||||
|
Margin="0,-48,0,0"
|
||||||
|
Padding="8,4"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
Background="{ThemeResource SolidBackgroundFillColorQuarternaryBrush}"
|
||||||
|
CornerRadius="6"
|
||||||
|
Opacity="{x:Bind ViewModel.TimelineSliderThumbOpacity, Mode=OneWay}">
|
||||||
|
<Grid.OpacityTransition>
|
||||||
|
<ScalarTransition />
|
||||||
|
</Grid.OpacityTransition>
|
||||||
|
<Grid.TranslationTransition>
|
||||||
|
<Vector3Transition />
|
||||||
|
</Grid.TranslationTransition>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="6">
|
||||||
|
<TextBlock
|
||||||
|
Margin="0,0,0,2"
|
||||||
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||||
|
Text="{x:Bind ViewModel.TimelineSliderThumbLyricsLine.StartMs, Converter={StaticResource MillisecondsToFormattedTimeConverter}, Mode=OneWay}" />
|
||||||
|
<TextBlock Margin="0,0,0,2" Text="{x:Bind ViewModel.TimelineSliderThumbLyricsLine.DisplayedText, Mode=OneWay}" />
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
<Grid
|
||||||
|
Height="32"
|
||||||
|
Margin="0,-32,0,0"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
Background="Transparent"
|
||||||
|
PointerEntered="TimelineSliderOverlay_PointerEntered"
|
||||||
|
PointerExited="TimelineSliderOverlay_PointerExited"
|
||||||
|
PointerMoved="TimelineSliderOverlay_PointerMoved"
|
||||||
|
PointerPressed="TimelineSliderOverlay_PointerPressed" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -315,7 +356,7 @@
|
|||||||
<Flyout x:Name="BottomCommandFlyout" ShouldConstrainToRootBounds="False">
|
<Flyout x:Name="BottomCommandFlyout" ShouldConstrainToRootBounds="False">
|
||||||
<Flyout.FlyoutPresenterStyle>
|
<Flyout.FlyoutPresenterStyle>
|
||||||
<Style TargetType="FlyoutPresenter">
|
<Style TargetType="FlyoutPresenter">
|
||||||
<Setter Property="MinWidth" Value="450" />
|
<Setter Property="MinWidth" Value="500" />
|
||||||
<Setter Property="MinHeight" Value="100" />
|
<Setter Property="MinHeight" Value="100" />
|
||||||
<Setter Property="CornerRadius" Value="12" />
|
<Setter Property="CornerRadius" Value="12" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
using BetterLyrics.WinUI3.Controls;
|
using BetterLyrics.WinUI3.Controls;
|
||||||
using BetterLyrics.WinUI3.Enums;
|
using BetterLyrics.WinUI3.Enums;
|
||||||
|
using BetterLyrics.WinUI3.Helper;
|
||||||
using BetterLyrics.WinUI3.Models.Settings;
|
using BetterLyrics.WinUI3.Models.Settings;
|
||||||
using BetterLyrics.WinUI3.Services.MediaSessionsService;
|
using BetterLyrics.WinUI3.Services.MediaSessionsService;
|
||||||
using BetterLyrics.WinUI3.Services.SettingsService;
|
using BetterLyrics.WinUI3.Services.SettingsService;
|
||||||
@@ -10,6 +11,7 @@ using CommunityToolkit.Mvvm.DependencyInjection;
|
|||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Controls;
|
using Microsoft.UI.Xaml.Controls;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -60,7 +62,7 @@ namespace BetterLyrics.WinUI3.Views
|
|||||||
|
|
||||||
private void RootGrid_SizeChanged(object sender, SizeChangedEventArgs e)
|
private void RootGrid_SizeChanged(object sender, SizeChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.NewSize.Width < 450 || e.NewSize.Height < 100)
|
if (e.NewSize.Width < 500 || e.NewSize.Height < 100)
|
||||||
{
|
{
|
||||||
if (BottomCommandGrid.Children.Count != 0)
|
if (BottomCommandGrid.Children.Count != 0)
|
||||||
{
|
{
|
||||||
@@ -110,11 +112,6 @@ namespace BetterLyrics.WinUI3.Views
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TimelineSliderOverlay_Tapped(object sender, Microsoft.UI.Xaml.Input.TappedRoutedEventArgs e)
|
|
||||||
{
|
|
||||||
_mediaSessionsService.ChangePosition(TimelineSlider.Value);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void PlaybackSettingsFlyout_Closed(object sender, object e)
|
private void PlaybackSettingsFlyout_Closed(object sender, object e)
|
||||||
{
|
{
|
||||||
PlaybackSettingsFlyout.Content = null;
|
PlaybackSettingsFlyout.Content = null;
|
||||||
@@ -134,5 +131,46 @@ namespace BetterLyrics.WinUI3.Views
|
|||||||
};
|
};
|
||||||
LyricsSettingsFlyout.ShowAt(BottomRightCommandStackPanel);
|
LyricsSettingsFlyout.ShowAt(BottomRightCommandStackPanel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void LyricsSearchShortcutButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
WindowHelper.OpenWindow<LyricsSearchWindow>();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TimelineSliderOverlay_PointerPressed(object sender, Microsoft.UI.Xaml.Input.PointerRoutedEventArgs e)
|
||||||
|
{
|
||||||
|
var grid = (Grid)sender;
|
||||||
|
var pos = e.GetCurrentPoint(grid).Position;
|
||||||
|
var ratio = pos.X / grid.ActualWidth;
|
||||||
|
_mediaSessionsService.ChangePosition(TimelineSlider.Maximum * ratio);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TimelineSliderOverlay_PointerMoved(object sender, Microsoft.UI.Xaml.Input.PointerRoutedEventArgs e)
|
||||||
|
{
|
||||||
|
float targetX;
|
||||||
|
var grid = (Grid)sender;
|
||||||
|
var pos = e.GetCurrentPoint(grid).Position;
|
||||||
|
var ratio = pos.X / grid.ActualWidth;
|
||||||
|
ViewModel.TimelineSliderThumbSeconds = TimelineSlider.Maximum * ratio;
|
||||||
|
if (pos.X + TimelineSliderLyricsLineInfo.ActualWidth > grid.ActualWidth)
|
||||||
|
{
|
||||||
|
targetX = (float)(grid.ActualWidth - TimelineSliderLyricsLineInfo.ActualWidth);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
targetX = (float)pos.X;
|
||||||
|
}
|
||||||
|
TimelineSliderLyricsLineInfo.Translation = new Vector3(targetX, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TimelineSliderOverlay_PointerEntered(object sender, Microsoft.UI.Xaml.Input.PointerRoutedEventArgs e)
|
||||||
|
{
|
||||||
|
ViewModel.TimelineSliderThumbOpacity = 0.7f;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TimelineSliderOverlay_PointerExited(object sender, Microsoft.UI.Xaml.Input.PointerRoutedEventArgs e)
|
||||||
|
{
|
||||||
|
ViewModel.TimelineSliderThumbOpacity = 0f;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<Window
|
||||||
|
x:Class="BetterLyrics.WinUI3.Views.LyricsSearchWindow"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:controls="using:BetterLyrics.WinUI3.Controls"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="using:BetterLyrics.WinUI3.Views"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:media="using:CommunityToolkit.WinUI.Media"
|
||||||
|
mc:Ignorable="d">
|
||||||
|
|
||||||
|
<Grid Background="{ThemeResource SystemControlAcrylicWindowBrush}" Opacity="0.85">
|
||||||
|
<controls:LyricsSearchControl />
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
||||||