From 7b0f94961fe62536a0a646f307d4a69129aa082d Mon Sep 17 00:00:00 2001 From: the1812 Date: Thu, 25 Oct 2018 00:09:09 +0800 Subject: [PATCH] Reject split videos --- video/download-video/download-video.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/video/download-video/download-video.js b/video/download-video/download-video.js index a8e5207c1..f00a312f4 100644 --- a/video/download-video/download-video.js +++ b/video/download-video/download-video.js @@ -66,14 +66,15 @@ { reject("获取下载链接失败, 请确认当前账号有下载权限后重试."); } - else + const urls = data.durl; + this.fragments = urls.map(it => new VideoInfoFragment( + it.length, it.size, it.url, it.backup_url + )); + if (this.fragments.length > 1) { - const urls = data.durl; - this.fragments = urls.map(it => new VideoInfoFragment( - it.length, it.size, it.url, it.backup_url - )); - resolve(); + reject("暂不支持分段视频的下载."); } + resolve(); }); }); }