Import Only will add comics identified from the mapped folder into the local db.
Import and Tag will scan the ComicVine, shortboxed APIs and import comics from the mapped folder with the additional metadata.
import React, { ReactElement, useCallback, useContext, useState } from "react"; import { useSelector, useDispatch } from "react-redux"; import { fetchComicBookMetadata, toggleImportQueueStatus, } from "../actions/fileops.actions"; import "react-loader-spinner/dist/loader/css/react-spinner-loader.css"; import Loader from "react-loader-spinner"; interface IProps { matches?: unknown; fetchComicMetadata?: any; path: string; covers?: any; } /** * Returns the average of two numbers. * * @remarks * This method is part of the {@link core-library#Statistics | Statistics subsystem}. * * @param x - The first input number * @param y - The second input number * @returns The arithmetic mean of `x` and `y` * * @beta */ export const Import = (props: IProps): ReactElement => { const dispatch = useDispatch(); const libraryQueueResults = useSelector( (state: RootState) => state.fileOps.librarySearchResultCount, ); const libraryQueueImportStatus = useSelector( (state: RootState) => state.fileOps.IMSCallInProgress, ); const [isImportQueuePaused, setImportQueueStatus] = useState(false); const initiateImport = useCallback(() => { if (typeof props.path !== "undefined") { dispatch(fetchComicBookMetadata(props.path)); } }, [dispatch]); const toggleImport = useCallback(() => { setImportQueueStatus(!isImportQueuePaused); if (isImportQueuePaused === false) { dispatch(toggleImportQueueStatus({ action: "resume" })); } else if (isImportQueuePaused === true) { dispatch(toggleImportQueueStatus({ action: "pause" })); } }, [isImportQueuePaused]); const pauseIconText = ( <> Pause Import > ); const playIconText = ( <> Resume Import > ); return (
Import Only will add comics identified from the mapped folder into the local db.
Import and Tag will scan the ComicVine, shortboxed APIs and import comics from the mapped folder with the additional metadata.