mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-04 23:18:44 +08:00
feat(plugin): support extensible sources and dialog teardown
This commit is contained in:
@@ -183,7 +183,7 @@ describe('MoviePilot API client', () => {
|
||||
it('取消请求保持原始 CanceledError,且不提示或触发离线探测', async () => {
|
||||
const reportConnectionFailure = vi.fn()
|
||||
const adapter: AxiosAdapter = async config => {
|
||||
throw new CanceledError('Request cancelled', AxiosError.ERR_CANCELED, config)
|
||||
throw new CanceledError('Request cancelled', config)
|
||||
}
|
||||
const { api } = createApiClients({ adapter, hooks: { reportConnectionFailure }, notifier })
|
||||
|
||||
|
||||
+4
-2
@@ -1,4 +1,4 @@
|
||||
/** 后端、前端、插件与中心服务共同使用的固定媒体来源枚举。 */
|
||||
/** 主程序内置的媒体来源常量;插件可以注册额外的稳定来源标识。 */
|
||||
export enum MediaSource {
|
||||
TMDB = 'themoviedb',
|
||||
Douban = 'douban',
|
||||
@@ -15,7 +15,7 @@ export enum MediaSource {
|
||||
TencentVideo = 'tencentvideodiscover',
|
||||
}
|
||||
|
||||
export type MediaDataSource = `${MediaSource}`
|
||||
export type MediaDataSource = `${MediaSource}` | (string & {})
|
||||
|
||||
// 手动刮削选项
|
||||
export interface ManualScrapeOptions {
|
||||
@@ -2015,6 +2015,8 @@ export interface TransferQueue {
|
||||
export interface DiscoverSource {
|
||||
// 数据源名称
|
||||
name: string
|
||||
// 内置或插件扩展媒体来源
|
||||
media_source?: MediaDataSource
|
||||
// 媒体ID的前缀,不含:
|
||||
mediaid_prefix: string
|
||||
// 媒体数据源API地址
|
||||
|
||||
Reference in New Issue
Block a user