void SetVideoInfo(VideoInfoA a) { if (a.http.Length == 0) { return; } via = a; SharpItem[] vi = via.vi; ChangeSharp(defsharp, done); }
void SetVideoInfo(VideoInfoA a) { if (a.http.Length == 0) { Timer.Stop(); Main.Notify("解析失败", 5000); return; } via = a; SharpItem[] vi = via.vi; ChangeSharp(defsharp); }
static async void GetVideoInfo(string p, string vid, Action <VideoInfoA> callback) { string s = await WebClass.Post("http://vv.video.qq.com/getinfo", p, "http://imgcache.qq.com/tencentvideo_v1/playerv3/TencentPlayer.swf?max_age=86400&v=20161114"); char[] c = s.ToCharArray(); c = DeleteChar(ref c, '\\'); VideoInfoA vi = new VideoInfoA(); vi.vid = vid; vi.http = GetHttp(ref c); GetVI(ref c, ref vi); if (vi.fregment > 0) { string[] md5 = new string[vi.fregment]; GetCmd5(ref c, ref md5); vi.cmd5 = md5; } callback(vi); }
static void SetVideoInfo(VideoInfoA via) { VIA = via; VideoInfo[] vi = via.vi; char[] temp = vi[0].sharp.ToCharArray(); int s = CharToInt(ref temp); int c = 0; for (int i = 1; i < vi.Length; i++) { temp = vi[i].sharp.ToCharArray(); int t = CharToInt(ref temp); if (t > s) { s = t; c = i; } } View_VI.down_index = c; WebClass.GetVideoKey(via.vid, via.vi[c], (v, vk) => { VIA.vi[View_VI.down_index].vkey = vk; }, 1); WebClass.GetVideoFregment(via.vid, via.vi[c], GetFregment); }
static void GetVI(ref char[] source, ref VideoInfoA vi) { int t = FindCharArray(ref source, ref Key_td, 0); char[] tt = FindCharArrayA(ref source, '\"', '\"', ref t); vi.alltime = CharToInt(ref tt); t = FindCharArray(ref source, ref Key_ti, t); tt = FindCharArrayA(ref source, '\"', '\"', ref t); vi.title = new string(tt); t = FindCharArray(ref source, ref Key_fc, 0); tt = FindCharArrayA(ref source, ':', ',', ref t); vi.fregment = CharToInt(ref tt); int s = 0; int a = FindCharArray(ref source, ref Key_fn, 0); char[] fn = FindCharArrayA(ref source, '\"', '.', ref a); vi.fn = new string(fn); a++; if (source[a] != 'p') { vi.type = 1; } else { vi.type = 0; } SharpItem[] temp = new SharpItem[6]; int c = s = 0; for (int i = 0; i < 6; i++) { tt = FindCharArrayA(ref source, '(', ')', ref s); if (tt == null) { SharpItem[] r = new SharpItem[c]; for (int d = 0; d < c; d++) { r[d] = temp[d]; } vi.vi = r; return; } SharpItem VI = new SharpItem(); VI.sharp = new string(tt); VI.sharpA = CharToInt(ref tt); s = FindCharArray(ref source, ref Key_idA, s); tt = FindCharArrayA(ref source, ':', ',', ref s); if (tt != null) { if (tt.Length > 2) { s = FindCharArray(ref source, ref Key_name, s); VI.fmt = new string(FindCharArrayA(ref source, '\"', '\"', ref s)); string str = new string(CopyCharArry(ref tt, tt.Length - 3, 3)); VI.fid = "10" + str; VI.pid = ".p" + str + "."; temp[c] = VI; } else { s = FindCharArray(ref source, ref Key_name, s); VI.fmt = new string(FindCharArrayA(ref source, '\"', '\"', ref s)); a = FindCharArray(ref source, ref Key_fvkey, a); VI.vkey = new string(FindCharArrayA(ref source, '\"', '\"', ref a)); temp[c] = VI; } c++; } } }