diff --git a/backend/download/src/queue.py b/backend/download/src/queue.py index eaae66c3..3b21fc68 100644 --- a/backend/download/src/queue.py +++ b/backend/download/src/queue.py @@ -111,7 +111,7 @@ class PendingInteract: data = {"query": {"bool": {"must": must_list}}} - path = "ta_download/_delete_by_query" + path = "ta_download/_delete_by_query?refresh=true" _, _ = ElasticWrap(path).post(data=data) def update_status(self): diff --git a/frontend/src/api/actions/deleteDownloadQueueByFilter.ts b/frontend/src/api/actions/deleteDownloadQueueByFilter.ts index 65a01a3c..9d4f5902 100644 --- a/frontend/src/api/actions/deleteDownloadQueueByFilter.ts +++ b/frontend/src/api/actions/deleteDownloadQueueByFilter.ts @@ -2,9 +2,15 @@ import APIClient from '../../functions/APIClient'; type FilterType = 'ignore' | 'pending'; -const deleteDownloadQueueByFilter = async (filter: FilterType) => { +const deleteDownloadQueueByFilter = async ( + filter: FilterType, + channel: string | null, + vid_type: string | null, +) => { const searchParams = new URLSearchParams(); if (filter) searchParams.append('filter', filter); + if (channel) searchParams.append('channel', channel); + if (vid_type) searchParams.append('vid_type', vid_type); return APIClient(`/api/download/?${searchParams.toString()}`, { method: 'DELETE', diff --git a/frontend/src/pages/Download.tsx b/frontend/src/pages/Download.tsx index a6778375..a4a4388b 100644 --- a/frontend/src/pages/Download.tsx +++ b/frontend/src/pages/Download.tsx @@ -21,6 +21,7 @@ import loadDownloadAggs, { DownloadAggsType } from '../api/loader/loadDownloadAg import { useUserConfigStore } from '../stores/UserConfigStore'; import updateUserConfig, { UserConfigType } from '../api/actions/updateUserConfig'; import { ApiResponseType } from '../functions/APIClient'; +import deleteDownloadQueueByFilter from '../api/actions/deleteDownloadQueueByFilter'; type Download = { auto_start: boolean; @@ -57,6 +58,8 @@ const Download = () => { const [refresh, setRefresh] = useState(false); const [showHiddenForm, setShowHiddenForm] = useState(false); + const [showQueueActions, setShowQueueActions] = useState(false); + const [showDeleteConfirm, setShowDeleteConfirm] = useState(false); const [downloadPending, setDownloadPending] = useState(false); const [rescanPending, setRescanPending] = useState(false); @@ -86,6 +89,9 @@ const Download = () => { const gridItems = userConfig.grid_items; const showIgnored = ignoredOnlyParam !== null ? ignoredOnlyParam === 'true' : userConfig.show_ignored_only; + + const showIgnoredFilter = showIgnored ? 'ignore' : 'pending'; + const isGridView = viewStyle === ViewStylesEnum.Grid; const gridView = isGridView ? `boxed-${gridItems}` : ''; const gridViewGrid = isGridView ? `grid-${gridItems}` : ''; @@ -259,6 +265,9 @@ const Download = () => {
+