From 0cd5bb50bd9138b759d5baa03a2e46082f454c9f Mon Sep 17 00:00:00 2001 From: Bogdan Date: Fri, 15 Dec 2023 03:25:36 +0200 Subject: [PATCH] Fixed: Undefined statistics and season folder column width on series index --- frontend/src/Series/Details/SeriesDetails.js | 22 +++++++++++++------ .../Index/Posters/SeriesIndexPoster.tsx | 10 ++++----- .../src/Series/Index/Table/SeriesIndexRow.css | 2 +- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/frontend/src/Series/Details/SeriesDetails.js b/frontend/src/Series/Details/SeriesDetails.js index 98c492731..5a0b7f9b7 100644 --- a/frontend/src/Series/Details/SeriesDetails.js +++ b/frontend/src/Series/Details/SeriesDetails.js @@ -3,6 +3,7 @@ import moment from 'moment'; import PropTypes from 'prop-types'; import React, { Component } from 'react'; import TextTruncate from 'react-text-truncate'; +import Alert from 'Components/Alert'; import HeartRating from 'Components/HeartRating'; import Icon from 'Components/Icon'; import Label from 'Components/Label'; @@ -604,13 +605,19 @@ class SeriesDetails extends Component { } { - !isFetching && episodesError && -
{translate('EpisodesLoadError')}
+ !isFetching && episodesError ? + + {translate('EpisodesLoadError')} + : + null } { - !isFetching && episodeFilesError && -
{translate('EpisodeFilesLoadError')}
+ !isFetching && episodeFilesError ? + + {translate('EpisodeFilesLoadError')} + : + null } { @@ -633,10 +640,11 @@ class SeriesDetails extends Component { } { - isPopulated && !seasons.length && -
+ isPopulated && !seasons.length ? + {translate('NoEpisodeInformation')} -
+ : + null } diff --git a/frontend/src/Series/Index/Posters/SeriesIndexPoster.tsx b/frontend/src/Series/Index/Posters/SeriesIndexPoster.tsx index 50bf46524..0a0a385eb 100644 --- a/frontend/src/Series/Index/Posters/SeriesIndexPoster.tsx +++ b/frontend/src/Series/Index/Posters/SeriesIndexPoster.tsx @@ -63,11 +63,11 @@ function SeriesIndexPoster(props: SeriesIndexPosterProps) { } = series; const { - seasonCount, - episodeCount, - episodeFileCount, - totalEpisodeCount, - sizeOnDisk, + seasonCount = 0, + episodeCount = 0, + episodeFileCount = 0, + totalEpisodeCount = 0, + sizeOnDisk = 0, } = statistics; const dispatch = useDispatch(); diff --git a/frontend/src/Series/Index/Table/SeriesIndexRow.css b/frontend/src/Series/Index/Table/SeriesIndexRow.css index 7f1e47db4..1ad943161 100644 --- a/frontend/src/Series/Index/Table/SeriesIndexRow.css +++ b/frontend/src/Series/Index/Table/SeriesIndexRow.css @@ -93,7 +93,7 @@ .seasonFolder { composes: cell; - width: 150px; + flex: 0 0 150px; } .episodeProgress,