71 lines
2.2 KiB
JavaScript
71 lines
2.2 KiB
JavaScript
import React from "react";
|
|
import PropTypes from "prop-types";
|
|
|
|
import { DownloadAndStream } from "../buttons/download";
|
|
import { ImdbBadge } from "../buttons/imdb";
|
|
|
|
import { TrackingLabel } from "../details/tracking";
|
|
import { Genres } from "../details/genres";
|
|
import { Plot } from "../details/plot";
|
|
import { PolochonMetadata } from "../details/polochon";
|
|
import { Rating } from "../details/rating";
|
|
import { ReleaseDate } from "../details/releaseDate";
|
|
import { Runtime } from "../details/runtime";
|
|
import { Title } from "../details/title";
|
|
|
|
const ListDetails = (props) => {
|
|
if (!props.data || Object.keys(props.data).length === 0) {
|
|
return null;
|
|
}
|
|
|
|
if (props.loading) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<div className="col-8 col-md-4 list-details pl-1 d-flex align-items-start flex-column video-details flex-fill flex-column flex-nowrap">
|
|
<Title
|
|
title={props.data.title}
|
|
wishlist={props.wishlist}
|
|
wishlisted={props.wishlisted}
|
|
/>
|
|
<ReleaseDate date={props.data.year} />
|
|
<Runtime runtime={props.data.runtime} />
|
|
<Genres genres={props.data.genres} />
|
|
<Rating rating={props.data.rating} votes={props.data.votes} />
|
|
<div>
|
|
<ImdbBadge imdbId={props.data.imdb_id} />
|
|
<DownloadAndStream
|
|
url={props.data.polochon_url}
|
|
name={props.data.title}
|
|
subtitles={props.data.subtitles}
|
|
/>
|
|
</div>
|
|
<TrackingLabel
|
|
wishlisted={props.data.wishlisted}
|
|
inLibrary={props.data.polochon_url !== ""}
|
|
trackedSeason={props.data.tracked_season}
|
|
trackedEpisode={props.data.tracked_episode}
|
|
/>
|
|
<PolochonMetadata
|
|
quality={props.data.quality}
|
|
releaseGroup={props.data.release_group}
|
|
container={props.data.container}
|
|
audioCodec={props.data.audio_codec}
|
|
videoCodec={props.data.video_codec}
|
|
size={props.data.size}
|
|
/>
|
|
<Plot plot={props.data.plot} />
|
|
{props.children}
|
|
</div>
|
|
);
|
|
};
|
|
ListDetails.propTypes = {
|
|
data: PropTypes.object,
|
|
wishlist: PropTypes.func,
|
|
wishlisted: PropTypes.bool,
|
|
loading: PropTypes.bool,
|
|
children: PropTypes.object,
|
|
};
|
|
export default ListDetails;
|