feat: 支持设置快捷订阅的路径默认值 (#502)

This commit is contained in:
ᴀᴍᴛᴏᴀᴇʀ
2025-10-14 18:44:33 +08:00
committed by GitHub
parent c7e0d31811
commit 84d353365a
13 changed files with 153 additions and 80 deletions

View File

@@ -221,6 +221,10 @@ class ApiClient {
return this.post<boolean>(`/video-sources/${type}/${id}/evaluate`, null);
}
async getDefaultPath(type: string, name: string): Promise<ApiResponse<string>> {
return this.get<string>(`/video-sources/${type}/default-path`, { name });
}
async getConfig(): Promise<ApiResponse<Config>> {
return this.get<Config>('/config');
}
@@ -268,6 +272,7 @@ const api = {
apiClient.updateVideoSource(type, id, request),
evaluateVideoSourceRules: (type: string, id: number) =>
apiClient.evaluateVideoSourceRules(type, id),
getDefaultPath: (type: string, name: string) => apiClient.getDefaultPath(type, name),
getConfig: () => apiClient.getConfig(),
updateConfig: (config: Config) => apiClient.updateConfig(config),
getDashboard: () => apiClient.getDashboard(),