diff --git a/DownKyi/ViewModels/ViewIndexViewModel.cs b/DownKyi/ViewModels/ViewIndexViewModel.cs index ee1fbc8..9eaeb10 100644 --- a/DownKyi/ViewModels/ViewIndexViewModel.cs +++ b/DownKyi/ViewModels/ViewIndexViewModel.cs @@ -12,6 +12,7 @@ using Prism.Regions; using Prism.Services.Dialogs; using System; using System.IO; +using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Windows; using System.Windows.Media.Imaging; @@ -214,7 +215,7 @@ namespace DownKyi.ViewModels } LogManager.Debug(Tag, $"InputText: {InputText}"); - + InputText = Regex.Replace(InputText, @"[【]*[^【]*[^】]*[】 ]", ""); SearchService searchService = new SearchService(); bool isSupport = searchService.BiliInput(InputText, Tag, eventAggregator); if (!isSupport) diff --git a/DownKyi/ViewModels/ViewVideoDetailViewModel.cs b/DownKyi/ViewModels/ViewVideoDetailViewModel.cs index 1ed6c46..b5c170f 100644 --- a/DownKyi/ViewModels/ViewVideoDetailViewModel.cs +++ b/DownKyi/ViewModels/ViewVideoDetailViewModel.cs @@ -18,6 +18,7 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; +using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Windows; @@ -184,7 +185,7 @@ namespace DownKyi.ViewModels if (InputText == null || InputText == string.Empty) { return; } LogManager.Debug(Tag, $"InputText: {InputText}"); - + InputText = Regex.Replace(InputText, @"[【]*[^【]*[^】]*[】 ]", ""); input = InputText; // 更新页面