Add sync controls and status header animations
This commit is contained in:
@@ -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);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user