private static void CreateTaskWithAid(string aid, string page = "1") { new Thread(delegate() { TaskBuilder.Build(aid, page); }).Start(); }
public static void NewMultiTask(string text, int partStart, int partEnd) { // 发现分集结束位置小于开始位置时,交换partStart和partEnd的值 if (partEnd < partStart) { int temp = partStart; partStart = partEnd; partEnd = temp; } var normalMatch = regexNormalPattern.Match(text); if (normalMatch.Success) { var aid = normalMatch.Groups[1].Value; Data.NotificationData.GetInstance().Add(new Classes.NotifictionMessage(Classes.NotificationLevel.Info, "多集任务aid" + aid + "已开始解析! 请稍等.")); TaskBuilder.Build(aid, partStart, partEnd); } else { Data.NotificationData.GetInstance().Add (new Classes.NotifictionMessage(Classes.NotificationLevel.Error, "无效的地址, 请输入带有av(aid)号的地址!")); return; } }
public static void CreateTask(FetcherTaskToken token) { Task.Run(() => TaskBuilder.Build(token)); Data.NotificationData.AddNotifiction(NotificationLevel.Info, $"任务aid{token.Aid}已开始解析! 请稍等."); //new Thread(delegate () //{ // TaskBuilder.Build(token); //}).Start(); }
public static void NewMultiTask(string text) { var normalMatch = regexNormalPattern.Match(text); if (normalMatch.Success) { var aid = normalMatch.Groups[1].Value; Data.NotificationData.AddNotifiction(NotificationLevel.Info, "多集任务aid" + aid + "已开始解析! 请稍等."); TaskBuilder.Build(aid); } else { Data.NotificationData.AddErrorNotifiction("无效的地址, 请输入带有av(aid)号的地址!"); return; } }