feat: enhance parseAllChapters API to support force parsing and update Audiobook component for AI mode handling
This commit is contained in:
@@ -249,9 +249,12 @@ export const audiobookApi = {
|
||||
await apiClient.post(`/audiobook/projects/${projectId}/characters/${charId}/regenerate-preview`)
|
||||
},
|
||||
|
||||
parseAllChapters: async (projectId: number, onlyErrors?: boolean): Promise<void> => {
|
||||
const params = onlyErrors ? '?only_errors=true' : ''
|
||||
await apiClient.post(`/audiobook/projects/${projectId}/parse-all${params}`)
|
||||
parseAllChapters: async (projectId: number, onlyErrors?: boolean, force?: boolean): Promise<void> => {
|
||||
const params = new URLSearchParams()
|
||||
if (onlyErrors) params.set('only_errors', 'true')
|
||||
if (force) params.set('force', 'true')
|
||||
const qs = params.toString() ? `?${params.toString()}` : ''
|
||||
await apiClient.post(`/audiobook/projects/${projectId}/parse-all${qs}`)
|
||||
},
|
||||
|
||||
processAll: async (projectId: number): Promise<void> => {
|
||||
|
||||
Reference in New Issue
Block a user