Skip to content

Commit

Permalink
初始化仓库,解码完成后加入完成列表。
Browse files Browse the repository at this point in the history
  • Loading branch information
JelinYao committed May 3, 2022
1 parent 9601587 commit 801af15
Show file tree
Hide file tree
Showing 42 changed files with 294 additions and 127 deletions.
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,18 @@
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

*.dy
*.pdb
*.log
*.tlog
*.idb
*.aps
*.iobj
/.vs
/Temp
2 changes: 1 addition & 1 deletion BVLoader.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.32228.343
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BVLoader", "src\BVLoader\VideoLoader.vcxproj", "{8F011E58-EE97-4A49-95B6-F6A33D4759C0}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BVLoader", "src\BVLoader\BVLoader.vcxproj", "{8F011E58-EE97-4A49-95B6-F6A33D4759C0}"
ProjectSection(ProjectDependencies) = postProject
{06A01E97-333D-4309-A605-7D28324D750D} = {06A01E97-333D-4309-A605-7D28324D750D}
{E106ACD7-4E53-4AEE-942B-D0DD426DB34E} = {E106ACD7-4E53-4AEE-942B-D0DD426DB34E}
Expand Down
Binary file removed Bin/Debug/skin/cover.jpg
Binary file not shown.
Binary file added Bin/Debug/skin/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 10 additions & 14 deletions Bin/Debug/skin/item_finish.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<Window>
<ListContainerElement height="77">
<Option name="opt_select" float="true" pos="30,31,0,0" width="14" height="14" normalimage="file='public/B08.png' source='0,0,14,14' dest='0,0,14,14'" selectedimage="file='public/B08.png' source='0,28,14,42' dest='0,0,14,14'" hotimage="file='public/B08.png' source='0,14,14,28' dest='0,0,14,14'" />
<Label name="lbl_icon" float="true" pos="64,13,0,0" width="50" height="50" bkimage="public\def_app.png" />
<Label name="lbl_mask" float="true" pos="64,13,0,0" width="50" height="50" bkimage="file='public\app_mask.png' source='0,0,50,50'"/>
<Label name="lbl_name" float="true" pos="134,31,0,0" width="80" height="15" align="left" valign="center" textcolor="#FF333333" endellipsis="true"/>
<Label name="lbl_size" float="true" pos="250,31,0,0" width="80" height="15" align="left" valign="center" textcolor="#FF333333" endellipsis="true" />
<Label name="lbl_date" float="true" pos="350,31,0,0" width="100" height="15" align="left" valign="center" textcolor="#FF333333" endellipsis="true" />
<ListContainerElement height="77">
<Option name="opt_select" float="true" pos="30,31,0,0" width="14" height="14" normalimage="file='public/B08.png' source='0,0,14,14' dest='0,0,14,14'" selectedimage="file='public/B08.png' source='0,28,14,42' dest='0,0,14,14'" hotimage="file='public/B08.png' source='0,14,14,28' dest='0,0,14,14'" />
<Label name="lbl_icon" float="true" pos="64,13,0,0" width="50" height="50" bkimage="public\def_app.png" />
<Label name="lbl_mask" float="true" pos="64,13,0,0" width="50" height="50" bkimage="file='public\app_mask.png' source='0,0,50,50'"/>
<Label name="lbl_name" float="true" pos="134,31,0,0" width="80" height="15" align="left" valign="center" textcolor="#FF333333" endellipsis="true"/>
<Label name="lbl_size" float="true" pos="250,31,0,0" width="80" height="15" align="left" valign="center" textcolor="#FF333333" endellipsis="true" />
<Label name="lbl_date" float="true" pos="350,31,0,0" width="100" height="15" align="left" valign="center" textcolor="#FF333333" endellipsis="true" />

<!-- <Button name="btn_insted" text="已安装" pos="464,22,0,0" float="true" visible="true" width="70" height="32" normalimage="file='public/B01.png' source='0,0,70,32' dest='0,0,70,32'" hotimage="file='public/B01.png' source='0,32,70,64' dest='0,0,70,32'" pushedimage="file='public/B01.png' source='0,64,70,96' dest='0,0,70,32'" disabledimage="file='public/B01.png' source='0,96,70,128' dest='0,0,70,32'"/> -->

<Button name="btn_reinst" text="重装" pos="464,22,0,0" float="true" visible="true" width="70" height="32" textcolor="#FF666666" hottextcolor="#FF0086F7" pushedtextcolor="#FF0086F7" normalimage="file='public/B01.png' source='0,0,70,32' dest='0,0,70,32'" hotimage="file='public/B01.png' source='0,32,70,64' dest='0,0,70,32'" pushedimage="file='public/B01.png' source='0,64,70,96' dest='0,0,70,32'" disabledimage="file='public/B01.png' source='0,96,70,128' dest='0,0,70,32'"/>

