Add sync controls and status header animations

This commit is contained in:
Koha9
2025-11-29 04:55:41 +09:00
parent 90294a29bf
commit b6408bf120
5 changed files with 353 additions and 57 deletions
+12
View File
@@ -155,4 +155,16 @@ export const apiService = {
}
return result as ApiResponse<{ token: string; serverInfo: PlexServerConnection }>;
},
async syncPlaylists(strategy: SyncStrategy, _regexRules: RegexReplacement[], localPath?: string): Promise<ApiResponse<null>> {
const response = await fetch(`${API_BASE}/api/sync`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
mode: STRATEGY_TO_MODE[strategy],
local_path: localPath,
}),
});
return handleResponse(response);
},
};