|
|
|
@ -26,68 +26,72 @@ namespace DownKyi.Services
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public bool BiliInput(string input, string parentViewName, IEventAggregator eventAggregator)
|
|
|
|
|
{
|
|
|
|
|
// 移除剪贴板id
|
|
|
|
|
string justId = input.Replace(AppConstant.ClipboardId, "");
|
|
|
|
|
|
|
|
|
|
// 视频
|
|
|
|
|
if (ParseEntrance.IsAvId(input))
|
|
|
|
|
if (ParseEntrance.IsAvId(justId))
|
|
|
|
|
{
|
|
|
|
|
NavigateToView.NavigationView(eventAggregator, ViewVideoDetailViewModel.Tag, parentViewName, $"{ParseEntrance.VideoUrl}{input.ToLower()}");
|
|
|
|
|
}
|
|
|
|
|
else if (ParseEntrance.IsAvUrl(input))
|
|
|
|
|
else if (ParseEntrance.IsAvUrl(justId))
|
|
|
|
|
{
|
|
|
|
|
NavigateToView.NavigationView(eventAggregator, ViewVideoDetailViewModel.Tag, parentViewName, input);
|
|
|
|
|
}
|
|
|
|
|
else if (ParseEntrance.IsBvId(input))
|
|
|
|
|
else if (ParseEntrance.IsBvId(justId))
|
|
|
|
|
{
|
|
|
|
|
NavigateToView.NavigationView(eventAggregator, ViewVideoDetailViewModel.Tag, parentViewName, $"{ParseEntrance.VideoUrl}{input}");
|
|
|
|
|
}
|
|
|
|
|
else if (ParseEntrance.IsBvUrl(input))
|
|
|
|
|
else if (ParseEntrance.IsBvUrl(justId))
|
|
|
|
|
{
|
|
|
|
|
NavigateToView.NavigationView(eventAggregator, ViewVideoDetailViewModel.Tag, parentViewName, input);
|
|
|
|
|
}
|
|
|
|
|
// 番剧(电影、电视剧)
|
|
|
|
|
else if (ParseEntrance.IsBangumiSeasonId(input))
|
|
|
|
|
else if (ParseEntrance.IsBangumiSeasonId(justId))
|
|
|
|
|
{
|
|
|
|
|
NavigateToView.NavigationView(eventAggregator, ViewVideoDetailViewModel.Tag, parentViewName, $"{ParseEntrance.BangumiUrl}{input.ToLower()}");
|
|
|
|
|
}
|
|
|
|
|
else if (ParseEntrance.IsBangumiSeasonUrl(input))
|
|
|
|
|
else if (ParseEntrance.IsBangumiSeasonUrl(justId))
|
|
|
|
|
{
|
|
|
|
|
NavigateToView.NavigationView(eventAggregator, ViewVideoDetailViewModel.Tag, parentViewName, input);
|
|
|
|
|
}
|
|
|
|
|
else if (ParseEntrance.IsBangumiEpisodeId(input))
|
|
|
|
|
else if (ParseEntrance.IsBangumiEpisodeId(justId))
|
|
|
|
|
{
|
|
|
|
|
NavigateToView.NavigationView(eventAggregator, ViewVideoDetailViewModel.Tag, parentViewName, $"{ParseEntrance.BangumiUrl}{input.ToLower()}");
|
|
|
|
|
}
|
|
|
|
|
else if (ParseEntrance.IsBangumiEpisodeUrl(input))
|
|
|
|
|
else if (ParseEntrance.IsBangumiEpisodeUrl(justId))
|
|
|
|
|
{
|
|
|
|
|
NavigateToView.NavigationView(eventAggregator, ViewVideoDetailViewModel.Tag, parentViewName, input);
|
|
|
|
|
}
|
|
|
|
|
else if (ParseEntrance.IsBangumiMediaId(input))
|
|
|
|
|
else if (ParseEntrance.IsBangumiMediaId(justId))
|
|
|
|
|
{
|
|
|
|
|
NavigateToView.NavigationView(eventAggregator, ViewVideoDetailViewModel.Tag, parentViewName, $"{ParseEntrance.BangumiMediaUrl}{input.ToLower()}");
|
|
|
|
|
}
|
|
|
|
|
else if (ParseEntrance.IsBangumiMediaUrl(input))
|
|
|
|
|
else if (ParseEntrance.IsBangumiMediaUrl(justId))
|
|
|
|
|
{
|
|
|
|
|
NavigateToView.NavigationView(eventAggregator, ViewVideoDetailViewModel.Tag, parentViewName, input);
|
|
|
|
|
}
|
|
|
|
|
// 课程
|
|
|
|
|
else if (ParseEntrance.IsCheeseSeasonUrl(input) || ParseEntrance.IsCheeseEpisodeUrl(input))
|
|
|
|
|
else if (ParseEntrance.IsCheeseSeasonUrl(justId)
|
|
|
|
|
|| ParseEntrance.IsCheeseEpisodeUrl(justId))
|
|
|
|
|
{
|
|
|
|
|
NavigateToView.NavigationView(eventAggregator, ViewVideoDetailViewModel.Tag, parentViewName, input);
|
|
|
|
|
}
|
|
|
|
|
// 用户(参数传入mid)
|
|
|
|
|
else if (ParseEntrance.IsUserId(input))
|
|
|
|
|
else if (ParseEntrance.IsUserId(justId))
|
|
|
|
|
{
|
|
|
|
|
NavigateToView.NavigateToViewUserSpace(eventAggregator, ViewIndexViewModel.Tag, ParseEntrance.GetUserId(input));
|
|
|
|
|
}
|
|
|
|
|
else if (ParseEntrance.IsUserUrl(input))
|
|
|
|
|
else if (ParseEntrance.IsUserUrl(justId))
|
|
|
|
|
{
|
|
|
|
|
NavigateToView.NavigateToViewUserSpace(eventAggregator, ViewIndexViewModel.Tag, ParseEntrance.GetUserId(input));
|
|
|
|
|
}
|
|
|
|
|
// 收藏夹
|
|
|
|
|
else if (ParseEntrance.IsFavoritesId(input))
|
|
|
|
|
else if (ParseEntrance.IsFavoritesId(justId))
|
|
|
|
|
{
|
|
|
|
|
NavigateToView.NavigationView(eventAggregator, ViewPublicFavoritesViewModel.Tag, parentViewName, ParseEntrance.GetFavoritesId(input));
|
|
|
|
|
}
|
|
|
|
|
else if (ParseEntrance.IsFavoritesUrl(input))
|
|
|
|
|
else if (ParseEntrance.IsFavoritesUrl(justId))
|
|
|
|
|
{
|
|
|
|
|
NavigateToView.NavigationView(eventAggregator, ViewPublicFavoritesViewModel.Tag, parentViewName, ParseEntrance.GetFavoritesId(input));
|
|
|
|
|
}
|
|
|
|
|