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