mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-31 08:08:19 +08:00
opt download next
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -78,7 +78,7 @@ class DownloadPageController extends GetxController
|
|||||||
title: '确定删除选中视频?',
|
title: '确定删除选中视频?',
|
||||||
onConfirm: () async {
|
onConfirm: () async {
|
||||||
SmartDialog.showLoading();
|
SmartDialog.showLoading();
|
||||||
final allChecked = this.allChecked.toList();
|
final allChecked = this.allChecked.toSet();
|
||||||
final watchProgress = GStorage.watchProgress;
|
final watchProgress = GStorage.watchProgress;
|
||||||
for (var page in allChecked) {
|
for (var page in allChecked) {
|
||||||
await watchProgress.deleteAll(
|
await watchProgress.deleteAll(
|
||||||
|
|||||||
@@ -84,6 +84,9 @@ class _DownloadingPageState extends State<DownloadingPage>
|
|||||||
onDelete: () => _downloadService.deleteDownload(
|
onDelete: () => _downloadService.deleteDownload(
|
||||||
entry: entry,
|
entry: entry,
|
||||||
removeQueue: true,
|
removeQueue: true,
|
||||||
|
downloadNext:
|
||||||
|
isCurr &&
|
||||||
|
entry.status == DownloadStatus.downloading,
|
||||||
),
|
),
|
||||||
controller: this,
|
controller: this,
|
||||||
);
|
);
|
||||||
@@ -107,7 +110,10 @@ class _DownloadingPageState extends State<DownloadingPage>
|
|||||||
title: '确定删除选中视频?',
|
title: '确定删除选中视频?',
|
||||||
onConfirm: () async {
|
onConfirm: () async {
|
||||||
SmartDialog.showLoading();
|
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) {
|
for (var entry in allChecked) {
|
||||||
await _downloadService.deleteDownload(
|
await _downloadService.deleteDownload(
|
||||||
entry: entry,
|
entry: entry,
|
||||||
@@ -116,7 +122,7 @@ class _DownloadingPageState extends State<DownloadingPage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
_downloadService.waitDownloadQueue.removeWhere(allChecked.contains);
|
_downloadService.waitDownloadQueue.removeWhere(allChecked.contains);
|
||||||
if (_downloadService.curDownload.value == null) {
|
if (isDownloading && _downloadService.curDownload.value == null) {
|
||||||
_downloadService.nextDownload();
|
_downloadService.nextDownload();
|
||||||
}
|
}
|
||||||
if (enableMultiSelect.value) {
|
if (enableMultiSelect.value) {
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class DownloadSearchController
|
|||||||
title: '确定删除选中视频?',
|
title: '确定删除选中视频?',
|
||||||
onConfirm: () async {
|
onConfirm: () async {
|
||||||
SmartDialog.showLoading();
|
SmartDialog.showLoading();
|
||||||
final allChecked = this.allChecked.toList();
|
final allChecked = this.allChecked.toSet();
|
||||||
for (var entry in allChecked) {
|
for (var entry in allChecked) {
|
||||||
await GStorage.watchProgress.delete(entry.cid.toString());
|
await GStorage.watchProgress.delete(entry.cid.toString());
|
||||||
await _downloadService.deleteDownload(
|
await _downloadService.deleteDownload(
|
||||||
|
|||||||
Reference in New Issue
Block a user