diff --git a/frontend/src/Activity/Queue/QueueDetails.js b/frontend/src/Activity/Queue/QueueDetails.js
index f6e360c0a..5279971a3 100644
--- a/frontend/src/Activity/Queue/QueueDetails.js
+++ b/frontend/src/Activity/Queue/QueueDetails.js
@@ -10,13 +10,13 @@ function QueueDetails(props) {
size,
sizeleft,
estimatedCompletionTime,
- status: queueStatus,
+ status,
+ trackedDownloadState,
+ trackedDownloadStatus,
errorMessage,
progressBar
} = props;
- const status = queueStatus.toLowerCase();
-
const progress = (100 - sizeleft / size * 100);
if (status === 'pending') {
@@ -39,7 +39,35 @@ function QueueDetails(props) {
);
}
- // TODO: show an icon when download is complete, but not imported yet?
+ if (trackedDownloadStatus === 'warning') {
+ return (
+
+ );
+ }
+
+ if (trackedDownloadState === 'importPending') {
+ return (
+
+ );
+ }
+
+ if (trackedDownloadState === 'importing') {
+ return (
+
+ );
+ }
}
if (errorMessage) {
@@ -90,6 +118,8 @@ QueueDetails.propTypes = {
sizeleft: PropTypes.number.isRequired,
estimatedCompletionTime: PropTypes.string,
status: PropTypes.string.isRequired,
+ trackedDownloadState: PropTypes.string.isRequired,
+ trackedDownloadStatus: PropTypes.string.isRequired,
errorMessage: PropTypes.string,
progressBar: PropTypes.node.isRequired
};
diff --git a/frontend/src/Calendar/Events/CalendarEventQueueDetails.js b/frontend/src/Calendar/Events/CalendarEventQueueDetails.js
index 81d81465c..7440b9d67 100644
--- a/frontend/src/Calendar/Events/CalendarEventQueueDetails.js
+++ b/frontend/src/Calendar/Events/CalendarEventQueueDetails.js
@@ -11,10 +11,12 @@ function CalendarEventQueueDetails(props) {
sizeleft,
estimatedCompletionTime,
status,
+ trackedDownloadState,
+ trackedDownloadStatus,
errorMessage
} = props;
- const progress = (100 - sizeleft / size * 100);
+ const progress = size ? (100 - sizeleft / size * 100) : 0;
return (
@@ -44,6 +48,8 @@ CalendarEventQueueDetails.propTypes = {
sizeleft: PropTypes.number.isRequired,
estimatedCompletionTime: PropTypes.string,
status: PropTypes.string.isRequired,
+ trackedDownloadState: PropTypes.string.isRequired,
+ trackedDownloadStatus: PropTypes.string.isRequired,
errorMessage: PropTypes.string
};
diff --git a/frontend/src/Episode/EpisodeStatus.js b/frontend/src/Episode/EpisodeStatus.js
index ee8ff9dad..9d307ebb1 100644
--- a/frontend/src/Episode/EpisodeStatus.js
+++ b/frontend/src/Episode/EpisodeStatus.js
@@ -27,7 +27,7 @@ function EpisodeStatus(props) {
size
} = queueItem;
- const progress = (100 - sizeleft / size * 100);
+ const progress = size ? (100 - sizeleft / size * 100) : 0;
return (