feat: improve subscription and download cards

This commit is contained in:
ShukeBta
2026-05-28 23:27:34 +08:00
parent f457d0050e
commit c1b5dac784
20 changed files with 1239 additions and 204 deletions
+11 -2
View File
@@ -6,12 +6,21 @@ export interface DownloadsState {
torrents: QBitTorrent[] | null
}
export interface AddDownloadInput {
url: string
save_path?: string
title?: string
poster_url?: string
backdrop_url?: string
overview?: string
}
export const downloadsAPI = {
list: () => api.get<DownloadsState>('/downloads').then((r) => r.data),
add: (url: string, savePath = '') =>
add: (url: string, savePath = '', meta: Omit<AddDownloadInput, 'url' | 'save_path'> = {}) =>
api
.post<DownloadTask>('/downloads', { url, save_path: savePath })
.post<DownloadTask>('/downloads', { url, save_path: savePath, ...meta })
.then((r) => r.data),
remove: (hash: string, deleteFiles = false) =>
+5
View File
@@ -14,11 +14,16 @@ export const subscriptionsAPI = {
save_path?: string
search_mode?: string
imdb_id?: string
source?: string
poster_url?: string
backdrop_url?: string
overview?: string
resolution?: string
quality?: string
effects?: string
release_groups?: string
exclude_words?: string
wash_enabled?: boolean
wash_priority?: string
priority?: number
enabled?: boolean