예제 #1
0
        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);
            }
        }
예제 #2
0
        /// <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);
            });
        }