🕵🏼♀️ TPB, Mini-series, GN detection WIP
This commit is contained in:
@@ -19,7 +19,7 @@ import {
|
||||
getComicBookDetailById,
|
||||
extractComicArchive,
|
||||
} from "../actions/comicinfo.actions";
|
||||
import { detectTradePaperbacks } from "../shared/utils/tradepaperback.utils";
|
||||
import { detectIssueTypes } from "../shared/utils/tradepaperback.utils";
|
||||
import dayjs from "dayjs";
|
||||
const prettyBytes = require("pretty-bytes");
|
||||
import { DnD } from "./DnD";
|
||||
@@ -398,8 +398,8 @@ export const ComicDetail = ({}: ComicDetailProps): ReactElement => {
|
||||
<dd>{props.data.number}</dd>
|
||||
<dd>
|
||||
<div className="field is-grouped is-grouped-multiline">
|
||||
{!isEmpty(
|
||||
detectTradePaperbacks(
|
||||
{!isUndefined(
|
||||
detectIssueTypes(
|
||||
comicBookDetailData.sourcedMetadata.comicvine.volumeInformation
|
||||
.description,
|
||||
),
|
||||
@@ -407,7 +407,14 @@ export const ComicDetail = ({}: ComicDetailProps): ReactElement => {
|
||||
<div className="control">
|
||||
<div className="tags has-addons">
|
||||
<span className="tag is-light">Detected Type</span>
|
||||
<span className="tag is-warning">Trade Paperback</span>
|
||||
<span className="tag is-warning">
|
||||
{
|
||||
detectIssueTypes(
|
||||
comicBookDetailData.sourcedMetadata.comicvine
|
||||
.volumeInformation.description,
|
||||
).displayName
|
||||
}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
|
||||
@@ -13,7 +13,7 @@ import { getComicBooks } from "../actions/fileops.actions";
|
||||
import { isNil, isEmpty } from "lodash";
|
||||
import Masonry from "react-masonry-css";
|
||||
import Card from "./Carda";
|
||||
import { detectTradePaperbacks } from "../shared/utils/tradepaperback.utils";
|
||||
import { detectIssueTypes } from "../shared/utils/tradepaperback.utils";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
interface ILibraryGridProps {}
|
||||
@@ -81,7 +81,7 @@ export const LibraryGrid = (libraryGridProps: ILibraryGridProps) => {
|
||||
)}
|
||||
{!isNil(sourcedMetadata.comicvine) &&
|
||||
!isEmpty(
|
||||
detectTradePaperbacks(
|
||||
detectIssueTypes(
|
||||
sourcedMetadata.comicvine.volumeInformation.description,
|
||||
),
|
||||
) ? (
|
||||
|
||||
@@ -6,8 +6,8 @@ import {
|
||||
removeLeadingPeriod,
|
||||
escapePoundSymbol,
|
||||
} from "../shared/utils/formatting.utils";
|
||||
import { isEmpty, isNil, map } from "lodash";
|
||||
import { detectTradePaperbacks } from "../shared/utils/tradepaperback.utils";
|
||||
import { isNil, isUndefined, map } from "lodash";
|
||||
import { detectIssueTypes } from "../shared/utils/tradepaperback.utils";
|
||||
import Masonry from "react-masonry-css";
|
||||
|
||||
type RecentlyImportedProps = {
|
||||
@@ -71,13 +71,20 @@ export const RecentlyImported = ({
|
||||
<i className="fas fa-adjust" />
|
||||
</span>
|
||||
)}
|
||||
{!isNil(sourcedMetadata.comicvine) &&
|
||||
!isEmpty(
|
||||
detectTradePaperbacks(
|
||||
{!isUndefined(sourcedMetadata.comicvine) &&
|
||||
!isNil(
|
||||
detectIssueTypes(
|
||||
sourcedMetadata.comicvine.volumeInformation.description,
|
||||
),
|
||||
) ? (
|
||||
<span className="tag is-warning">TPB</span>
|
||||
<span className="tag is-warning">
|
||||
{
|
||||
detectIssueTypes(
|
||||
sourcedMetadata.comicvine.volumeInformation
|
||||
.description,
|
||||
).displayName
|
||||
}
|
||||
</span>
|
||||
) : null}
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user