-
-
Continuing (All episodes downloaded)
+class SeriesIndexFooter extends PureComponent {
+
+ //
+ // Render
+
+ render() {
+ const { series } = this.props;
+ const count = series.length;
+ let episodes = 0;
+ let episodeFiles = 0;
+ let ended = 0;
+ let continuing = 0;
+ let monitored = 0;
+ let totalFileSize = 0;
+
+ series.forEach((s) => {
+ const { statistics = {} } = s;
+
+ const {
+ episodeCount = 0,
+ episodeFileCount = 0,
+ sizeOnDisk = 0
+ } = statistics;
+
+ episodes += episodeCount;
+ episodeFiles += episodeFileCount;
+
+ if (s.status === 'ended') {
+ ended++;
+ } else {
+ continuing++;
+ }
+
+ if (s.monitored) {
+ monitored++;
+ }
+
+ totalFileSize += sizeOnDisk;
+ });
+
+ return (
+
+ {(enableColorImpairedMode) => {
+ return (
+
+
+
+
+
Continuing (All episodes downloaded)
+
+
+
+
+
Ended (All episodes downloaded)
+
+
+
+
+
Missing Episodes (Series monitored)
+
+
+
+
+
Missing Episodes (Series not monitored)
+
-
-
-
Ended (All episodes downloaded)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
Missing Episodes (Series monitored)
-
-
-
-
-
Missing Episodes (Series not monitored)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
- }}
-
- );
+ );
+ }}
+
+ );
+ }
}
SeriesIndexFooter.propTypes = {