diff --git a/lib/services/download/download_service.dart b/lib/services/download/download_service.dart index 136652529..56a421ad2 100644 --- a/lib/services/download/download_service.dart +++ b/lib/services/download/download_service.dart @@ -358,6 +358,10 @@ class DownloadService extends GetxService { Future _startDownload(BiliDownloadEntryInfo entry) async { try { + if (!await downloadDanmaku(entry: entry)) { + return; + } + _updateCurStatus(DownloadStatus.getPlayUrl); final BiliDownloadMediaInfo mediaFileInfo = @@ -373,15 +377,10 @@ class DownloadService extends GetxService { await videoDir.create(recursive: true); } - final coverTask = _downloadCover(entry: entry); - - if (!await downloadDanmaku(entry: entry)) { - return; - } final mediaJsonFile = File(path.join(videoDir.path, _indexFile)); await Future.wait([ mediaJsonFile.writeAsString(jsonEncode(mediaFileInfo.toJson())), - coverTask, + _downloadCover(entry: entry), ]); if (curDownload.value?.cid != entry.cid) {