mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-07 18:09:25 +00:00
add vid_type filter for download list view
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
import APIClient from '../../functions/APIClient';
|
||||
import { DownloadResponseType } from '../../pages/Download';
|
||||
|
||||
const loadDownloadQueue = async (page: number, channelId: string | null, showIgnored: boolean) => {
|
||||
const loadDownloadQueue = async (
|
||||
page: number,
|
||||
channelId: string | null,
|
||||
vid_type: string | null,
|
||||
showIgnored: boolean,
|
||||
) => {
|
||||
const searchParams = new URLSearchParams();
|
||||
|
||||
if (page) searchParams.append('page', page.toString());
|
||||
if (channelId) searchParams.append('channel', channelId);
|
||||
if (vid_type) searchParams.append('vid_type', vid_type);
|
||||
searchParams.append('filter', showIgnored ? 'ignore' : 'pending');
|
||||
|
||||
const endpoint = `/api/download/${searchParams.toString() ? `?${searchParams.toString()}` : ''}`;
|
||||
|
||||
Reference in New Issue
Block a user