🔧 Rewiring for the new uncompression endpoint
This commit is contained in:
@@ -246,20 +246,18 @@ export const fetchComicVineMatches =
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const extractComicArchive =
|
export const extractComicArchive = (path: string) => async (dispatch) => {
|
||||||
(path: string, options: IExtractionOptions) => async (dispatch) => {
|
|
||||||
const comicBookPages: string[] = [];
|
const comicBookPages: string[] = [];
|
||||||
dispatch({
|
dispatch({
|
||||||
type: IMS_COMIC_BOOK_ARCHIVE_EXTRACTION_CALL_IN_PROGRESS,
|
type: IMS_COMIC_BOOK_ARCHIVE_EXTRACTION_CALL_IN_PROGRESS,
|
||||||
});
|
});
|
||||||
const extractedComicBookArchive = await axios({
|
const extractedComicBookArchive = await axios({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: `${LIBRARY_SERVICE_BASE_URI}/unrarArchive`,
|
url: `${LIBRARY_SERVICE_BASE_URI}/uncompressFullArchive`,
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json; charset=utf-8",
|
"Content-Type": "application/json; charset=utf-8",
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
options,
|
|
||||||
filePath: path,
|
filePath: path,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -23,14 +23,7 @@ export const ArchiveOperations = (props): ReactElement => {
|
|||||||
|
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const unpackComicArchive = useCallback(() => {
|
const unpackComicArchive = useCallback(() => {
|
||||||
dispatch(
|
dispatch(extractComicArchive(data.rawFileDetails.filePath));
|
||||||
extractComicArchive(data.rawFileDetails.filePath, {
|
|
||||||
extractTarget: "book",
|
|
||||||
targetExtractionFolder:
|
|
||||||
"./userdata/expanded/" + data.rawFileDetails.name,
|
|
||||||
extractionMode: "all",
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
}, [dispatch, data]);
|
}, [dispatch, data]);
|
||||||
|
|
||||||
// sliding panel config
|
// sliding panel config
|
||||||
|
|||||||
Reference in New Issue
Block a user