diff --git a/src/BiliLite.UWP/Services/MessageCenter.cs b/src/BiliLite.UWP/Services/MessageCenter.cs index ba2fb431..0d916fd1 100644 --- a/src/BiliLite.UWP/Services/MessageCenter.cs +++ b/src/BiliLite.UWP/Services/MessageCenter.cs @@ -104,6 +104,31 @@ public static async Task HandelUrl(string url, bool dontGoTo = false) { url = await BiliExtensions.GetShortLinkLocation(url); } + + + + /* + * 直播 + * http://live.bilibili.com/live/5619438.html + * http://live.bilibili.com/h5/5619438 + * http://live.bilibili.com/5619438 + * bilibili://live/5619438 + */ + + var live = StringExtensions.RegexMatch(url.Replace("h5", "live").Replace("live.bilibili.com", "live").Replace("/", ""), @"live(\d+)"); + if (live != "") + { + NavigateToPage(null, new NavigationInfo() + { + icon = Symbol.Video, + page = typeof(LiveDetailPage), + title = "直播间加载中...", + parameters = live, + dontGoTo = dontGoTo, + }); + return true; + } + /* * 视频 * https://www.bilibili.com/video/av3905642 @@ -265,28 +290,6 @@ await BiliExtensions.BangumiEpidToSid(bangumi), - /* - * 直播 - * http://live.bilibili.com/live/5619438.html - * http://live.bilibili.com/h5/5619438 - * http://live.bilibili.com/5619438 - * bilibili://live/5619438 - */ - - var live = StringExtensions.RegexMatch(url.Replace("h5", "live").Replace("live.bilibili.com", "live").Replace("/", ""), @"live(\d+)"); - if (live != "") - { - NavigateToPage(null, new NavigationInfo() - { - icon = Symbol.Video, - page = typeof(LiveDetailPage), - title = "直播间加载中...", - parameters = live, - dontGoTo = dontGoTo, - }); - return true; - } - ///* // * 小视频 // * http://vc.bilibili.com/mobile/detail?vc=1399466&bilifrom=1