opt download next

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-12-07 12:25:02 +08:00
parent 2cb8331528
commit 3787f99d35
3 changed files with 10 additions and 4 deletions

View File

@@ -78,7 +78,7 @@ class DownloadPageController extends GetxController
title: '确定删除选中视频?',
onConfirm: () async {
SmartDialog.showLoading();
final allChecked = this.allChecked.toList();
final allChecked = this.allChecked.toSet();
final watchProgress = GStorage.watchProgress;
for (var page in allChecked) {
await watchProgress.deleteAll(

View File

@@ -84,6 +84,9 @@ class _DownloadingPageState extends State<DownloadingPage>
onDelete: () => _downloadService.deleteDownload(
entry: entry,
removeQueue: true,
downloadNext:
isCurr &&
entry.status == DownloadStatus.downloading,
),
controller: this,
);
@@ -107,7 +110,10 @@ class _DownloadingPageState extends State<DownloadingPage>
title: '确定删除选中视频?',
onConfirm: () async {
SmartDialog.showLoading();
final allChecked = this.allChecked.toList();
final allChecked = this.allChecked.toSet();
final isDownloading =
_downloadService.curDownload.value?.status ==
DownloadStatus.downloading;
for (var entry in allChecked) {
await _downloadService.deleteDownload(
entry: entry,
@@ -116,7 +122,7 @@ class _DownloadingPageState extends State<DownloadingPage>
);
}
_downloadService.waitDownloadQueue.removeWhere(allChecked.contains);
if (_downloadService.curDownload.value == null) {
if (isDownloading && _downloadService.curDownload.value == null) {
_downloadService.nextDownload();
}
if (enableMultiSelect.value) {

View File

@@ -55,7 +55,7 @@ class DownloadSearchController
title: '确定删除选中视频?',
onConfirm: () async {
SmartDialog.showLoading();
final allChecked = this.allChecked.toList();
final allChecked = this.allChecked.toSet();
for (var entry in allChecked) {
await GStorage.watchProgress.delete(entry.cid.toString());
await _downloadService.deleteDownload(