From a7cc7d3ba12f0e3f23cbe9e3596fdbe6830333ed Mon Sep 17 00:00:00 2001 From: croire <1432593898@qq.com> Date: Sat, 12 Mar 2022 13:17:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DownKyi/Services/Download/AriaDownloadService.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/DownKyi/Services/Download/AriaDownloadService.cs b/DownKyi/Services/Download/AriaDownloadService.cs index cc32704..506dd4a 100644 --- a/DownKyi/Services/Download/AriaDownloadService.cs +++ b/DownKyi/Services/Download/AriaDownloadService.cs @@ -32,8 +32,8 @@ namespace DownKyi.Services.Download { private CancellationTokenSource tokenSource; - private int retry = 5; - private string nullMark = ""; + private readonly int retry = 5; + private readonly string nullMark = ""; public AriaDownloadService(ObservableCollection downloadingList, ObservableCollection downloadedList) : base(downloadingList, downloadedList) { @@ -582,13 +582,13 @@ namespace DownKyi.Services.Download for (int i = 0; i < retry; i++) { audioUid = DownloadAudio(downloading); - if (audioUid != null && audioUid != "") + if (audioUid != null && audioUid != nullMark) { break; } } } - if (audioUid == "") + if (audioUid == nullMark) { DownloadFailed(downloading); return; @@ -611,13 +611,13 @@ namespace DownKyi.Services.Download for (int i = 0; i < retry; i++) { videoUid = DownloadVideo(downloading); - if (videoUid != null && videoUid != "") + if (videoUid != null && videoUid != nullMark) { break; } } } - if (videoUid == "") + if (videoUid == nullMark) { DownloadFailed(downloading); return;