<Button name="btn_delete" tooltip="删除" pos="554,30,0,0" float="true" width="16" height="16" normalimage="file='DownloadWnd/delete.png' source='0,0,16,16' dest='0,0,16,16'" hotimage="file='DownloadWnd/delete.png' source='0,16,16,32' dest='0,0,16,16'" pushedimage="file='DownloadWnd/delete.png' source='0,32,16,48' dest='0,0,16,16'" disabledimage="file='DownloadWnd/delete.png' source='0,48,16,64' dest='0,0,16,16'" />
<Control float="true" pos="0,76,0,0" width="840" height="1" bkcolor="#FFF0F3F5"/>
</ListContainerElement>
<Button name="btn_finish_delete" tooltip="删除" pos="554,30,0,0" float="true" width="16" height="16" normalimage="file='delete.png' source='0,0,16,16' dest='0,0,16,16'" hotimage="file='delete.png' source='0,16,16,32' dest='0,0,16,16'" pushedimage="file='delete.png' source='0,32,16,48' dest='0,0,16,16'" disabledimage="file='delete.png' source='0,48,16,64' dest='0,0,16,16'" />
<Control float="true" pos="0,76,0,0" width="840" height="1" bkcolor="#FFF0F3F5"/>
</ListContainerElement>
</Window>
6 changes: 3 additions & 3 deletions Bin/Debug/skin/item_loading.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
<Label name="lbl_state" float="true" pos="260,40,0,0" width="180" height="15" align="left" valign="center" textcolor="#FF999999" endellipsis="true" />
<Label name="lbl_size" float="true" pos="340,40,458,55" textcolor="#FF999999" align="right" endellipsis="true" />

<Button name="btn_start_loading" tooltip="下载" pos="518,30,0,0" float="true" visible="false" width="16" height="16" normalimage="file='reload.png' source='0,0,16,16'" hotimage="file='reload.png' source='0,16,16,32'" pushedimage="file='reload.png' source='0,32,16,48'" disabledimage="file='reload.png' source='0,48,16,64'" cursor="hand"/>
<Button name="btn_loading_start" tooltip="下载" pos="518,30,0,0" float="true" visible="false" width="16" height="16" normalimage="file='reload.png' source='0,0,16,16'" hotimage="file='reload.png' source='0,16,16,32'" pushedimage="file='reload.png' source='0,32,16,48'" disabledimage="file='reload.png' source='0,48,16,64'" cursor="hand"/>

<Button name="btn_stop_loading" tooltip="暂停" pos="518,30,0,0" float="true" visible="false" width="16" height="16" normalimage="file='pause.png' source='0,0,16,16' " hotimage="file='pause.png' source='0,16,16,32' " pushedimage="file='pause.png' source='0,32,16,48'" disabledimage="file='pause.png' source='0,48,16,64'" cursor="hand" />
<Button name="btn_loading_stop" tooltip="暂停" pos="518,30,0,0" float="true" visible="false" width="16" height="16" normalimage="file='pause.png' source='0,0,16,16' " hotimage="file='pause.png' source='0,16,16,32' " pushedimage="file='pause.png' source='0,32,16,48'" disabledimage="file='pause.png' source='0,48,16,64'" cursor="hand" />

