File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -327,6 +327,18 @@ class DownloadManager {
327327 // 继续处理队列
328328 this . processQueue ( ) ;
329329 }
330+
331+ /**
332+ * 重试所有下载任务
333+ */
334+ public retryAllDownloads ( ) {
335+ const dataStore = useDataStore ( ) ;
336+ const songsToRetry = dataStore . downloadingSongs . map ( ( item ) => item . song . id ) ;
337+
338+ songsToRetry . forEach ( ( id ) => {
339+ this . retryDownload ( id ) ;
340+ } ) ;
341+ }
330342}
331343
332344export default DownloadManager . getInstance ( ) ;
Original file line number Diff line number Diff line change 3535 </n-button >
3636 <n-button
3737 :focusable =" false"
38- :disabled =" currentTab !== 'download-downloaded'"
38+ :disabled ="
39+ currentTab === 'download-downloaded'
40+ ? false
41+ : dataStore.downloadingSongs.length === 0
42+ "
3943 :loading =" loading"
4044 class =" more"
4145 strong
4246 secondary
4347 circle
44- @click =" getDownloadMusic(true)"
48+ @click ="
49+ currentTab === 'download-downloaded'
50+ ? getDownloadMusic(true)
51+ : DownloadManager.retryAllDownloads()
52+ "
4553 >
4654 <template #icon >
4755 <SvgIcon name="Refresh" />
You can’t perform that action at this time.
0 commit comments