chores: Add spliter hint for search control

This commit is contained in:
Zhe Fang
2025-11-17 19:56:07 -05:00
parent d97f5fec37
commit 8d909da139
10 changed files with 43 additions and 3 deletions

View File

@@ -12,7 +12,7 @@
<Identity
Name="37412.BetterLyrics"
Publisher="CN=E1428B0E-DC1D-4EA4-ACB1-4556569D5BA9"
Version="1.0.123.0" />
Version="1.0.124.0" />
<mp:PhoneIdentity PhoneProductId="ca4a4830-fc19-40d9-b823-53e2bff3d816" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

View File

@@ -111,6 +111,7 @@
<ItemGroup>
<TrimmerRootAssembly Include="TagLibSharp" />
<TrimmerRootAssembly Include="NAudio.Wasapi" />
<TrimmerRootAssembly Include="Vanara.PInvoke.Shell32" />
</ItemGroup>
<ItemGroup>
<Content Update="Assets\AlbumArtPlaceholder.png">

View File

@@ -69,6 +69,17 @@
<TextBlock x:Uid="LyricsSearchControlMappedAs" VerticalAlignment="Center" />
<TextBox Text="{x:Bind ViewModel.MappedSongSearchQuery.MappedArtist, Mode=TwoWay}" TextWrapping="Wrap" />
<RichTextBlock Foreground="{ThemeResource TextFillColorSecondaryBrush}" TextWrapping="Wrap">
<Paragraph>
<Run x:Uid="ArtistsSplitHint" />
<Run Text=";" />
<Run Text="," />
<Run Text="/" />
<Run Text="" />
<Run Text="、" />
<Run Text="" />
</Paragraph>
</RichTextBlock>
<Button
VerticalAlignment="Center"
Command="{x:Bind ViewModel.ResetMappedArtistCommand}"

View File

@@ -8,7 +8,20 @@ namespace BetterLyrics.WinUI3.Extensions
{
public static class StringExtensions
{
private static readonly string[] _splitter = [";", "", "、", "/"];
private static readonly string[] _splitter =
[
";"
,
","
,
"/"
,
""
,
"、"
,
""
];
extension(string str)
{

View File

@@ -132,6 +132,9 @@
<data name="AppSettingsControlGeneral.Text" xml:space="preserve">
<value>General</value>
</data>
<data name="ArtistsSplitHint.Text" xml:space="preserve">
<value>When typing multiple artists, please separate them with one of the following delimiters (do not mix them)</value>
</data>
<data name="BaseWindowHostInfoBarCheckBox.Content" xml:space="preserve">
<value>Do not show this message again</value>
</data>

View File

@@ -132,6 +132,9 @@
<data name="AppSettingsControlGeneral.Text" xml:space="preserve">
<value>一般的な</value>
</data>
<data name="ArtistsSplitHint.Text" xml:space="preserve">
<value>複数のアーティストを入力する場合は、次の区切り記号のいずれかで区切ってください(混在しないでください)</value>
</data>
<data name="BaseWindowHostInfoBarCheckBox.Content" xml:space="preserve">
<value>このメッセージを二度と見せないでください</value>
</data>

View File

@@ -132,6 +132,9 @@
<data name="AppSettingsControlGeneral.Text" xml:space="preserve">
<value>일반적인</value>
</data>
<data name="ArtistsSplitHint.Text" xml:space="preserve">
<value>여러 아티스트를 입력할 때 다음 구분 기호 중 하나로 구분하십시오 (혼합하지 마십시오)</value>
</data>
<data name="BaseWindowHostInfoBarCheckBox.Content" xml:space="preserve">
<value>이 메시지를 다시 표시하지 마십시오</value>
</data>

View File

@@ -132,6 +132,9 @@
<data name="AppSettingsControlGeneral.Text" xml:space="preserve">
<value>通用</value>
</data>
<data name="ArtistsSplitHint.Text" xml:space="preserve">
<value>键入多位艺术家时请以下述一种分隔符分隔(不要混用)</value>
</data>
<data name="BaseWindowHostInfoBarCheckBox.Content" xml:space="preserve">
<value>不再显示此消息</value>
</data>

View File

@@ -132,6 +132,9 @@
<data name="AppSettingsControlGeneral.Text" xml:space="preserve">
<value>一般</value>
</data>
<data name="ArtistsSplitHint.Text" xml:space="preserve">
<value>鍵入多位藝術家時請以下述一種分隔符號分隔(不要混用)</value>
</data>
<data name="BaseWindowHostInfoBarCheckBox.Content" xml:space="preserve">
<value>不再顯示此訊息</value>
</data>

View File

@@ -116,7 +116,7 @@ namespace BetterLyrics.WinUI3.ViewModels
return await _lyricsSearchService.SearchAllAsync(
((SongInfo?)_mediaSessionsService.CurrentSongInfo?.Clone() ?? new())
.WithTitle(MappedSongSearchQuery.MappedTitle)
.WithArtist(MappedSongSearchQuery.MappedArtist.Split(ATL.Settings.DisplayValueSeparator))
.WithArtist(MappedSongSearchQuery.MappedArtist.SplitByCommonSplitter())
.WithAlbum(MappedSongSearchQuery.MappedAlbum), token);
}, token)];
IsSearching = false;