add error state filtering

This commit is contained in:
Simon
2025-07-10 12:28:49 +07:00
parent ffd3bab948
commit 29be11cf75
4 changed files with 99 additions and 75 deletions

View File

@@ -5,6 +5,7 @@ const loadDownloadQueue = async (
page: number,
channelId: string | null,
vid_type: string | null,
errorFilterFromUrl: string | null,
showIgnored: boolean,
search: string,
) => {
@@ -14,6 +15,7 @@ const loadDownloadQueue = async (
if (channelId) searchParams.append('channel', channelId);
if (vid_type) searchParams.append('vid_type', vid_type);
if (search) searchParams.append('q', encodeURIComponent(search));
if (errorFilterFromUrl !== null) searchParams.append('error', errorFilterFromUrl);
searchParams.append('filter', showIgnored ? 'ignore' : 'pending');
const endpoint = `/api/download/${searchParams.toString() ? `?${searchParams.toString()}` : ''}`;