Skip to content

Commit

Permalink
fix: 优化下载判断
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhelinCheng committed Apr 24, 2021
1 parent 6b9e607 commit 2eb7968
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bilibili-downloader",
"version": "1.0.6",
"version": "1.0.7",
"description": "B 站个人动态视频下载助手,支持下载B站个人动态更新的4k视频,运行该程序后,你所关注的UP主更新的视频第一时间下载保存。",
"main": "./dist/index.js",
"scripts": {
Expand Down
5 changes: 3 additions & 2 deletions src/core/url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author : Zhelin Cheng
* @Date : 2021-04-10 17:35:02
* @LastEditors : Zhelin Cheng
* @LastEditTime : 2021-04-24 14:22:43
* @LastEditTime : 2021-04-24 19:52:41
* @FilePath : \bilibili-downloader\src\core\url.ts
* @Description : 未添加文件描述
*/
Expand Down Expand Up @@ -477,7 +477,7 @@ export const getVideosUrl = async (): Promise<boolean> => {

let isNeed =
// 判断是否符合条件
((isTopic >= 0 && isCard) || isIncludeUid) &&
(isTopic >= 0 || isCard || isIncludeUid) &&
// 判断是否需要下载
timeout < timestamp &&
!notes.includes(bvid) &&
Expand All @@ -488,6 +488,7 @@ export const getVideosUrl = async (): Promise<boolean> => {
isNeed = !excludeUid.has(userId);
}

// console.log(uname, isTopic, isCard, isIncludeUid, isNeed)
if (isNeed) {
isDownload = true;
await db
Expand Down

0 comments on commit 2eb7968

Please sign in to comment.