Skip to content

Commit

Permalink
修改选择下载多线程逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
CHKZL committed Sep 12, 2019
1 parent ff9ba55 commit 495ef1b
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Auxiliary/Downloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public static Downloader 新建下载对象(string 平台,string 唯一码,strin
备注 = 备注
};
MMPU.DownList.Add(下载对象);
下载对象.Start(标题);
下载对象.Start(备注);

return 下载对象;
}
Expand Down
53 changes: 27 additions & 26 deletions DDTV_New/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -854,35 +854,36 @@ private void 录制按钮点击事件(object sender, RoutedEventArgs e)
System.Windows.MessageBox.Show("未选择");
return;
}
switch (MMPU.获取livelist平台和唯一码.平台(已选内容))
{
case "bilibili":
if (!bilibili.根据房间号获取房间信息.是否正在直播(MMPU.获取livelist平台和唯一码.唯一码(已选内容)))
{
System.Windows.MessageBox.Show("该房间当前未直播");
new Thread(new ThreadStart(delegate {
switch (MMPU.获取livelist平台和唯一码.平台(已选内容))
{
case "bilibili":
if (!bilibili.根据房间号获取房间信息.是否正在直播(MMPU.获取livelist平台和唯一码.唯一码(已选内容)))
{
System.Windows.MessageBox.Show("该房间当前未直播");
return;
}
break;
default:
System.Windows.MessageBox.Show("发现了与当前版本不支持的平台,请检查更新");
return;
}
break;
default:
System.Windows.MessageBox.Show("发现了与当前版本不支持的平台,请检查更新");
}
string GUID = Guid.NewGuid().ToString();
string 标题 = bilibili.根据房间号获取房间信息.获取标题(MMPU.获取livelist平台和唯一码.唯一码(已选内容));
string 下载地址 = string.Empty;
try
{
下载地址 = bilibili.根据房间号获取房间信息.下载地址(MMPU.获取livelist平台和唯一码.唯一码(已选内容));
}
catch (Exception)
{
System.Windows.MessageBox.Show("获取下载地址失败");
return;
}
string GUID = Guid.NewGuid().ToString();
string 标题 = bilibili.根据房间号获取房间信息.获取标题(MMPU.获取livelist平台和唯一码.唯一码(已选内容));
string 下载地址 = string.Empty;
try
{
下载地址 = bilibili.根据房间号获取房间信息.下载地址(MMPU.获取livelist平台和唯一码.唯一码(已选内容));
}
catch (Exception)
{
System.Windows.MessageBox.Show("获取下载地址失败");
return;
}
Downloader 下载对象 = Downloader.新建下载对象(MMPU.获取livelist平台和唯一码.平台(已选内容), MMPU.获取livelist平台和唯一码.唯一码(已选内容), 标题, GUID, 下载地址, "手动下载任务", true);

System.Windows.MessageBox.Show("下载任务添加完成");
}
Downloader 下载对象 = Downloader.新建下载对象(MMPU.获取livelist平台和唯一码.平台(已选内容), MMPU.获取livelist平台和唯一码.唯一码(已选内容), 标题, GUID, 下载地址, "手动下载任务", true);

System.Windows.MessageBox.Show("下载任务添加完成");
})).Start();
}

private void 显示下载队列按钮点击事件(object sender, RoutedEventArgs e)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DDTV_New/软件图/下载界面.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DDTV_New/软件图/刷新.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DDTV_New/软件图/单推监控.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DDTV_New/软件图/卡顿重连.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DDTV_New/软件图/干净播放界面.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DDTV_New/软件图/播放准备界面.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DDTV_New/软件图/播放弹幕界面.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DDTV_New/软件图/首页.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 495ef1b

Please sign in to comment.