mirror of
https://github.com/jayfunc/BetterLyrics.git
synced 2026-01-12 10:54:55 +08:00
Compare commits
8 Commits
3ef9d81bea
...
a13bb6e8e4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a13bb6e8e4 | ||
|
|
0b436c1ea9 | ||
|
|
5d332fdfc6 | ||
|
|
572d2cd8ba | ||
|
|
1e5a95c55e | ||
|
|
18ce6d3a57 | ||
|
|
427aed6857 | ||
|
|
ebfa484a2e |
@@ -12,7 +12,7 @@
|
|||||||
<Identity
|
<Identity
|
||||||
Name="37412.BetterLyrics"
|
Name="37412.BetterLyrics"
|
||||||
Publisher="CN=E1428B0E-DC1D-4EA4-ACB1-4556569D5BA9"
|
Publisher="CN=E1428B0E-DC1D-4EA4-ACB1-4556569D5BA9"
|
||||||
Version="1.2.238.0" />
|
Version="1.2.243.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"/>
|
||||||
|
|
||||||
|
|||||||
@@ -260,6 +260,7 @@ namespace BetterLyrics.WinUI3
|
|||||||
{
|
{
|
||||||
Log.Logger = new LoggerConfiguration()
|
Log.Logger = new LoggerConfiguration()
|
||||||
.MinimumLevel.Is(Serilog.Events.LogEventLevel.Verbose)
|
.MinimumLevel.Is(Serilog.Events.LogEventLevel.Verbose)
|
||||||
|
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", Serilog.Events.LogEventLevel.Error)
|
||||||
.WriteTo.File(PathHelper.LogFilePattern, rollingInterval: RollingInterval.Day)
|
.WriteTo.File(PathHelper.LogFilePattern, rollingInterval: RollingInterval.Day)
|
||||||
.CreateLogger();
|
.CreateLogger();
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 593 KiB |
@@ -42,6 +42,7 @@
|
|||||||
<None Remove="Controls\LyricsWindowSwitchControl.xaml" />
|
<None Remove="Controls\LyricsWindowSwitchControl.xaml" />
|
||||||
<None Remove="Controls\MediaSettingsControl.xaml" />
|
<None Remove="Controls\MediaSettingsControl.xaml" />
|
||||||
<None Remove="Controls\NowPlayingBar.xaml" />
|
<None Remove="Controls\NowPlayingBar.xaml" />
|
||||||
|
<None Remove="Controls\PatronControl.xaml" />
|
||||||
<None Remove="Controls\PlaybackSettingsControl.xaml" />
|
<None Remove="Controls\PlaybackSettingsControl.xaml" />
|
||||||
<None Remove="Controls\PlayQueue.xaml" />
|
<None Remove="Controls\PlayQueue.xaml" />
|
||||||
<None Remove="Controls\PropertyRow.xaml" />
|
<None Remove="Controls\PropertyRow.xaml" />
|
||||||
@@ -246,6 +247,9 @@
|
|||||||
<Content Update="Assets\Question.png">
|
<Content Update="Assets\Question.png">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Update="Assets\RevolvingHearts.gif">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Content Update="Assets\SaltPlayerForWindows.png">
|
<Content Update="Assets\SaltPlayerForWindows.png">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
@@ -262,6 +266,11 @@
|
|||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Page Update="Controls\PatronControl.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Page Update="Styles\GhostSliderStyle.xaml">
|
<Page Update="Styles\GhostSliderStyle.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
|||||||
@@ -57,12 +57,12 @@
|
|||||||
|
|
||||||
<dev:SettingsCard HorizontalContentAlignment="Left" ContentAlignment="Left">
|
<dev:SettingsCard HorizontalContentAlignment="Left" ContentAlignment="Left">
|
||||||
<StackPanel Spacing="6">
|
<StackPanel Spacing="6">
|
||||||
<StackPanel Margin="-12,0,0,0" Orientation="Horizontal">
|
<dev:WrapPanel Margin="-12,0,0,0" Orientation="Horizontal">
|
||||||
<HyperlinkButton Content="GitHub" NavigateUri="{x:Bind const:Link.BetterLyricsGitHub}" />
|
<HyperlinkButton Content="GitHub" NavigateUri="{x:Bind const:Link.BetterLyricsGitHub}" />
|
||||||
<HyperlinkButton x:Uid="UserGuide" NavigateUri="{x:Bind const:Link.UserGuide}" />
|
<HyperlinkButton x:Uid="UserGuide" NavigateUri="{x:Bind const:Link.UserGuide}" />
|
||||||
<HyperlinkButton x:Uid="PrivacyPolicy" NavigateUri="{x:Bind const:Link.PrivacyPolicy}" />
|
<HyperlinkButton x:Uid="PrivacyPolicy" NavigateUri="{x:Bind const:Link.PrivacyPolicy}" />
|
||||||
<HyperlinkButton x:Uid="TermsOfService" NavigateUri="{x:Bind const:Link.TermsOfService}" />
|
<HyperlinkButton x:Uid="TermsOfService" NavigateUri="{x:Bind const:Link.TermsOfService}" />
|
||||||
</StackPanel>
|
</dev:WrapPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</dev:SettingsCard>
|
</dev:SettingsCard>
|
||||||
@@ -70,18 +70,18 @@
|
|||||||
<dev:SettingsCard HorizontalContentAlignment="Left" ContentAlignment="Left">
|
<dev:SettingsCard HorizontalContentAlignment="Left" ContentAlignment="Left">
|
||||||
<StackPanel Spacing="6">
|
<StackPanel Spacing="6">
|
||||||
<TextBlock x:Uid="SetingsPageFeedback" />
|
<TextBlock x:Uid="SetingsPageFeedback" />
|
||||||
<StackPanel Margin="-12,0,0,0" Orientation="Horizontal">
|
<dev:WrapPanel Margin="-12,0,0,0" Orientation="Horizontal">
|
||||||
<HyperlinkButton Content="QQ 反馈交流群" NavigateUri="{x:Bind const:Link.QQGroup}" />
|
<HyperlinkButton Content="QQ 反馈交流群" NavigateUri="{x:Bind const:Link.QQGroup}" />
|
||||||
<HyperlinkButton Content="Discord" NavigateUri="{x:Bind const:Link.Discord}" />
|
<HyperlinkButton Content="Discord" NavigateUri="{x:Bind const:Link.Discord}" />
|
||||||
<HyperlinkButton Content="Telegram" NavigateUri="{x:Bind const:Link.Telegram}" />
|
<HyperlinkButton Content="Telegram" NavigateUri="{x:Bind const:Link.Telegram}" />
|
||||||
</StackPanel>
|
</dev:WrapPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</dev:SettingsCard>
|
</dev:SettingsCard>
|
||||||
|
|
||||||
<dev:SettingsCard HorizontalContentAlignment="Left" ContentAlignment="Left">
|
<dev:SettingsCard HorizontalContentAlignment="Left" ContentAlignment="Left">
|
||||||
<StackPanel Spacing="6">
|
<StackPanel Spacing="6">
|
||||||
<TextBlock x:Uid="SetingsPageDonation" />
|
<TextBlock x:Uid="SetingsPageDonation" />
|
||||||
<StackPanel Margin="-12,0,0,0" Orientation="Horizontal">
|
<dev:WrapPanel Margin="-12,0,0,0" Orientation="Horizontal">
|
||||||
<HyperlinkButton Content="Buy Me a Coffee" NavigateUri="{x:Bind const:Link.BuyMeACoffee}" />
|
<HyperlinkButton Content="Buy Me a Coffee" NavigateUri="{x:Bind const:Link.BuyMeACoffee}" />
|
||||||
<HyperlinkButton Content="PayPal" NavigateUri="{x:Bind const:Link.PayPal}" />
|
<HyperlinkButton Content="PayPal" NavigateUri="{x:Bind const:Link.PayPal}" />
|
||||||
<HyperlinkButton
|
<HyperlinkButton
|
||||||
@@ -117,7 +117,7 @@
|
|||||||
</HyperlinkButton.ContextFlyout>
|
</HyperlinkButton.ContextFlyout>
|
||||||
</HyperlinkButton>
|
</HyperlinkButton>
|
||||||
<HyperlinkButton Content="爱发电" NavigateUri="{x:Bind const:Link.Afdian}" />
|
<HyperlinkButton Content="爱发电" NavigateUri="{x:Bind const:Link.Afdian}" />
|
||||||
</StackPanel>
|
</dev:WrapPanel>
|
||||||
<Grid ColumnSpacing="6">
|
<Grid ColumnSpacing="6">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
@@ -136,15 +136,6 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</dev:SettingsCard>
|
</dev:SettingsCard>
|
||||||
|
|
||||||
<dev:SettingsCard x:Uid="SettingsPageThanksList">
|
|
||||||
<Button
|
|
||||||
Click="Patron_Click"
|
|
||||||
Content="{ui:FontIcon FontSize=16,
|
|
||||||
FontFamily={StaticResource IconFontFamily},
|
|
||||||
Glyph=}"
|
|
||||||
Style="{StaticResource AccentButtonStyle}" />
|
|
||||||
</dev:SettingsCard>
|
|
||||||
|
|
||||||
</dev:SettingsExpander.Items>
|
</dev:SettingsExpander.Items>
|
||||||
<dev:SettingsExpander.ItemsFooter>
|
<dev:SettingsExpander.ItemsFooter>
|
||||||
<InfoBar
|
<InfoBar
|
||||||
@@ -157,6 +148,96 @@
|
|||||||
</dev:SettingsExpander.ItemsFooter>
|
</dev:SettingsExpander.ItemsFooter>
|
||||||
</dev:SettingsExpander>
|
</dev:SettingsExpander>
|
||||||
|
|
||||||
|
<dev:SettingsExpander x:Uid="SettingsPageThanksList">
|
||||||
|
<dev:SettingsExpander.HeaderIcon>
|
||||||
|
<ImageIcon Source="ms-appx:///Assets/RevolvingHearts.gif" />
|
||||||
|
</dev:SettingsExpander.HeaderIcon>
|
||||||
|
<dev:SettingsExpander.Items>
|
||||||
|
|
||||||
|
<!-- 贡献者 -->
|
||||||
|
<dev:SettingsCard HorizontalContentAlignment="Left" ContentAlignment="Left">
|
||||||
|
<StackPanel Spacing="6">
|
||||||
|
<RichTextBlock>
|
||||||
|
<Paragraph>
|
||||||
|
<Run x:Uid="SetingsPageContributors" />
|
||||||
|
<Run Text="(Code)" />
|
||||||
|
</Paragraph>
|
||||||
|
</RichTextBlock>
|
||||||
|
<dev:WrapPanel Margin="-12,0,0,0" Orientation="Horizontal">
|
||||||
|
<HyperlinkButton Content="jayfunc" NavigateUri="https://github.com/jayfunc" />
|
||||||
|
<HyperlinkButton Content="Raspberry-Monster" NavigateUri="https://github.com/Raspberry-Monster" />
|
||||||
|
<HyperlinkButton Content="ZHider" NavigateUri="https://github.com/ZHider" />
|
||||||
|
<HyperlinkButton Content="kusutori" NavigateUri="https://github.com/kusutori" />
|
||||||
|
</dev:WrapPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</dev:SettingsCard>
|
||||||
|
|
||||||
|
<!-- 贡献者 (Translator) -->
|
||||||
|
<dev:SettingsCard HorizontalContentAlignment="Left" ContentAlignment="Left">
|
||||||
|
<StackPanel Spacing="6">
|
||||||
|
<RichTextBlock>
|
||||||
|
<Paragraph>
|
||||||
|
<Run x:Uid="SetingsPageContributors" />
|
||||||
|
<Run Text="(Translator)" />
|
||||||
|
</Paragraph>
|
||||||
|
</RichTextBlock>
|
||||||
|
<dev:WrapPanel Margin="-12,0,0,0" Orientation="Horizontal">
|
||||||
|
<HyperlinkButton Content="borcolasky" NavigateUri="https://crowdin.com/profile/borcolasky" />
|
||||||
|
<HyperlinkButton Content="SuHeAndZl" NavigateUri="https://crowdin.com/profile/SuHeAndZl" />
|
||||||
|
</dev:WrapPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</dev:SettingsCard>
|
||||||
|
|
||||||
|
<!-- 赞助 -->
|
||||||
|
<dev:SettingsCard HorizontalContentAlignment="Left" ContentAlignment="Left">
|
||||||
|
<StackPanel Spacing="6">
|
||||||
|
<TextBlock x:Uid="SettingsPagePatrons" />
|
||||||
|
<dev:WrapPanel Margin="-12,0,0,0" Orientation="Horizontal">
|
||||||
|
<uc:PatronControl Date="Dec 3, 2025" PatronName="YE" />
|
||||||
|
<uc:PatronControl Date="Nov 23, 2025" PatronName="**玄" />
|
||||||
|
<uc:PatronControl Date="Nov 21, 2025" PatronName="**智" />
|
||||||
|
<uc:PatronControl Date="Nov 17, 2025" PatronName="*鹤" />
|
||||||
|
<uc:PatronControl Date="Nov 2, 2025" PatronName="借过" />
|
||||||
|
<uc:PatronControl Date="Aug 28, 2025" PatronName="**华" />
|
||||||
|
<TextBlock x:Uid="SettingsPageUserWhoPurchased" Margin="12,8" />
|
||||||
|
</dev:WrapPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</dev:SettingsCard>
|
||||||
|
|
||||||
|
<!-- 特别鸣谢 -->
|
||||||
|
<dev:SettingsCard HorizontalContentAlignment="Left" ContentAlignment="Left">
|
||||||
|
<StackPanel Spacing="6">
|
||||||
|
<TextBlock x:Uid="SetingsPageSpecialThanks" />
|
||||||
|
<TextBlock x:Uid="SettingsPageYouNowUsing" Margin="0,8" />
|
||||||
|
</StackPanel>
|
||||||
|
</dev:SettingsCard>
|
||||||
|
|
||||||
|
<!-- 代码参考 -->
|
||||||
|
<dev:SettingsCard HorizontalContentAlignment="Left" ContentAlignment="Left">
|
||||||
|
<StackPanel Spacing="6">
|
||||||
|
<TextBlock x:Uid="SetingsPageDeps" />
|
||||||
|
<HyperlinkButton Margin="-12,0,0,0" NavigateUri="https://github.com/jayfunc/BetterLyrics/network/dependencies">
|
||||||
|
<TextBlock x:Uid="SetingsPageDeps" />
|
||||||
|
</HyperlinkButton>
|
||||||
|
</StackPanel>
|
||||||
|
</dev:SettingsCard>
|
||||||
|
|
||||||
|
<!-- UI/UX 参考 -->
|
||||||
|
<dev:SettingsCard HorizontalContentAlignment="Left" ContentAlignment="Left">
|
||||||
|
<StackPanel Spacing="6">
|
||||||
|
<TextBlock x:Uid="SetingsPageUIUXRef" />
|
||||||
|
<dev:WrapPanel Margin="-12,0,0,0" Orientation="Horizontal">
|
||||||
|
<HyperlinkButton Content="refined-now-playing-netease" NavigateUri="https://github.com/solstice23/refined-now-playing-netease" />
|
||||||
|
<HyperlinkButton Content="Lyricify" NavigateUri="https://github.com/WXRIW/Lyricify-App" />
|
||||||
|
<HyperlinkButton Content="椒盐音乐 Salt Player" NavigateUri="https://moriafly.com/program/salt-player" />
|
||||||
|
<HyperlinkButton Content="MyToolBar" NavigateUri="https://github.com/TwilightLemon/MyToolBar" />
|
||||||
|
</dev:WrapPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</dev:SettingsCard>
|
||||||
|
|
||||||
|
</dev:SettingsExpander.Items>
|
||||||
|
</dev:SettingsExpander>
|
||||||
|
|
||||||
<dev:SettingsCard x:Uid="SettingsPageMockMusicPlaying">
|
<dev:SettingsCard x:Uid="SettingsPageMockMusicPlaying">
|
||||||
<HyperlinkButton x:Uid="SettingsPagePlayingMockMusicButton" NavigateUri="https://soundcloud.com/carlyraejepsen/cut-to-the-feeling" />
|
<HyperlinkButton x:Uid="SettingsPagePlayingMockMusicButton" NavigateUri="https://soundcloud.com/carlyraejepsen/cut-to-the-feeling" />
|
||||||
</dev:SettingsCard>
|
</dev:SettingsCard>
|
||||||
@@ -209,194 +290,28 @@
|
|||||||
Value="{x:Bind ViewModel.AppSettings.AdvancedSettings.FPS, Mode=TwoWay}" />
|
Value="{x:Bind ViewModel.AppSettings.AdvancedSettings.FPS, Mode=TwoWay}" />
|
||||||
</dev:SettingsCard>
|
</dev:SettingsCard>
|
||||||
|
|
||||||
|
<RichTextBlock
|
||||||
|
Margin="0,16,0,0"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
HorizontalTextAlignment="Center"
|
||||||
|
LineHeight="28">
|
||||||
|
<Paragraph FontWeight="Bold">
|
||||||
|
<Run Text="{x:Bind const:App.AppName}" />
|
||||||
|
</Paragraph>
|
||||||
|
<Paragraph>
|
||||||
|
<Run Text="An elegant and deeply customizable lyrics visualizer & versatile music player" />
|
||||||
|
</Paragraph>
|
||||||
|
<Paragraph>
|
||||||
|
<Run Text="Proudly built by" />
|
||||||
|
<Hyperlink NavigateUri="{x:Bind const:Link.AuthorGitHub}">
|
||||||
|
<Run Text="{x:Bind const:App.AppAuthor}" />
|
||||||
|
</Hyperlink>
|
||||||
|
</Paragraph>
|
||||||
|
</RichTextBlock>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|
||||||
<Grid
|
|
||||||
x:Name="CreditsReel"
|
|
||||||
Background="{ThemeResource AcrylicInAppFillColorDefaultBrush}"
|
|
||||||
Opacity="0"
|
|
||||||
SizeChanged="CreditsReel_SizeChanged"
|
|
||||||
Tapped="CreditsReel_Tapped"
|
|
||||||
Visibility="Collapsed">
|
|
||||||
<Grid.OpacityTransition>
|
|
||||||
<ScalarTransition />
|
|
||||||
</Grid.OpacityTransition>
|
|
||||||
<ScrollViewer
|
|
||||||
x:Name="CreditsReelScrollViewer"
|
|
||||||
ScrollViewer.VerticalScrollBarVisibility="Hidden"
|
|
||||||
ScrollViewer.VerticalScrollMode="Disabled">
|
|
||||||
<RichTextBlock
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
HorizontalTextAlignment="Center"
|
|
||||||
LineHeight="28"
|
|
||||||
PointerEntered="RichTextBlock_PointerEntered"
|
|
||||||
PointerExited="RichTextBlock_PointerExited">
|
|
||||||
|
|
||||||
<Paragraph x:Name="CreditsReelHeader" />
|
|
||||||
|
|
||||||
<!-- 贡献者 -->
|
|
||||||
<Paragraph Margin="0,20,0,0" FontWeight="Bold">
|
|
||||||
<Run x:Uid="SetingsPageContributors" />
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Hyperlink NavigateUri="https://github.com/jayfunc">
|
|
||||||
<Run Text="jayfunc" />
|
|
||||||
</Hyperlink>
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Hyperlink NavigateUri="https://github.com/Raspberry-Monster">
|
|
||||||
<Run Text="Raspberry-Monster" />
|
|
||||||
</Hyperlink>
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Hyperlink NavigateUri="https://github.com/ZHider">
|
|
||||||
<Run Text="ZHider" />
|
|
||||||
</Hyperlink>
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Hyperlink NavigateUri="https://github.com/kusutori">
|
|
||||||
<Run Text="kusutori" />
|
|
||||||
</Hyperlink>
|
|
||||||
</Paragraph>
|
|
||||||
|
|
||||||
<!-- 赞助 -->
|
|
||||||
<Paragraph Margin="0,20,0,0" FontWeight="Bold">
|
|
||||||
<Run x:Uid="SettingsPagePatrons" />
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Run Text="YE" />
|
|
||||||
<Run Foreground="{ThemeResource TextFillColorSecondaryBrush}" Text="Dec 3, 2025" />
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Run Text="**玄" />
|
|
||||||
<Run Foreground="{ThemeResource TextFillColorSecondaryBrush}" Text="Nov 23, 2025" />
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Run Text="**智" />
|
|
||||||
<Run Foreground="{ThemeResource TextFillColorSecondaryBrush}" Text="Nov 21, 2025" />
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Run Text="*鹤" />
|
|
||||||
<Run Foreground="{ThemeResource TextFillColorSecondaryBrush}" Text="Nov 17, 2025" />
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Run Text="借过" />
|
|
||||||
<Run Foreground="{ThemeResource TextFillColorSecondaryBrush}" Text="Nov 2, 2025" />
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Run Text="**华" />
|
|
||||||
<Run Foreground="{ThemeResource TextFillColorSecondaryBrush}" Text="Aug 28, 2025" />
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Run x:Uid="SettingsPageUserWhoPurchased" />
|
|
||||||
</Paragraph>
|
|
||||||
|
|
||||||
<!-- 特别鸣谢 -->
|
|
||||||
<Paragraph Margin="0,20,0,0" FontWeight="Bold">
|
|
||||||
<Run x:Uid="SetingsPageSpecialThanks" />
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Run x:Uid="SettingsPageYouNowUsing" />
|
|
||||||
</Paragraph>
|
|
||||||
|
|
||||||
<!-- 代码参考 -->
|
|
||||||
<Paragraph Margin="0,20,0,0" FontWeight="Bold">
|
|
||||||
<Run x:Uid="SetingsPageDeps" />
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Hyperlink NavigateUri="https://gist.github.com/mcworkaholic/82fbf203e3f1043bbe534b5b2974c0ce">
|
|
||||||
<Run Text="Get album artwork from ITunes (with Python3 or C#)" />
|
|
||||||
</Hyperlink>
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Hyperlink NavigateUri="https://stackoverflow.com/a/32013610/11048731">
|
|
||||||
<Run Text="FullyObservableCollection" />
|
|
||||||
</Hyperlink>
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Hyperlink NavigateUri="https://github.com/Storyteller-Studios/Impressionist">
|
|
||||||
<Run Text="Impressionist" />
|
|
||||||
</Hyperlink>
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Hyperlink NavigateUri="https://github.com/Storyteller-Studios/ColorThief.WinUI3">
|
|
||||||
<Run Text="ColorThief.WinUI3" />
|
|
||||||
</Hyperlink>
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Hyperlink NavigateUri="https://github.com/Johnwikix/SpectrumVisualization">
|
|
||||||
<Run Text="SpectrumVisualization" />
|
|
||||||
</Hyperlink>
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Hyperlink NavigateUri="https://www.shadertoy.com/view/Mdt3Df">
|
|
||||||
<Run Text="Snow (as shown in sweden)" />
|
|
||||||
</Hyperlink>
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Hyperlink NavigateUri="https://www.shadertoy.com/view/lllSR2">
|
|
||||||
<Run Text="w10" />
|
|
||||||
</Hyperlink>
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Hyperlink NavigateUri="https://github.com/mo-jinran/Taskbar-Lyrics">
|
|
||||||
<Run Text="Taskbar-Lyrics" />
|
|
||||||
</Hyperlink>
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Hyperlink NavigateUri="https://github.com/jayfunc/BetterLyrics/network/dependencies">
|
|
||||||
<Run Text="..." />
|
|
||||||
</Hyperlink>
|
|
||||||
</Paragraph>
|
|
||||||
|
|
||||||
<!-- UI/UX 设计参考 -->
|
|
||||||
<Paragraph Margin="0,20,0,0" FontWeight="Bold">
|
|
||||||
<Run x:Uid="SetingsPageUIUXRef" />
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Hyperlink NavigateUri="https://github.com/solstice23/refined-now-playing-netease">
|
|
||||||
<Run Text="refined-now-playing-netease" />
|
|
||||||
</Hyperlink>
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Hyperlink NavigateUri="https://github.com/WXRIW/Lyricify-App">
|
|
||||||
<Run Text="Lyricify" />
|
|
||||||
</Hyperlink>
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Hyperlink NavigateUri="https://moriafly.com/program/salt-player">
|
|
||||||
<Run Text="椒盐音乐 Salt Player" />
|
|
||||||
</Hyperlink>
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Hyperlink NavigateUri="https://github.com/TwilightLemon/MyToolBar">
|
|
||||||
<Run Text="MyToolBar" />
|
|
||||||
</Hyperlink>
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Hyperlink NavigateUri="">
|
|
||||||
<Run Text="" />
|
|
||||||
</Hyperlink>
|
|
||||||
</Paragraph>
|
|
||||||
|
|
||||||
<Paragraph Margin="0,20,0,0" FontWeight="Bold">
|
|
||||||
<Run Text="{x:Bind const:App.AppName}" />
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<Run Text="Proudly built by" />
|
|
||||||
<Hyperlink NavigateUri="{x:Bind const:Link.AuthorGitHub}">
|
|
||||||
<Run Text="{x:Bind const:App.AppAuthor}" />
|
|
||||||
</Hyperlink>
|
|
||||||
</Paragraph>
|
|
||||||
|
|
||||||
<Paragraph x:Name="CreditsReelFooter" />
|
|
||||||
|
|
||||||
</RichTextBlock>
|
|
||||||
</ScrollViewer>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ namespace BetterLyrics.WinUI3.Controls
|
|||||||
{
|
{
|
||||||
public sealed partial class AboutControl : UserControl
|
public sealed partial class AboutControl : UserControl
|
||||||
{
|
{
|
||||||
private bool _isCreditsScrolling = false;
|
|
||||||
public AboutControlViewModel ViewModel => (AboutControlViewModel)DataContext;
|
public AboutControlViewModel ViewModel => (AboutControlViewModel)DataContext;
|
||||||
|
|
||||||
public AboutControl()
|
public AboutControl()
|
||||||
@@ -20,47 +19,6 @@ namespace BetterLyrics.WinUI3.Controls
|
|||||||
DataContext = Ioc.Default.GetRequiredService<AboutControlViewModel>();
|
DataContext = Ioc.Default.GetRequiredService<AboutControlViewModel>();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void Patron_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
CompositionTarget.Rendering += CompositionTarget_Rendering;
|
|
||||||
CreditsReel.Visibility = Microsoft.UI.Xaml.Visibility.Visible;
|
|
||||||
CreditsReel.Opacity = 1;
|
|
||||||
_isCreditsScrolling = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CompositionTarget_Rendering(object? sender, object e)
|
|
||||||
{
|
|
||||||
if (_isCreditsScrolling)
|
|
||||||
{
|
|
||||||
CreditsReelScrollViewer.ChangeView(null, CreditsReelScrollViewer.VerticalOffset + 0.5, null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async void CreditsReel_Tapped(object sender, Microsoft.UI.Xaml.Input.TappedRoutedEventArgs e)
|
|
||||||
{
|
|
||||||
CreditsReel.Opacity = 0;
|
|
||||||
await Task.Delay(Constants.Time.AnimationDuration);
|
|
||||||
CreditsReel.Visibility = Microsoft.UI.Xaml.Visibility.Collapsed;
|
|
||||||
CompositionTarget.Rendering -= CompositionTarget_Rendering;
|
|
||||||
CreditsReelScrollViewer.ChangeView(null, 0, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CreditsReel_SizeChanged(object sender, Microsoft.UI.Xaml.SizeChangedEventArgs e)
|
|
||||||
{
|
|
||||||
CreditsReelHeader.LineHeight = e.NewSize.Height;
|
|
||||||
CreditsReelFooter.LineHeight = e.NewSize.Height / 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void RichTextBlock_PointerEntered(object sender, Microsoft.UI.Xaml.Input.PointerRoutedEventArgs e)
|
|
||||||
{
|
|
||||||
_isCreditsScrolling = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void RichTextBlock_PointerExited(object sender, Microsoft.UI.Xaml.Input.PointerRoutedEventArgs e)
|
|
||||||
{
|
|
||||||
_isCreditsScrolling = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void WeChat_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
|
private void WeChat_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
WeChatFlyout.ShowAt(WeChatButton);
|
WeChatFlyout.ShowAt(WeChatButton);
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace BetterLyrics.WinUI3.Controls
|
|||||||
public sealed partial class LyricsCanvas : UserControl,
|
public sealed partial class LyricsCanvas : UserControl,
|
||||||
IRecipient<PropertyChangedMessage<TimeSpan>>,
|
IRecipient<PropertyChangedMessage<TimeSpan>>,
|
||||||
IRecipient<PropertyChangedMessage<LyricsData?>>,
|
IRecipient<PropertyChangedMessage<LyricsData?>>,
|
||||||
IRecipient<PropertyChangedMessage<SongInfo?>>,
|
IRecipient<PropertyChangedMessage<SongInfo>>,
|
||||||
IRecipient<PropertyChangedMessage<int>>,
|
IRecipient<PropertyChangedMessage<int>>,
|
||||||
IRecipient<PropertyChangedMessage<double>>,
|
IRecipient<PropertyChangedMessage<double>>,
|
||||||
IRecipient<PropertyChangedMessage<bool>>,
|
IRecipient<PropertyChangedMessage<bool>>,
|
||||||
@@ -343,7 +343,7 @@ namespace BetterLyrics.WinUI3.Controls
|
|||||||
var lyricsStyle = _lyricsWindowStatus.LyricsStyleSettings;
|
var lyricsStyle = _lyricsWindowStatus.LyricsStyleSettings;
|
||||||
var lyricsEffect = _lyricsWindowStatus.LyricsEffectSettings;
|
var lyricsEffect = _lyricsWindowStatus.LyricsEffectSettings;
|
||||||
|
|
||||||
double songDuration = _gsmtcService.CurrentSongInfo?.DurationMs ?? 0;
|
double songDuration = _gsmtcService.CurrentSongInfo.DurationMs;
|
||||||
bool isForceWordByWord = _settingsService.AppSettings.GeneralSettings.IsForceWordByWordEffect;
|
bool isForceWordByWord = _settingsService.AppSettings.GeneralSettings.IsForceWordByWordEffect;
|
||||||
|
|
||||||
Color overlayColor;
|
Color overlayColor;
|
||||||
@@ -726,7 +726,7 @@ namespace BetterLyrics.WinUI3.Controls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Receive(PropertyChangedMessage<SongInfo?> message)
|
public void Receive(PropertyChangedMessage<SongInfo> message)
|
||||||
{
|
{
|
||||||
if (message.Sender is IGSMTCService)
|
if (message.Sender is IGSMTCService)
|
||||||
{
|
{
|
||||||
@@ -891,5 +891,6 @@ namespace BetterLyrics.WinUI3.Controls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,16 +60,16 @@
|
|||||||
</interactivity:Interaction.Behaviors>
|
</interactivity:Interaction.Behaviors>
|
||||||
<Grid VerticalAlignment="Center" CornerRadius="4">
|
<Grid VerticalAlignment="Center" CornerRadius="4">
|
||||||
<local:ImageSwitcher
|
<local:ImageSwitcher
|
||||||
x:Name="AlbumArtImageSwitcher"
|
|
||||||
Width="36"
|
Width="36"
|
||||||
Height="36" />
|
Height="36"
|
||||||
|
Source="{x:Bind ViewModel.GSMTCService.AlbumArtBitmapImage, Mode=OneWay}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
<StackPanel VerticalAlignment="Center">
|
<StackPanel VerticalAlignment="Center">
|
||||||
<TextBlock x:Name="TitleTextBlock" />
|
<TextBlock Text="{x:Bind ViewModel.GSMTCService.CurrentSongInfo.Title, Mode=OneWay}" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
x:Name="ArtistsTextBlock"
|
|
||||||
FontSize="12"
|
FontSize="12"
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||||
|
Text="{x:Bind ViewModel.GSMTCService.CurrentSongInfo.DisplayArtists, Mode=OneWay}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
@@ -423,7 +423,8 @@
|
|||||||
Maximum="{x:Bind ViewModel.GSMTCService.CurrentSongInfo.DurationMs, Mode=OneWay, Converter={StaticResource MillisecondsToSecondsConverter}}"
|
Maximum="{x:Bind ViewModel.GSMTCService.CurrentSongInfo.DurationMs, Mode=OneWay, Converter={StaticResource MillisecondsToSecondsConverter}}"
|
||||||
Minimum="0"
|
Minimum="0"
|
||||||
Style="{StaticResource GhostSliderStyle}"
|
Style="{StaticResource GhostSliderStyle}"
|
||||||
ThumbToolTipValueConverter="{StaticResource SecondsToFormattedTimeConverter}" />
|
ThumbToolTipValueConverter="{StaticResource SecondsToFormattedTimeConverter}"
|
||||||
|
Value="{x:Bind ViewModel.GSMTCService.CurrentPosition.TotalSeconds, Mode=OneWay}" />
|
||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
x:Name="TimelineSliderLyricsLineInfo"
|
x:Name="TimelineSliderLyricsLineInfo"
|
||||||
|
|||||||
@@ -21,10 +21,7 @@ using BetterLyrics.WinUI3.Extensions;
|
|||||||
|
|
||||||
namespace BetterLyrics.WinUI3.Controls;
|
namespace BetterLyrics.WinUI3.Controls;
|
||||||
|
|
||||||
public sealed partial class NowPlayingBar : UserControl,
|
public sealed partial class NowPlayingBar : UserControl
|
||||||
IRecipient<PropertyChangedMessage<SongInfo?>>,
|
|
||||||
IRecipient<PropertyChangedMessage<BitmapImage?>>,
|
|
||||||
IRecipient<PropertyChangedMessage<TimeSpan>>
|
|
||||||
{
|
{
|
||||||
public NowPlayingBarViewModel ViewModel => (NowPlayingBarViewModel)DataContext;
|
public NowPlayingBarViewModel ViewModel => (NowPlayingBarViewModel)DataContext;
|
||||||
|
|
||||||
@@ -110,8 +107,6 @@ public sealed partial class NowPlayingBar : UserControl,
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
DataContext = Ioc.Default.GetRequiredService<NowPlayingBarViewModel>();
|
DataContext = Ioc.Default.GetRequiredService<NowPlayingBarViewModel>();
|
||||||
|
|
||||||
WeakReferenceMessenger.Default.RegisterAll(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void OnDependencyPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
private static void OnDependencyPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
@@ -311,38 +306,4 @@ public sealed partial class NowPlayingBar : UserControl,
|
|||||||
{
|
{
|
||||||
PlaybackOrder = PlaybackOrder.GetNext();
|
PlaybackOrder = PlaybackOrder.GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Receive(PropertyChangedMessage<SongInfo?> message)
|
|
||||||
{
|
|
||||||
if (message.Sender is IGSMTCService)
|
|
||||||
{
|
|
||||||
if (message.PropertyName == nameof(IGSMTCService.CurrentSongInfo))
|
|
||||||
{
|
|
||||||
TitleTextBlock.Text = message.NewValue?.Title;
|
|
||||||
ArtistsTextBlock.Text = message.NewValue?.DisplayArtists;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public void Receive(PropertyChangedMessage<BitmapImage?> message)
|
|
||||||
{
|
|
||||||
if (message.Sender is IGSMTCService)
|
|
||||||
{
|
|
||||||
if (message.PropertyName == nameof(IGSMTCService.AlbumArtBitmapImage))
|
|
||||||
{
|
|
||||||
AlbumArtImageSwitcher.Source = message.NewValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Receive(PropertyChangedMessage<TimeSpan> message)
|
|
||||||
{
|
|
||||||
if (message.Sender is IGSMTCService)
|
|
||||||
{
|
|
||||||
if (message.PropertyName == nameof(IGSMTCService.CurrentPosition))
|
|
||||||
{
|
|
||||||
TimelineSlider.Value = message.NewValue.TotalSeconds;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<UserControl
|
||||||
|
x:Class="BetterLyrics.WinUI3.Controls.PatronControl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="using:BetterLyrics.WinUI3.Controls"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
mc:Ignorable="d">
|
||||||
|
|
||||||
|
<Grid Margin="12,8">
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="6">
|
||||||
|
<TextBlock Text="{x:Bind PatronName, Mode=OneWay}" />
|
||||||
|
<TextBlock Foreground="{ThemeResource TextFillColorSecondaryBrush}" Text="{x:Bind Date, Mode=OneWay}" />
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
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 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 PatronControl : UserControl
|
||||||
|
{
|
||||||
|
public string PatronName
|
||||||
|
{
|
||||||
|
get { return (string)GetValue(PatronNameProperty); }
|
||||||
|
set { SetValue(PatronNameProperty, value); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly DependencyProperty PatronNameProperty =
|
||||||
|
DependencyProperty.Register(nameof(PatronName), typeof(string), typeof(PatronControl), new PropertyMetadata(""));
|
||||||
|
|
||||||
|
public string Date
|
||||||
|
{
|
||||||
|
get { return (string)GetValue(DateProperty); }
|
||||||
|
set { SetValue(DateProperty, value); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly DependencyProperty DateProperty =
|
||||||
|
DependencyProperty.Register(nameof(Date), typeof(string), typeof(PatronControl), new PropertyMetadata(""));
|
||||||
|
|
||||||
|
public PatronControl()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -26,8 +26,9 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
|
|
||||||
<Grid Margin="0,20,0,0">
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
@@ -36,11 +37,31 @@
|
|||||||
<ProgressBar
|
<ProgressBar
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
IsIndeterminate="{x:Bind ViewModel.IsLoading, Mode=OneWay}" />
|
IsIndeterminate="{x:Bind ViewModel.IsLoading, Mode=OneWay}"
|
||||||
|
Visibility="{x:Bind ViewModel.IsLoading, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" />
|
||||||
|
|
||||||
|
<Grid Grid.Row="1" Visibility="{x:Bind ViewModel.GSMTCService.IsScrobbled, Mode=OneWay, Converter={StaticResource BoolNegationToVisibilityConverter}}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<InfoBar
|
||||||
|
x:Uid="StatsDashboardControlRecording"
|
||||||
|
Grid.Row="0"
|
||||||
|
IsClosable="False"
|
||||||
|
IsOpen="True"
|
||||||
|
Message="{x:Bind ViewModel.GSMTCService.CurrentSongInfo.Title, Mode=OneWay}" />
|
||||||
|
<ProgressBar
|
||||||
|
Grid.Row="1"
|
||||||
|
Background="Transparent"
|
||||||
|
Maximum="{x:Bind ViewModel.GSMTCService.TargetScrobbledDuration.TotalSeconds, Mode=OneWay}"
|
||||||
|
ShowPaused="{x:Bind ViewModel.GSMTCService.CurrentIsPlaying, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}"
|
||||||
|
Value="{x:Bind ViewModel.GSMTCService.ScrobbledDuration.TotalSeconds, Mode=OneWay}" />
|
||||||
|
</Grid>
|
||||||
|
|
||||||
<controls:WrapPanel
|
<controls:WrapPanel
|
||||||
Grid.Row="1"
|
Grid.Row="2"
|
||||||
Margin="36,12"
|
Margin="36,36,36,12"
|
||||||
HorizontalSpacing="12"
|
HorizontalSpacing="12"
|
||||||
Orientation="Horizontal"
|
Orientation="Horizontal"
|
||||||
VerticalSpacing="12">
|
VerticalSpacing="12">
|
||||||
@@ -80,7 +101,7 @@
|
|||||||
Glyph=}" />
|
Glyph=}" />
|
||||||
</controls:WrapPanel>
|
</controls:WrapPanel>
|
||||||
|
|
||||||
<ScrollViewer Grid.Row="2" Padding="36,0">
|
<ScrollViewer Grid.Row="3" Padding="36,0">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ namespace BetterLyrics.WinUI3.Extensions
|
|||||||
PlayerId = songInfo.PlayerId ?? "N/A",
|
PlayerId = songInfo.PlayerId ?? "N/A",
|
||||||
TotalDurationMs = songInfo.DurationMs,
|
TotalDurationMs = songInfo.DurationMs,
|
||||||
DurationPlayedMs = actualPlayedMs,
|
DurationPlayedMs = actualPlayedMs,
|
||||||
StartedAt = DateTime.Now.AddMilliseconds(-actualPlayedMs)
|
StartedAt = DateTime.FromBinary(songInfo.StartedAt)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ using System;
|
|||||||
|
|
||||||
namespace BetterLyrics.WinUI3.Models
|
namespace BetterLyrics.WinUI3.Models
|
||||||
{
|
{
|
||||||
public partial class SongInfo : ObservableObject, ICloneable
|
public partial class SongInfo : ObservableRecipient, ICloneable
|
||||||
{
|
{
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public partial string Album { get; set; }
|
public partial string Album { get; set; }
|
||||||
@@ -26,6 +26,8 @@ namespace BetterLyrics.WinUI3.Models
|
|||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public partial string? SongId { get; set; } = null;
|
public partial string? SongId { get; set; } = null;
|
||||||
|
|
||||||
|
[ObservableProperty] public partial long StartedAt { get; set; } = DateTime.Now.ToBinary();
|
||||||
|
|
||||||
public string? LinkedFileName { get; set; } = null;
|
public string? LinkedFileName { get; set; } = null;
|
||||||
|
|
||||||
public double Duration => DurationMs / 1000;
|
public double Duration => DurationMs / 1000;
|
||||||
@@ -45,6 +47,7 @@ namespace BetterLyrics.WinUI3.Models
|
|||||||
PlayerId = this.PlayerId,
|
PlayerId = this.PlayerId,
|
||||||
SongId = this.SongId,
|
SongId = this.SongId,
|
||||||
LinkedFileName = this.LinkedFileName,
|
LinkedFileName = this.LinkedFileName,
|
||||||
|
StartedAt = this.StartedAt,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ using BetterLyrics.WinUI3.Helper;
|
|||||||
using BetterLyrics.WinUI3.Models;
|
using BetterLyrics.WinUI3.Models;
|
||||||
using BetterLyrics.WinUI3.Parsers.LyricsParser;
|
using BetterLyrics.WinUI3.Parsers.LyricsParser;
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
using CommunityToolkit.WinUI;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.UI.Dispatching;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
@@ -27,12 +29,7 @@ namespace BetterLyrics.WinUI3.Services.GSMTCService
|
|||||||
if (CurrentSongInfo != SongInfoExtensions.Placeholder)
|
if (CurrentSongInfo != SongInfoExtensions.Placeholder)
|
||||||
{
|
{
|
||||||
CurrentLyricsSearchResult = await Task.Run(async () => await _lyrcsSearchService.SearchSmartlyAsync(
|
CurrentLyricsSearchResult = await Task.Run(async () => await _lyrcsSearchService.SearchSmartlyAsync(
|
||||||
CurrentSongInfo,
|
CurrentSongInfo, true, CurrentMediaSourceProviderInfo?.LyricsSearchType, token), token);
|
||||||
true,
|
|
||||||
CurrentMediaSourceProviderInfo?.LyricsSearchType,
|
|
||||||
token),
|
|
||||||
token);
|
|
||||||
if (token.IsCancellationRequested) return;
|
|
||||||
|
|
||||||
if (CurrentLyricsSearchResult != null)
|
if (CurrentLyricsSearchResult != null)
|
||||||
{
|
{
|
||||||
@@ -40,12 +37,7 @@ namespace BetterLyrics.WinUI3.Services.GSMTCService
|
|||||||
|
|
||||||
(CurrentLyricsData, CurrentLyricsSearchResult.TransliterationProvider, CurrentLyricsSearchResult.TranslationProvider) =
|
(CurrentLyricsData, CurrentLyricsSearchResult.TransliterationProvider, CurrentLyricsSearchResult.TranslationProvider) =
|
||||||
await Task.Run(async () => await lyricsParser.Parse(
|
await Task.Run(async () => await lyricsParser.Parse(
|
||||||
_translationService,
|
_translationService, _transliterationService, _settingsService.AppSettings.TranslationSettings, CurrentLyricsSearchResult, token), token);
|
||||||
_transliterationService,
|
|
||||||
_settingsService.AppSettings.TranslationSettings,
|
|
||||||
CurrentLyricsSearchResult,
|
|
||||||
token),
|
|
||||||
token);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,8 +53,6 @@ namespace BetterLyrics.WinUI3.Services.GSMTCService
|
|||||||
|
|
||||||
private MediaManager.MediaSession? _currentDesiredSession = null;
|
private MediaManager.MediaSession? _currentDesiredSession = null;
|
||||||
|
|
||||||
private readonly StatsDashboardControlViewModel _statsDashboardControlViewModel;
|
|
||||||
|
|
||||||
private readonly IAlbumArtSearchService _albumArtSearchService;
|
private readonly IAlbumArtSearchService _albumArtSearchService;
|
||||||
private readonly ILyricsSearchService _lyrcsSearchService;
|
private readonly ILyricsSearchService _lyrcsSearchService;
|
||||||
private readonly ITranslationService _translationService;
|
private readonly ITranslationService _translationService;
|
||||||
@@ -71,7 +69,7 @@ namespace BetterLyrics.WinUI3.Services.GSMTCService
|
|||||||
private readonly DispatcherQueueTimer? _onMediaPropsChangedTimer;
|
private readonly DispatcherQueueTimer? _onMediaPropsChangedTimer;
|
||||||
private readonly DispatcherTimer _scrobbleTimer;
|
private readonly DispatcherTimer _scrobbleTimer;
|
||||||
|
|
||||||
[ObservableProperty] public partial bool IsScrobbled { get; set; } = false;
|
[ObservableProperty][NotifyPropertyChangedRecipients] public partial bool IsScrobbled { get; set; } = false;
|
||||||
[ObservableProperty] public partial TimeSpan ScrobbledDuration { get; set; } = TimeSpan.Zero;
|
[ObservableProperty] public partial TimeSpan ScrobbledDuration { get; set; } = TimeSpan.Zero;
|
||||||
[ObservableProperty] public partial TimeSpan TargetScrobbledDuration { get; set; } = TimeSpan.Zero;
|
[ObservableProperty] public partial TimeSpan TargetScrobbledDuration { get; set; } = TimeSpan.Zero;
|
||||||
|
|
||||||
@@ -82,7 +80,6 @@ namespace BetterLyrics.WinUI3.Services.GSMTCService
|
|||||||
[ObservableProperty] public partial MediaSourceProviderInfo? CurrentMediaSourceProviderInfo { get; set; }
|
[ObservableProperty] public partial MediaSourceProviderInfo? CurrentMediaSourceProviderInfo { get; set; }
|
||||||
|
|
||||||
public GSMTCService(
|
public GSMTCService(
|
||||||
StatsDashboardControlViewModel statsDashboardControlViewModel,
|
|
||||||
ISettingsService settingsService,
|
ISettingsService settingsService,
|
||||||
IAlbumArtSearchService albumArtSearchService,
|
IAlbumArtSearchService albumArtSearchService,
|
||||||
ILyricsSearchService lyricsSearchService,
|
ILyricsSearchService lyricsSearchService,
|
||||||
@@ -93,8 +90,6 @@ namespace BetterLyrics.WinUI3.Services.GSMTCService
|
|||||||
ILastFMService lastFMService,
|
ILastFMService lastFMService,
|
||||||
ILogger<GSMTCService> logger)
|
ILogger<GSMTCService> logger)
|
||||||
{
|
{
|
||||||
_statsDashboardControlViewModel = statsDashboardControlViewModel;
|
|
||||||
|
|
||||||
_settingsService = settingsService;
|
_settingsService = settingsService;
|
||||||
_albumArtSearchService = albumArtSearchService;
|
_albumArtSearchService = albumArtSearchService;
|
||||||
_lyrcsSearchService = lyricsSearchService;
|
_lyrcsSearchService = lyricsSearchService;
|
||||||
@@ -138,10 +133,6 @@ namespace BetterLyrics.WinUI3.Services.GSMTCService
|
|||||||
_ = Task.Run(async () =>
|
_ = Task.Run(async () =>
|
||||||
{
|
{
|
||||||
await _playHistoryService.AddLogAsync(playHistoryItem);
|
await _playHistoryService.AddLogAsync(playHistoryItem);
|
||||||
_dispatcherQueue.TryEnqueue(() =>
|
|
||||||
{
|
|
||||||
_statsDashboardControlViewModel.RefreshData();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
_logger.LogInformation("ScrobbleTimer_Tick: {} scrobbled", CurrentSongInfo.Title);
|
_logger.LogInformation("ScrobbleTimer_Tick: {} scrobbled", CurrentSongInfo.Title);
|
||||||
}
|
}
|
||||||
@@ -231,6 +222,8 @@ namespace BetterLyrics.WinUI3.Services.GSMTCService
|
|||||||
{
|
{
|
||||||
_mediaManager.Start();
|
_mediaManager.Start();
|
||||||
|
|
||||||
|
_mediaManager.CurrentMediaSessions.ToList().ForEach(x => RecordMediaSession(x.Value.Id));
|
||||||
|
|
||||||
_mediaManager.OnAnySessionOpened += MediaManager_OnAnySessionOpened;
|
_mediaManager.OnAnySessionOpened += MediaManager_OnAnySessionOpened;
|
||||||
_mediaManager.OnAnySessionClosed += MediaManager_OnAnySessionClosed;
|
_mediaManager.OnAnySessionClosed += MediaManager_OnAnySessionClosed;
|
||||||
_mediaManager.OnFocusedSessionChanged += MediaManager_OnFocusedSessionChanged;
|
_mediaManager.OnFocusedSessionChanged += MediaManager_OnFocusedSessionChanged;
|
||||||
@@ -238,7 +231,6 @@ namespace BetterLyrics.WinUI3.Services.GSMTCService
|
|||||||
_mediaManager.OnAnyPlaybackStateChanged += MediaManager_OnAnyPlaybackStateChanged;
|
_mediaManager.OnAnyPlaybackStateChanged += MediaManager_OnAnyPlaybackStateChanged;
|
||||||
_mediaManager.OnAnyTimelinePropertyChanged += MediaManager_OnAnyTimelinePropertyChanged;
|
_mediaManager.OnAnyTimelinePropertyChanged += MediaManager_OnAnyTimelinePropertyChanged;
|
||||||
|
|
||||||
_mediaManager.CurrentMediaSessions.ToList().ForEach(x => RecordMediaSourceProviderInfo(x.Value));
|
|
||||||
OnDesiredSessionChanged(true);
|
OnDesiredSessionChanged(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -273,6 +265,11 @@ namespace BetterLyrics.WinUI3.Services.GSMTCService
|
|||||||
CurrentPosition = timelineProperties.Position;
|
CurrentPosition = timelineProperties.Position;
|
||||||
CurrentSongInfo.DurationMs = timelineProperties.EndTime.TotalMilliseconds;
|
CurrentSongInfo.DurationMs = timelineProperties.EndTime.TotalMilliseconds;
|
||||||
UpdateTargetScrobbledDuration();
|
UpdateTargetScrobbledDuration();
|
||||||
|
if (CurrentPosition.TotalSeconds == 0)
|
||||||
|
{
|
||||||
|
IsScrobbled = false;
|
||||||
|
ScrobbledDuration = TimeSpan.Zero;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -315,6 +312,7 @@ namespace BetterLyrics.WinUI3.Services.GSMTCService
|
|||||||
currentMediaSourceProviderInfo?.PositionOffset = 0;
|
currentMediaSourceProviderInfo?.PositionOffset = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string fixedTitle = mediaProperties.Title;
|
||||||
string fixedArtist = mediaProperties.Artist;
|
string fixedArtist = mediaProperties.Artist;
|
||||||
string fixedAlbum = mediaProperties.AlbumTitle;
|
string fixedAlbum = mediaProperties.AlbumTitle;
|
||||||
string? songId = null;
|
string? songId = null;
|
||||||
@@ -343,19 +341,21 @@ namespace BetterLyrics.WinUI3.Services.GSMTCService
|
|||||||
.FirstOrDefault(x => x.StartsWith(ExtendedGenreFiled.FileName))?
|
.FirstOrDefault(x => x.StartsWith(ExtendedGenreFiled.FileName))?
|
||||||
.Replace(ExtendedGenreFiled.FileName, "");
|
.Replace(ExtendedGenreFiled.FileName, "");
|
||||||
|
|
||||||
CurrentSongInfo.Title = mediaProperties.Title;
|
CurrentSongInfo = new()
|
||||||
CurrentSongInfo.Artists = fixedArtist.SplitByCommonSplitter();
|
{
|
||||||
CurrentSongInfo.Album = fixedAlbum;
|
Title = fixedTitle,
|
||||||
CurrentSongInfo.DurationMs = mediaSession.ControlSession.GetTimelineProperties().EndTime.TotalMilliseconds;
|
Artists = fixedArtist.SplitByCommonSplitter(),
|
||||||
CurrentSongInfo.PlayerId = sessionId;
|
Album = fixedAlbum,
|
||||||
CurrentSongInfo.SongId = songId;
|
DurationMs = mediaSession.ControlSession.GetTimelineProperties().EndTime.TotalMilliseconds,
|
||||||
CurrentSongInfo.LinkedFileName = linkedFileName;
|
PlayerId = sessionId,
|
||||||
|
SongId = songId,
|
||||||
|
LinkedFileName = linkedFileName,
|
||||||
|
StartedAt = DateTime.Now.ToBinary(),
|
||||||
|
};
|
||||||
|
|
||||||
_scrobbleTimer.Stop();
|
UpdateTargetScrobbledDuration();
|
||||||
IsScrobbled = false;
|
IsScrobbled = false;
|
||||||
ScrobbledDuration = TimeSpan.Zero;
|
ScrobbledDuration = TimeSpan.Zero;
|
||||||
UpdateTargetScrobbledDuration();
|
|
||||||
_scrobbleTimer.Start();
|
|
||||||
|
|
||||||
if (PlayerIdHelper.IsLXMusic(sessionId))
|
if (PlayerIdHelper.IsLXMusic(sessionId))
|
||||||
{
|
{
|
||||||
@@ -403,51 +403,42 @@ namespace BetterLyrics.WinUI3.Services.GSMTCService
|
|||||||
{
|
{
|
||||||
if (mediaSession == null) return;
|
if (mediaSession == null) return;
|
||||||
|
|
||||||
RecordMediaSourceProviderInfo(mediaSession);
|
var id = mediaSession.Id;
|
||||||
OnDesiredSessionChanged();
|
|
||||||
|
_dispatcherQueue.TryEnqueue(() =>
|
||||||
|
{
|
||||||
|
RecordMediaSession(id);
|
||||||
|
OnDesiredSessionChanged();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RecordMediaSession(string id)
|
||||||
|
{
|
||||||
|
var found = _settingsService.AppSettings.MediaSourceProvidersInfo.FirstOrDefault(x => x.Provider == id);
|
||||||
|
if (found == null)
|
||||||
|
{
|
||||||
|
_settingsService.AppSettings.MediaSourceProvidersInfo.Add(new MediaSourceProviderInfo(id, _settingsService.AppSettings.GeneralSettings.ListenOnNewPlaybackSource));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private MediaManager.MediaSession? GetCurrentDesiredSession()
|
private MediaManager.MediaSession? GetCurrentDesiredSession()
|
||||||
{
|
{
|
||||||
var focusedSession = _mediaManager.GetFocusedSession();
|
var focusedSession = _mediaManager.GetFocusedSession();
|
||||||
if (focusedSession == null)
|
if (focusedSession != null && IsMediaSourceEnabled(focusedSession.Id))
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (IsMediaSourceEnabled(focusedSession.Id))
|
|
||||||
{
|
{
|
||||||
return focusedSession;
|
return focusedSession;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
foreach (var session in _mediaManager.CurrentMediaSessions.Values)
|
||||||
{
|
{
|
||||||
foreach (var session in _mediaManager.CurrentMediaSessions.Values)
|
if (IsMediaSourceEnabled(session.Id))
|
||||||
{
|
{
|
||||||
if (IsMediaSourceEnabled(session.Id))
|
return session;
|
||||||
{
|
|
||||||
return session;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RecordMediaSourceProviderInfo(MediaManager.MediaSession mediaSession)
|
|
||||||
{
|
|
||||||
if (mediaSession == null) return;
|
|
||||||
|
|
||||||
var id = mediaSession?.Id;
|
|
||||||
if (string.IsNullOrEmpty(id)) return;
|
|
||||||
|
|
||||||
_dispatcherQueue.TryEnqueue(DispatcherQueuePriority.Low, () =>
|
|
||||||
{
|
|
||||||
var found = _settingsService.AppSettings.MediaSourceProvidersInfo.FirstOrDefault(x => x.Provider == id);
|
|
||||||
if (found == null)
|
|
||||||
{
|
|
||||||
_settingsService.AppSettings.MediaSourceProvidersInfo.Add(new MediaSourceProviderInfo(id, _settingsService.AppSettings.GeneralSettings.ListenOnNewPlaybackSource));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SendNullMessages()
|
private void SendNullMessages()
|
||||||
{
|
{
|
||||||
_dispatcherQueue.TryEnqueue(DispatcherQueuePriority.Low, () =>
|
_dispatcherQueue.TryEnqueue(DispatcherQueuePriority.Low, () =>
|
||||||
@@ -658,7 +649,7 @@ namespace BetterLyrics.WinUI3.Services.GSMTCService
|
|||||||
{
|
{
|
||||||
if (WindowHook.GetWindowHandle<NowPlayingWindow>() is IntPtr hwnd)
|
if (WindowHook.GetWindowHandle<NowPlayingWindow>() is IntPtr hwnd)
|
||||||
{
|
{
|
||||||
TaskbarList.SetProgressValue(hwnd, (ulong)value.TotalSeconds, (ulong)(CurrentSongInfo?.Duration ?? value.TotalSeconds));
|
TaskbarList.SetProgressValue(hwnd, (ulong)value.TotalSeconds, (ulong)(CurrentSongInfo.Duration));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace BetterLyrics.WinUI3.Services.GSMTCService
|
|||||||
TimeSpan TargetScrobbledDuration { get; }
|
TimeSpan TargetScrobbledDuration { get; }
|
||||||
|
|
||||||
bool CurrentIsPlaying { get; }
|
bool CurrentIsPlaying { get; }
|
||||||
SongInfo? CurrentSongInfo { get; }
|
SongInfo CurrentSongInfo { get; }
|
||||||
TimeSpan CurrentPosition { get; }
|
TimeSpan CurrentPosition { get; }
|
||||||
LyricsData? CurrentLyricsData { get; }
|
LyricsData? CurrentLyricsData { get; }
|
||||||
|
|
||||||
|
|||||||
@@ -1482,6 +1482,9 @@
|
|||||||
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
||||||
<value>الأكثر نشاطاً</value>
|
<value>الأكثر نشاطاً</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="StatsDashboardControlRecording.Title" xml:space="preserve">
|
||||||
|
<value>سكروبلينج...</value>
|
||||||
|
</data>
|
||||||
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
||||||
<value>المصادر</value>
|
<value>المصادر</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -1482,6 +1482,9 @@
|
|||||||
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
||||||
<value>Aktivste</value>
|
<value>Aktivste</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="StatsDashboardControlRecording.Title" xml:space="preserve">
|
||||||
|
<value>Scrobbling...</value>
|
||||||
|
</data>
|
||||||
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
||||||
<value>Quellen</value>
|
<value>Quellen</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -1482,6 +1482,9 @@
|
|||||||
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
||||||
<value>Most Active</value>
|
<value>Most Active</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="StatsDashboardControlRecording.Title" xml:space="preserve">
|
||||||
|
<value>Scrobbling...</value>
|
||||||
|
</data>
|
||||||
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
||||||
<value>Sources</value>
|
<value>Sources</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -1482,6 +1482,9 @@
|
|||||||
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
||||||
<value>Más activos</value>
|
<value>Más activos</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="StatsDashboardControlRecording.Title" xml:space="preserve">
|
||||||
|
<value>Scrobbling...</value>
|
||||||
|
</data>
|
||||||
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
||||||
<value>Fuentes</value>
|
<value>Fuentes</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -1482,6 +1482,9 @@
|
|||||||
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
||||||
<value>Les plus actifs</value>
|
<value>Les plus actifs</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="StatsDashboardControlRecording.Title" xml:space="preserve">
|
||||||
|
<value>Scrobbling...</value>
|
||||||
|
</data>
|
||||||
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
||||||
<value>Sources d'information</value>
|
<value>Sources d'information</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -1482,6 +1482,9 @@
|
|||||||
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
||||||
<value>सर्वाधिक सक्रिय</value>
|
<value>सर्वाधिक सक्रिय</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="StatsDashboardControlRecording.Title" xml:space="preserve">
|
||||||
|
<value>रिकॉर्डिंग...</value>
|
||||||
|
</data>
|
||||||
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
||||||
<value>स्रोत</value>
|
<value>स्रोत</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -1482,6 +1482,9 @@
|
|||||||
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
||||||
<value>Paling Aktif</value>
|
<value>Paling Aktif</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="StatsDashboardControlRecording.Title" xml:space="preserve">
|
||||||
|
<value>Menggelinding...</value>
|
||||||
|
</data>
|
||||||
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
||||||
<value>Sumber</value>
|
<value>Sumber</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -514,7 +514,7 @@
|
|||||||
<value>タイトル</value>
|
<value>タイトル</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MusicGalleryPageSortType.Text" xml:space="preserve">
|
<data name="MusicGalleryPageSortType.Text" xml:space="preserve">
|
||||||
<value>ソートタイプ</value>
|
<value>並べ替えタイプ</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MusicGalleryPageStopTrack.Text" xml:space="preserve">
|
<data name="MusicGalleryPageStopTrack.Text" xml:space="preserve">
|
||||||
<value>停止</value>
|
<value>停止</value>
|
||||||
@@ -544,7 +544,7 @@
|
|||||||
<value>狭い表示モード</value>
|
<value>狭い表示モード</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="PictureInPictureMode" xml:space="preserve">
|
<data name="PictureInPictureMode" xml:space="preserve">
|
||||||
<value>ピクチャー イン ピクチャー モード</value>
|
<value>ピクチャーインピクチャーモード</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Pinyin" xml:space="preserve">
|
<data name="Pinyin" xml:space="preserve">
|
||||||
<value>ピンイン (中国語)</value>
|
<value>ピンイン (中国語)</value>
|
||||||
@@ -775,7 +775,7 @@
|
|||||||
<value>Discord Presence で視聴ステータスを表示</value>
|
<value>Discord Presence で視聴ステータスを表示</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageDisplayTypeSwitcher.Header" xml:space="preserve">
|
<data name="SettingsPageDisplayTypeSwitcher.Header" xml:space="preserve">
|
||||||
<value>レイアウト</value>
|
<value>レイアウトモード</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageDockedMode.Text" xml:space="preserve">
|
<data name="SettingsPageDockedMode.Text" xml:space="preserve">
|
||||||
<value>ドッキングモード</value>
|
<value>ドッキングモード</value>
|
||||||
@@ -1159,7 +1159,7 @@
|
|||||||
<value>テストミュージックを再生</value>
|
<value>テストミュージックを再生</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageMultiNowPlayingWindows.Header" xml:space="preserve">
|
<data name="SettingsPageMultiNowPlayingWindows.Header" xml:space="preserve">
|
||||||
<value>マルチウィンドウ モード</value>
|
<value>マルチウィンドウモード</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageMusicGallery.Text" xml:space="preserve">
|
<data name="SettingsPageMusicGallery.Text" xml:space="preserve">
|
||||||
<value>ミュージックギャラリー</value>
|
<value>ミュージックギャラリー</value>
|
||||||
@@ -1393,7 +1393,7 @@
|
|||||||
<value>スタートアップ</value>
|
<value>スタートアップ</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageStats.Content" xml:space="preserve">
|
<data name="SettingsPageStats.Content" xml:space="preserve">
|
||||||
<value>統計データ</value>
|
<value>ミュージックレポート</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SettingsPageStopTrackOnGalleryWindowClosed.Header" xml:space="preserve">
|
<data name="SettingsPageStopTrackOnGalleryWindowClosed.Header" xml:space="preserve">
|
||||||
<value>ミュージックギャラリーウィンドウを閉じたときに再生を停止する</value>
|
<value>ミュージックギャラリーウィンドウを閉じたときに再生を停止する</value>
|
||||||
@@ -1468,7 +1468,7 @@
|
|||||||
<value>標準モード</value>
|
<value>標準モード</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="StatsDashboardControlActivityByHour.Text" xml:space="preserve">
|
<data name="StatsDashboardControlActivityByHour.Text" xml:space="preserve">
|
||||||
<value>時間帯別アクティビティ</value>
|
<value>アクティブ時間帯</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="StatsDashboardControlCustom.Content" xml:space="preserve">
|
<data name="StatsDashboardControlCustom.Content" xml:space="preserve">
|
||||||
<value>カスタム</value>
|
<value>カスタム</value>
|
||||||
@@ -1482,6 +1482,9 @@
|
|||||||
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
||||||
<value>最多アクティブ</value>
|
<value>最多アクティブ</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="StatsDashboardControlRecording.Title" xml:space="preserve">
|
||||||
|
<value>再生記録中...</value>
|
||||||
|
</data>
|
||||||
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
||||||
<value>再生ソース</value>
|
<value>再生ソース</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -1504,16 +1507,16 @@
|
|||||||
<value>期間</value>
|
<value>期間</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="StatsDashboardControlTimes" xml:space="preserve">
|
<data name="StatsDashboardControlTimes" xml:space="preserve">
|
||||||
<value>タイムズ</value>
|
<value>回</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="StatsDashboardControlToday.Content" xml:space="preserve">
|
<data name="StatsDashboardControlToday.Content" xml:space="preserve">
|
||||||
<value>今日</value>
|
<value>今日</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="StatsDashboardControlTopArtists.Text" xml:space="preserve">
|
<data name="StatsDashboardControlTopArtists.Text" xml:space="preserve">
|
||||||
<value>トップアーティスト</value>
|
<value>よく聴くアーティスト</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="StatsDashboardControlTopSongs.Text" xml:space="preserve">
|
<data name="StatsDashboardControlTopSongs.Text" xml:space="preserve">
|
||||||
<value>トップトラック</value>
|
<value>よく聴く曲</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="StatsDashboardControlTopSource.Text" xml:space="preserve">
|
<data name="StatsDashboardControlTopSource.Text" xml:space="preserve">
|
||||||
<value>よく使う再生ソース</value>
|
<value>よく使う再生ソース</value>
|
||||||
@@ -1522,10 +1525,10 @@
|
|||||||
<value>総再生時間</value>
|
<value>総再生時間</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="StatsDashboardControlTrackCountAxis.AxisName" xml:space="preserve">
|
<data name="StatsDashboardControlTrackCountAxis.AxisName" xml:space="preserve">
|
||||||
<value>タイムズ</value>
|
<value>回</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="StatsDashboardControlTrackCountText.Text" xml:space="preserve">
|
<data name="StatsDashboardControlTrackCountText.Text" xml:space="preserve">
|
||||||
<value>タイムズ</value>
|
<value>回</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="StatsDashboardControlTracksPlayed.Text" xml:space="preserve">
|
<data name="StatsDashboardControlTracksPlayed.Text" xml:space="preserve">
|
||||||
<value>再生された曲の数</value>
|
<value>再生された曲の数</value>
|
||||||
@@ -1555,7 +1558,7 @@
|
|||||||
<value>歌詞ウィンドウスイッチャー</value>
|
<value>歌詞ウィンドウスイッチャー</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TaskbarMode" xml:space="preserve">
|
<data name="TaskbarMode" xml:space="preserve">
|
||||||
<value>タスクバー モード</value>
|
<value>タスクバーモード</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TermsOfService.Content" xml:space="preserve">
|
<data name="TermsOfService.Content" xml:space="preserve">
|
||||||
<value>利用規約</value>
|
<value>利用規約</value>
|
||||||
|
|||||||
@@ -1482,6 +1482,9 @@
|
|||||||
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
||||||
<value>가장 활동적인</value>
|
<value>가장 활동적인</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="StatsDashboardControlRecording.Title" xml:space="preserve">
|
||||||
|
<value>스크러블...</value>
|
||||||
|
</data>
|
||||||
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
||||||
<value>출처</value>
|
<value>출처</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -1482,6 +1482,9 @@
|
|||||||
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
||||||
<value>Paling Aktif</value>
|
<value>Paling Aktif</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="StatsDashboardControlRecording.Title" xml:space="preserve">
|
||||||
|
<value>Rakaman...</value>
|
||||||
|
</data>
|
||||||
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
||||||
<value>Sumber</value>
|
<value>Sumber</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -1482,6 +1482,9 @@
|
|||||||
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
||||||
<value>Mais activos</value>
|
<value>Mais activos</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="StatsDashboardControlRecording.Title" xml:space="preserve">
|
||||||
|
<value>A fazer barulho...</value>
|
||||||
|
</data>
|
||||||
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
||||||
<value>Fontes</value>
|
<value>Fontes</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -1482,6 +1482,9 @@
|
|||||||
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
||||||
<value>Самые активные</value>
|
<value>Самые активные</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="StatsDashboardControlRecording.Title" xml:space="preserve">
|
||||||
|
<value>Скроблинг...</value>
|
||||||
|
</data>
|
||||||
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
||||||
<value>Источники</value>
|
<value>Источники</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -1482,6 +1482,9 @@
|
|||||||
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
||||||
<value>กิจกรรมล่าสุด</value>
|
<value>กิจกรรมล่าสุด</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="StatsDashboardControlRecording.Title" xml:space="preserve">
|
||||||
|
<value>กำลังส่งข้อมูล...</value>
|
||||||
|
</data>
|
||||||
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
||||||
<value>แหล่งข้อมูล</value>
|
<value>แหล่งข้อมูล</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -1482,6 +1482,9 @@
|
|||||||
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
||||||
<value>Hoạt động nhiều nhất</value>
|
<value>Hoạt động nhiều nhất</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="StatsDashboardControlRecording.Title" xml:space="preserve">
|
||||||
|
<value>Đang ghi lại...</value>
|
||||||
|
</data>
|
||||||
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
||||||
<value>Nguồn</value>
|
<value>Nguồn</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -1482,6 +1482,9 @@
|
|||||||
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
||||||
<value>最活跃时段</value>
|
<value>最活跃时段</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="StatsDashboardControlRecording.Title" xml:space="preserve">
|
||||||
|
<value>记录中...</value>
|
||||||
|
</data>
|
||||||
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
||||||
<value>播放源</value>
|
<value>播放源</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -193,7 +193,7 @@
|
|||||||
<value>已偵測到根目錄路徑。全磁碟索引可能包含大量非媒體檔案,導致掃描時間過長。建議指定特定的子目錄。</value>
|
<value>已偵測到根目錄路徑。全磁碟索引可能包含大量非媒體檔案,導致掃描時間過長。建議指定特定的子目錄。</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="FileSystemServiceWaitingForScan" xml:space="preserve">
|
<data name="FileSystemServiceWaitingForScan" xml:space="preserve">
|
||||||
<value>等待掃描...</value>
|
<value>準備掃描...</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="FullscreenMode" xml:space="preserve">
|
<data name="FullscreenMode" xml:space="preserve">
|
||||||
<value>全螢幕模式</value>
|
<value>全螢幕模式</value>
|
||||||
@@ -418,7 +418,7 @@
|
|||||||
<value>媒體庫同步中...</value>
|
<value>媒體庫同步中...</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MusicGalleryPageDataSyncError.Message" xml:space="preserve">
|
<data name="MusicGalleryPageDataSyncError.Message" xml:space="preserve">
|
||||||
<value>媒體庫同步有問題</value>
|
<value>媒體庫同步出現問題</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MusicGalleryPageEmptyPlayingQueue.Text" xml:space="preserve">
|
<data name="MusicGalleryPageEmptyPlayingQueue.Text" xml:space="preserve">
|
||||||
<value>清除播放佇列</value>
|
<value>清除播放佇列</value>
|
||||||
@@ -1482,6 +1482,9 @@
|
|||||||
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
<data name="StatsDashboardControlMostActive.Text" xml:space="preserve">
|
||||||
<value>最活躍</value>
|
<value>最活躍</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="StatsDashboardControlRecording.Title" xml:space="preserve">
|
||||||
|
<value>記錄中...</value>
|
||||||
|
</data>
|
||||||
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
<data name="StatsDashboardControlSources.Text" xml:space="preserve">
|
||||||
<value>來源</value>
|
<value>來源</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ using System.Threading.Tasks;
|
|||||||
namespace BetterLyrics.WinUI3.ViewModels
|
namespace BetterLyrics.WinUI3.ViewModels
|
||||||
{
|
{
|
||||||
public partial class LyricsSearchControlViewModel : BaseViewModel,
|
public partial class LyricsSearchControlViewModel : BaseViewModel,
|
||||||
IRecipient<PropertyChangedMessage<SongInfo?>>
|
IRecipient<PropertyChangedMessage<SongInfo>>
|
||||||
{
|
{
|
||||||
private readonly ILyricsSearchService _lyricsSearchService;
|
private readonly ILyricsSearchService _lyricsSearchService;
|
||||||
private readonly IGSMTCService _gsmtcService;
|
private readonly IGSMTCService _gsmtcService;
|
||||||
@@ -121,7 +121,7 @@ namespace BetterLyrics.WinUI3.ViewModels
|
|||||||
LyricsSearchResults = [..await Task.Run(async () =>
|
LyricsSearchResults = [..await Task.Run(async () =>
|
||||||
{
|
{
|
||||||
var result = await _lyricsSearchService.SearchAllAsync(
|
var result = await _lyricsSearchService.SearchAllAsync(
|
||||||
((SongInfo?)_gsmtcService.CurrentSongInfo?.Clone() ?? new())
|
((SongInfo)_gsmtcService.CurrentSongInfo.Clone())
|
||||||
.WithTitle(MappedSongSearchQuery.MappedTitle)
|
.WithTitle(MappedSongSearchQuery.MappedTitle)
|
||||||
.WithArtist(MappedSongSearchQuery.MappedArtist.SplitByCommonSplitter())
|
.WithArtist(MappedSongSearchQuery.MappedArtist.SplitByCommonSplitter())
|
||||||
.WithAlbum(MappedSongSearchQuery.MappedAlbum),
|
.WithAlbum(MappedSongSearchQuery.MappedAlbum),
|
||||||
@@ -194,7 +194,7 @@ namespace BetterLyrics.WinUI3.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Receive(PropertyChangedMessage<SongInfo?> message)
|
public void Receive(PropertyChangedMessage<SongInfo> message)
|
||||||
{
|
{
|
||||||
if (message.Sender is IGSMTCService)
|
if (message.Sender is IGSMTCService)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,10 +3,13 @@ using BetterLyrics.WinUI3.Helper;
|
|||||||
using BetterLyrics.WinUI3.Models;
|
using BetterLyrics.WinUI3.Models;
|
||||||
using BetterLyrics.WinUI3.Models.Stats;
|
using BetterLyrics.WinUI3.Models.Stats;
|
||||||
using BetterLyrics.WinUI3.Services.AlbumArtSearchService;
|
using BetterLyrics.WinUI3.Services.AlbumArtSearchService;
|
||||||
|
using BetterLyrics.WinUI3.Services.GSMTCService;
|
||||||
using BetterLyrics.WinUI3.Services.LocalizationService;
|
using BetterLyrics.WinUI3.Services.LocalizationService;
|
||||||
using BetterLyrics.WinUI3.Services.PlayHistoryService;
|
using BetterLyrics.WinUI3.Services.PlayHistoryService;
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
|
using CommunityToolkit.Mvvm.Messaging;
|
||||||
|
using CommunityToolkit.Mvvm.Messaging.Messages;
|
||||||
using CommunityToolkit.WinUI;
|
using CommunityToolkit.WinUI;
|
||||||
using LiveChartsCore;
|
using LiveChartsCore;
|
||||||
using LiveChartsCore.Kernel;
|
using LiveChartsCore.Kernel;
|
||||||
@@ -27,7 +30,7 @@ using System.Xml.Linq;
|
|||||||
|
|
||||||
namespace BetterLyrics.WinUI3.ViewModels
|
namespace BetterLyrics.WinUI3.ViewModels
|
||||||
{
|
{
|
||||||
public partial class StatsDashboardControlViewModel : BaseViewModel
|
public partial class StatsDashboardControlViewModel : BaseViewModel, IRecipient<PropertyChangedMessage<bool>>
|
||||||
{
|
{
|
||||||
private readonly IPlayHistoryService _playHistoryService;
|
private readonly IPlayHistoryService _playHistoryService;
|
||||||
private readonly ILocalizationService _localizationService;
|
private readonly ILocalizationService _localizationService;
|
||||||
@@ -37,6 +40,8 @@ namespace BetterLyrics.WinUI3.ViewModels
|
|||||||
|
|
||||||
private readonly DispatcherQueueTimer _timer;
|
private readonly DispatcherQueueTimer _timer;
|
||||||
|
|
||||||
|
[ObservableProperty] public partial IGSMTCService GSMTCService { get; set; }
|
||||||
|
|
||||||
[ObservableProperty] public partial bool IsLoading { get; set; } = false;
|
[ObservableProperty] public partial bool IsLoading { get; set; } = false;
|
||||||
|
|
||||||
// 时间筛选
|
// 时间筛选
|
||||||
@@ -67,11 +72,16 @@ namespace BetterLyrics.WinUI3.ViewModels
|
|||||||
// 歌曲
|
// 歌曲
|
||||||
[ObservableProperty] public partial ObservableCollection<SongPlayCount> TopSongs { get; set; } = new();
|
[ObservableProperty] public partial ObservableCollection<SongPlayCount> TopSongs { get; set; } = new();
|
||||||
|
|
||||||
public StatsDashboardControlViewModel(IPlayHistoryService playHistoryService, ILocalizationService localizationService, IAlbumArtSearchService albumArtSearchService)
|
public StatsDashboardControlViewModel(
|
||||||
|
IPlayHistoryService playHistoryService,
|
||||||
|
ILocalizationService localizationService,
|
||||||
|
IAlbumArtSearchService albumArtSearchService,
|
||||||
|
IGSMTCService gsmtcService)
|
||||||
{
|
{
|
||||||
_playHistoryService = playHistoryService;
|
_playHistoryService = playHistoryService;
|
||||||
_localizationService = localizationService;
|
_localizationService = localizationService;
|
||||||
_albumArtSearchService = albumArtSearchService;
|
_albumArtSearchService = albumArtSearchService;
|
||||||
|
GSMTCService = gsmtcService;
|
||||||
|
|
||||||
_localizedTimesValue = _localizationService.GetLocalizedString("StatsDashboardControlTimes");
|
_localizedTimesValue = _localizationService.GetLocalizedString("StatsDashboardControlTimes");
|
||||||
|
|
||||||
@@ -194,7 +204,7 @@ namespace BetterLyrics.WinUI3.ViewModels
|
|||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
public void RefreshData()
|
private void RefreshData()
|
||||||
{
|
{
|
||||||
if (IsCustomRangeSelected)
|
if (IsCustomRangeSelected)
|
||||||
{
|
{
|
||||||
@@ -264,5 +274,18 @@ namespace BetterLyrics.WinUI3.ViewModels
|
|||||||
LoadData(); // 生成完刷新
|
LoadData(); // 生成完刷新
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Receive(PropertyChangedMessage<bool> message)
|
||||||
|
{
|
||||||
|
if (message.Sender is IGSMTCService)
|
||||||
|
{
|
||||||
|
if (message.PropertyName == nameof(IGSMTCService.IsScrobbled))
|
||||||
|
{
|
||||||
|
if (message.NewValue == true)
|
||||||
|
{
|
||||||
|
RefreshData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,7 +27,7 @@ using Windows.Storage.Streams;
|
|||||||
namespace BetterLyrics.WinUI3.Views
|
namespace BetterLyrics.WinUI3.Views
|
||||||
{
|
{
|
||||||
public sealed partial class NowPlayingPage : Page,
|
public sealed partial class NowPlayingPage : Page,
|
||||||
IRecipient<PropertyChangedMessage<SongInfo?>>,
|
IRecipient<PropertyChangedMessage<SongInfo>>,
|
||||||
IRecipient<PropertyChangedMessage<LyricsLayoutOrientation>>,
|
IRecipient<PropertyChangedMessage<LyricsLayoutOrientation>>,
|
||||||
IRecipient<PropertyChangedMessage<LyricsDisplayType>>,
|
IRecipient<PropertyChangedMessage<LyricsDisplayType>>,
|
||||||
IRecipient<PropertyChangedMessage<int>>,
|
IRecipient<PropertyChangedMessage<int>>,
|
||||||
@@ -114,9 +114,9 @@ namespace BetterLyrics.WinUI3.Views
|
|||||||
var artistsFontSize = albumArtLayoutSettings.IsAutoSongInfoFontSize ? lyricsLayoutMetrics.ArtistNameSize : albumArtLayoutSettings.SongInfoFontSize * 0.8;
|
var artistsFontSize = albumArtLayoutSettings.IsAutoSongInfoFontSize ? lyricsLayoutMetrics.ArtistNameSize : albumArtLayoutSettings.SongInfoFontSize * 0.8;
|
||||||
var albumFontSize = albumArtLayoutSettings.IsAutoSongInfoFontSize ? lyricsLayoutMetrics.AlbumNameSize : albumArtLayoutSettings.SongInfoFontSize * 0.8;
|
var albumFontSize = albumArtLayoutSettings.IsAutoSongInfoFontSize ? lyricsLayoutMetrics.AlbumNameSize : albumArtLayoutSettings.SongInfoFontSize * 0.8;
|
||||||
|
|
||||||
RenderTextBlock(TitleTextBlock, _gsmtcService.CurrentSongInfo?.Title, titleFontSize);
|
RenderTextBlock(TitleTextBlock, _gsmtcService.CurrentSongInfo.Title, titleFontSize);
|
||||||
RenderTextBlock(ArtistsTextBlock, _gsmtcService.CurrentSongInfo?.DisplayArtists, artistsFontSize);
|
RenderTextBlock(ArtistsTextBlock, _gsmtcService.CurrentSongInfo.DisplayArtists, artistsFontSize);
|
||||||
RenderTextBlock(AlbumTextBlock, _gsmtcService.CurrentSongInfo?.Album, albumFontSize);
|
RenderTextBlock(AlbumTextBlock, _gsmtcService.CurrentSongInfo.Album, albumFontSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateSongInfoOpacity()
|
private void UpdateSongInfoOpacity()
|
||||||
@@ -139,6 +139,15 @@ namespace BetterLyrics.WinUI3.Views
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async void RefreshSongInfo()
|
||||||
|
{
|
||||||
|
SongInfoStackPanel.Opacity = 0;
|
||||||
|
await Task.Delay(Constants.Time.AnimationDuration);
|
||||||
|
RenderSongInfo();
|
||||||
|
SongInfoStackPanel.Opacity = 1;
|
||||||
|
UpdateSongInfoOpacity();
|
||||||
|
}
|
||||||
|
|
||||||
// ==== AlbumArt
|
// ==== AlbumArt
|
||||||
private void UpdateAlbumArtOpacity()
|
private void UpdateAlbumArtOpacity()
|
||||||
{
|
{
|
||||||
@@ -575,17 +584,13 @@ namespace BetterLyrics.WinUI3.Views
|
|||||||
|
|
||||||
// ====
|
// ====
|
||||||
|
|
||||||
public async void Receive(PropertyChangedMessage<SongInfo?> message)
|
public async void Receive(PropertyChangedMessage<SongInfo> message)
|
||||||
{
|
{
|
||||||
if (message.Sender is IGSMTCService)
|
if (message.Sender is IGSMTCService)
|
||||||
{
|
{
|
||||||
if (message.PropertyName == nameof(IGSMTCService.CurrentSongInfo))
|
if (message.PropertyName == nameof(IGSMTCService.CurrentSongInfo))
|
||||||
{
|
{
|
||||||
SongInfoStackPanel.Opacity = 0;
|
RefreshSongInfo();
|
||||||
await Task.Delay(Constants.Time.AnimationDuration);
|
|
||||||
RenderSongInfo();
|
|
||||||
SongInfoStackPanel.Opacity = 1;
|
|
||||||
UpdateSongInfoOpacity();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -686,5 +691,6 @@ namespace BetterLyrics.WinUI3.Views
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user