public VideoInfoService(string input) { if (input == null) { return; } if (ParseEntrance.IsAvId(input) || ParseEntrance.IsAvUrl(input)) { long avid = ParseEntrance.GetAvId(input); videoView = VideoInfo.VideoViewInfo(null, avid); } if (ParseEntrance.IsBvId(input) || ParseEntrance.IsBvUrl(input)) { string bvid = ParseEntrance.GetBvId(input); videoView = VideoInfo.VideoViewInfo(bvid); } }
/// <summary> /// 输入avid事件 /// </summary> private async void ExecuteAvidCommand(string parameter) { if (parameter == null) { return; } if (!ParseEntrance.IsAvId(parameter)) { return; } long avid = ParseEntrance.GetAvId(parameter); if (avid == -1) { return; } await Task.Run(() => { Bvid = BvId.Av2Bv((ulong)avid); }); }