<Button name="btn_delete_loading" tooltip="删除" pos="554,30,0,0" float="true" width="16" height="16" normalimage="file='delete.png' source='0,0,16,16'" hotimage="file='delete.png' source='0,16,16,32'" pushedimage="file='delete.png' source='0,32,16,48'" disabledimage="file='delete.png' source='0,48,16,64'" cursor="hand"/>
<Button name="btn_loading_delete" tooltip="删除" pos="554,30,0,0" float="true" width="16" height="16" normalimage="file='delete.png' source='0,0,16,16'" hotimage="file='delete.png' source='0,16,16,32'" pushedimage="file='delete.png' source='0,32,16,48'" disabledimage="file='delete.png' source='0,48,16,64'" cursor="hand"/>
<Control float="true" pos="0,76,0,0" width="840" height="1" bkcolor="#FFF0F3F5"/>
</ListContainerElement>
</Window>
Binary file added Bin/Debug/skin/public/scroll.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions Bin/Debug/skin/wnd_parse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<Control height="36" />
<HorizontalLayout height="26">
<Control width="16"/>
<Edit name="edit" deftext="请输入视频链接" deftextcolor="#FF666666" width="280" bkcolor="#FFFFFFFF" textcolor="#FF333333" font="0" bordersize="1" bordercolor="#FFB9BEC1" textpadding="3,3,3,3"/>
<Edit name="edit" tipvalue="请输入视频链接" tipvaluecolor="#FF999999" width="280" bkcolor="#FFFFFFFF" textcolor="#FF333333" font="0" bordersize="1" bordercolor="#FFB9BEC1" textpadding="3,3,3,3"/>
<Control width="10"/>
<Button name="btn_parse" text="解析" width="72" normalimage="blue_nor.png" hotimage="blue_hot.png" pushedimage="blue_down.png" textcolor="#FFFFFFFFF" font="0"/>
</HorizontalLayout>
Expand Down Expand Up @@ -51,7 +51,7 @@
</VerticalLayout>
<Control width="10" />
<VerticalLayout width="140">
<Control name="ctrl_cover" height="104" bkimage="cover.jpg"/>
<Control name="ctrl_cover" height="104" bkimage="cover.png"/>
</VerticalLayout>
<Control width="10" />
</HorizontalLayout>
Expand Down
Binary file added lib/Debug/libcurl.lib
Binary file not shown.
Binary file added lib/Release/libcurl.lib
Binary file not shown.
Binary file added lib/avcodec.lib
Binary file not shown.
Binary file added lib/avdevice.lib
Binary file not shown.
Binary file added lib/avfilter.lib
Binary file not shown.
Binary file added lib/avformat.lib
Binary file not shown.
Binary file added lib/avutil.lib
Binary file not shown.
Binary file added lib/libcrypto.lib
Binary file not shown.
Binary file added lib/libmp3lame.lib
Binary file not shown.
Binary file added lib/libssl.lib
Binary file not shown.
Binary file added lib/postproc.lib
Binary file not shown.
Binary file added lib/swresample.lib
Binary file not shown.
Binary file added lib/swscale.lib
Binary file not shown.
Binary file added lib/zlib.lib
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{8f011e58-ee97-4a49-95b6-f6a33d4759c0}</ProjectGuid>
<RootNamespace>VideoLoader</RootNamespace>
<RootNamespace>BVLoader</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<ProjectName>BVLoader</ProjectName>
</PropertyGroup>
Expand Down Expand Up @@ -199,19 +199,16 @@
<ClCompile Include="wnd\wnd_parse.cpp" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="VideoLoader.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="small.ico" />
<Image Include="VideoLoader.ico" />
</ItemGroup>
<ItemGroup>
<Text Include="readme.txt" />
<ResourceCompile Include="BVLoader.rc" />
</ItemGroup>
<ItemGroup>
<None Include="res\skin.zip" />
<None Include="service\download\download_service.inl" />
</ItemGroup>
<ItemGroup>
<Image Include="res\BVLoader.ico" />
<Image Include="res\small.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,25 +148,22 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="VideoLoader.rc">
<Filter>资源文件</Filter>
</ResourceCompile>
<None Include="service\download\download_service.inl">
<Filter>service\download</Filter>
</None>
<None Include="res\skin.zip" />
</ItemGroup>
<ItemGroup>
<Image Include="small.ico">
<Image Include="res\BVLoader.ico">
<Filter>资源文件</Filter>
</Image>
<Image Include="VideoLoader.ico">
<Image Include="res\small.ico">
<Filter>资源文件</Filter>
</Image>
</ItemGroup>
<ItemGroup>
<Text Include="readme.txt" />
</ItemGroup>
<ItemGroup>
<None Include="service\download\download_service.inl">
<Filter>service\download</Filter>
</None>
<None Include="res\skin.zip" />
<ResourceCompile Include="BVLoader.rc">
<Filter>资源文件</Filter>
</ResourceCompile>
</ItemGroup>
</Project>
3 changes: 2 additions & 1 deletion src/BVLoader/define/message_define.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ enum class MessageIconType {
enum {
WM_MAINWND_MSGBOX = kBaseWindowMessage + 1,
WM_MAINWND_DECODE,
WM_MAINWND_NOTIFY_STATUS,
};

enum MsgWparam {
WPARAM_DELETE_LOADING_ITEM = 0,
WPARAM_DELETE_LIST_ITEM = 0,
};
9 changes: 6 additions & 3 deletions src/BVLoader/define/soft_define.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
static constexpr const wchar_t* kAppWindowClassName = L"GuiFoundationClass";
static constexpr const wchar_t* kAppWindowTitle = L"下载工具";
static constexpr const wchar_t* kAppInstanceMutex = L"{E33E6D86-55E3-496B-B961-A205582F84EC}";
static constexpr const wchar_t* kAppExeName = L"VideoLoader.exe";
static constexpr const wchar_t* kAppVersion = L"1.0.0";
static constexpr const wchar_t* kAppExeName = L"BVLoader.exe";
static constexpr const wchar_t* kAppVersion = L"1.0.1";
static constexpr const wchar_t* kAppName = L"DownloadTools";
static constexpr const char* kAppNameAscii = "DownloadTools";

Expand All @@ -16,4 +16,7 @@ static constexpr const char* kAppNameAscii = "DownloadTools";
static constexpr const wchar_t* kTextLoadPause = L"暂停下载";
static constexpr const wchar_t* kTextLoadWaiting = L"等待下载";
static constexpr const wchar_t* kTextLoadFailed = L"下载失败";
static constexpr const wchar_t* kTextLoadFinish = L"下载完成";
static constexpr const wchar_t* kTextLoadFinish = L"下载完成";
static constexpr const wchar_t* kTextDecoding = L"解码中";

static constexpr const wchar_t* kDefaultCover = L"cover.png";
4 changes: 2 additions & 2 deletions src/BVLoader/main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// VideoLoader.cpp : 定义应用程序的入口点。
// BVLoader.cpp : 定义应用程序的入口点。
//

#include "pch.h"
Expand Down Expand Up @@ -72,7 +72,7 @@ void InitEasyLog()
SYSTEMTIME stCur;
::GetLocalTime(&stCur);
char current_date[128] = { 0 };
sprintf_s(current_date, 128, "VideoLoader_%04d-%02d-%02d.log", stCur.wYear,
sprintf_s(current_date, 128, "BVLoader_%04d-%02d-%02d.log", stCur.wYear,
stCur.wMonth, stCur.wDay);
strcat_s(log_path, current_date);
std::string log_file(log_path);
Expand Down
File renamed without changes.
Binary file modified src/BVLoader/res/skin.zip
Binary file not shown.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/BVLoader/resource.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ 生成的包含文件。
// 供 VideoLoader.rc 使用
// 供 BVLoader.rc 使用
//
#define IDC_MYICON 2
#define IDD_VIDEOLOADER_DIALOG 102
#define IDM_ABOUT 104
#define IDI_VIDEOLOADER 107
#define IDI_BVLOADER 107
#define IDI_SMALL 108
#define IDR_MAINFRAME 128
#define IDR_DAT1 129
Expand Down
40 changes: 33 additions & 7 deletions src/BVLoader/service/download/download_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ namespace download {
if (task_mgr_->GetLoadingCount() < max_loading_count_) {
task->http = std::make_shared<httplib::CHttpDownload>();
if (!task->http->Initialize(task->url, task->save_path)) {
LOG(ERROR) << "初始化下载库失败";
LOG(ERROR) << "StartTask 初始化下载库失败";
task->status = DownloadStatus::STATUS_FAILED;
task->http = nullptr;
NotifyStatus(task);
Expand Down Expand Up @@ -256,7 +256,7 @@ namespace download {
auto task = task_mgr_->NewTask(url, title, img, author, duration, ctime);
auto name = string_utils::GetFileNameByUrl(url);
if (name.empty()) {
LOG(ERROR) << "获取下载文件名失败,url: " << url;
LOG(ERROR) << "AddTask 获取下载文件名失败,url: " << url;
task_mgr_->FreeTask(std::move(task));
return nullptr;
}
Expand All @@ -274,11 +274,11 @@ namespace download {
Task* task_ptr = reinterpret_cast<Task*>(task_id);
auto task = task_mgr_->FindLoadingTask(task_ptr);
if (!task) {
LOG(ERROR) << "任务不存在";
LOG(ERROR) << "StopTask 任务不存在";
return false;
}
if (task->status != DownloadStatus::STATUS_LOADING) {
LOG(ERROR) << "任务状态不正确,status: " << (int)task->status;
LOG(ERROR) << "StopTask 任务状态不正确,status: " << (int)task->status;
return false;
}
ClearTaskHttp(task);
Expand All @@ -292,12 +292,12 @@ namespace download {
Task* task_ptr = reinterpret_cast<Task*>(task_id);
auto task = task_mgr_->FindLoadingTask(task_ptr);
if (!task) {
LOG(ERROR) << "任务不存在";
LOG(ERROR) << "ReloadTask 任务不存在";
return false;
}
if (task->status != DownloadStatus::STATUS_PAUSE
&& task->status != DownloadStatus::STATUS_FAILED) {
LOG(ERROR) << "任务状态不正确,status: " << (int)task->status;
LOG(ERROR) << "ReloadTask 任务状态不正确,status: " << (int)task->status;
return false;
}
StartTask(task);
Expand All @@ -309,7 +309,7 @@ namespace download {
Task* task_ptr = reinterpret_cast<Task*>(task_id);
auto task = task_mgr_->FindLoadingTask(task_ptr);
if (!task) {
LOG(ERROR) << "任务不存在";
LOG(ERROR) << "DeleteLoadingTask 任务不存在";
return false;
}
ClearTaskHttp(task);
Expand All @@ -318,5 +318,31 @@ namespace download {
return true;
}

bool DownloadService::DeleteFinishTask(UINT_PTR task_id)
{
Task* task_ptr = reinterpret_cast<Task*>(task_id);
auto task = task_mgr_->FindFinishTask(task_ptr);
if (!task) {
LOG(ERROR) << "DeleteFinishTask 任务不存在";
return false;
}
ClearTaskHttp(task);
task->Clear();
task_mgr_->DeleteFinishTask(task);
return true;
}

bool DownloadService::AddFinishTask(UINT_PTR task_id)
{
Task* task_ptr = reinterpret_cast<Task*>(task_id);
auto task = task_mgr_->FindLoadingTask(task_ptr);
if (!task) {
LOG(ERROR) << "AddFinishTask 任务不存在";
return false;
}
task_mgr_->AddFinishTask(std::move(task));
return true;
}

} // namespace download

5 changes: 4 additions & 1 deletion src/BVLoader/service/download/download_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ namespace download {
bool StopTask(UINT_PTR task_id) override;
bool ReloadTask(UINT_PTR task_id) override;
bool DeleteLoadingTask(UINT_PTR task_id) override;
std::shared_ptr<download::Task> FindTask(UINT_PTR task_id) override;
bool DeleteFinishTask(UINT_PTR task_id) override;
std::shared_ptr<download::Task> FindLoadingTask(UINT_PTR task_id) override;
std::shared_ptr<download::Task> FindFinishTask(UINT_PTR task_id) override;
bool AddFinishTask(UINT_PTR task_id) override;

protected:
bool Init() override;
Expand Down
16 changes: 12 additions & 4 deletions src/BVLoader/service/download/download_service.inl
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,20 @@ namespace download {
}
}

inline std::shared_ptr<download::Task> DownloadService::FindTask(UINT_PTR task_id)
inline std::shared_ptr<download::Task> DownloadService::FindLoadingTask(UINT_PTR task_id)
{
Task* task_ptr = reinterpret_cast<Task*>(task_id);
auto task = task_mgr_->FindLoadingTask(task_ptr);
if (task) {
return task;
if (task_ptr == nullptr) {
return nullptr;
}
return task_mgr_->FindLoadingTask(task_ptr);
}

inline std::shared_ptr<download::Task> DownloadService::FindFinishTask(UINT_PTR task_id)
{
Task* task_ptr = reinterpret_cast<Task*>(task_id);
if (task_ptr == nullptr) {
return nullptr;
}
return task_mgr_->FindFinishTask(task_ptr);
}
Expand Down
31 changes: 31 additions & 0 deletions src/BVLoader/service/download/task_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,26 @@ namespace download {
return nullptr;
}

void TaskManager::AddFinishTask(const std::shared_ptr<Task>& task)
{
auto iter = std::find(loading_list_.begin(), loading_list_.end(), task);
if (iter == loading_list_.end()) {
return;
}
finish_list.emplace_back(task);
loading_list_.erase(iter);
}

void TaskManager::AddFinishTask(std::shared_ptr<Task>&& task)
{
auto iter = std::find(loading_list_.begin(), loading_list_.end(), task);
if (iter == loading_list_.end()) {
return;
}
finish_list.emplace_back(std::move(task));
loading_list_.erase(iter);
}

std::shared_ptr<download::Task> TaskManager::FindFinishTask(Task* task_ptr)
{
for (auto& task : finish_list) {
Expand Down Expand Up @@ -94,4 +114,15 @@ namespace download {
free_list_.emplace_back(std::move(temp_task));
}

void TaskManager::DeleteFinishTask(const std::shared_ptr<Task>& task)
{
auto iter = std::find(finish_list.begin(), finish_list.end(), task);
if (iter == finish_list.end()) {
return;
}
auto temp_task = *iter;
finish_list.erase(iter);
free_list_.emplace_back(std::move(temp_task));
}

}// namespace download
Loading

0 comments on commit 801af15

Please sign in to comment.