🔫 Tweaking the trigger for download complete action
This commit is contained in:
@@ -18,7 +18,7 @@ import {
|
||||
LS_SINGLE_IMPORT,
|
||||
IMS_COMIC_BOOK_DB_OBJECT_FETCHED,
|
||||
} from "../constants/action-types";
|
||||
import { isNil, isUndefined } from "lodash";
|
||||
import { isNil } from "lodash";
|
||||
import axios from "axios";
|
||||
|
||||
interface SearchData {
|
||||
@@ -134,16 +134,19 @@ export const downloadAirDCPPItem =
|
||||
`search/${instanceId}/results/${resultId}/download`,
|
||||
);
|
||||
let downloadStatus = undefined;
|
||||
let count = 0;
|
||||
// download status check
|
||||
await ADCPPSocket.addListener(`queue`, "queue_file_status", (status) => {
|
||||
if (status.status.completed) {
|
||||
downloadStatus = status;
|
||||
|
||||
dispatch({
|
||||
type: LS_SINGLE_IMPORT,
|
||||
meta: { remote: true },
|
||||
data: { downloadStatus, comicObjectId },
|
||||
});
|
||||
if (count === 0) {
|
||||
dispatch({
|
||||
type: LS_SINGLE_IMPORT,
|
||||
meta: { remote: true },
|
||||
data: { downloadStatus, comicObjectId },
|
||||
});
|
||||
}
|
||||
count += 1;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ export const PullList = ({ issues }: PullListProps): ReactElement => {
|
||||
useEffect(() => {
|
||||
dispatch(
|
||||
getWeeklyPullList({
|
||||
startDate: "2022-5-1",
|
||||
startDate: "2022-5-17",
|
||||
pageSize: "15",
|
||||
currentPage: "1",
|
||||
}),
|
||||
|
||||
@@ -81,14 +81,15 @@ export const RecentlyImported = ({
|
||||
</span>
|
||||
)}
|
||||
{/* ComicInfo.xml presence */}
|
||||
{!isNil(sourcedMetadata.comicInfo) && (
|
||||
<span className="icon custom-icon is-small has-text-danger">
|
||||
<img
|
||||
src="/img/comicinfoxml.svg"
|
||||
alt={"ComicInfo.xml file detected."}
|
||||
/>
|
||||
</span>
|
||||
)}
|
||||
{!isNil(sourcedMetadata.comicInfo) &&
|
||||
!isEmpty(sourcedMetadata.comicInfo) && (
|
||||
<span className="icon custom-icon is-small has-text-danger">
|
||||
<img
|
||||
src="/img/comicinfoxml.svg"
|
||||
alt={"ComicInfo.xml file detected."}
|
||||
/>
|
||||
</span>
|
||||
)}
|
||||
{/* Issue type */}
|
||||
{isComicBookMetadataAvailable &&
|
||||
!isNil(
|
||||
|
||||
@@ -8,9 +8,9 @@ import { search } from "../services/api/SearchApi";
|
||||
import { Form, Field } from "react-final-form";
|
||||
import Card from "./Carda";
|
||||
|
||||
interface ISearchProps { }
|
||||
interface ISearchProps {}
|
||||
|
||||
export const Search = ({ }: ISearchProps): ReactElement => {
|
||||
export const Search = ({}: ISearchProps): ReactElement => {
|
||||
const formData = {
|
||||
search: "",
|
||||
};
|
||||
@@ -83,7 +83,7 @@ export const Search = ({ }: ISearchProps): ReactElement => {
|
||||
)}
|
||||
/>
|
||||
{!isNil(comicVineSearchResults.results) &&
|
||||
!isEmpty(comicVineSearchResults.results) ? (
|
||||
!isEmpty(comicVineSearchResults.results) ? (
|
||||
<div>
|
||||
{comicVineSearchResults.results.map((result) => {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user