refactor(api): adopt unified responses and restore media config hints

This commit is contained in:
jxxghp
2026-08-12 23:15:13 +08:00
parent 4fce4cd171
commit 0ea12f75f7
164 changed files with 4080 additions and 3629 deletions
+1
View File
@@ -149,6 +149,7 @@ export async function loadRemoteComponentFromModule(remoteModule: RemoteModule,
async function fetchRemoteModules(): Promise<RemoteModule[]> {
try {
const response = (await api.get('plugin/remotes?token=moviepilot', {
feedback: 'silent',
signal: federationController.signal,
})) as unknown as RemoteModule[] | null
return response ?? []
+1 -1
View File
@@ -12,7 +12,7 @@ export async function fetchGlobalSettings() {
// 手动设置signal,防止reqestOptimizer添加可中断的controller
signal: globalSettingController.signal,
})
return result.data || {}
return result || {}
} catch (error) {
console.error('Failed to fetch global settings', error)
throw error