Skip to content

Commit

Permalink
Fixed: Showing already imported tracks as downloading in Artists index
Browse files Browse the repository at this point in the history
(cherry picked from commit 8c3a0ebabae163274b7587afe1f998edb39c5184)
  • Loading branch information
mynameisbogdan committed Jan 31, 2024
1 parent af12fad commit ecb37b8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
Expand Up @@ -12,7 +12,10 @@ function createArtistQueueDetailsSelector(artistId: number) {
(queueItems) => {
return queueItems.reduce(
(acc: ArtistQueueDetails, item) => {
if (item.artistId !== artistId) {
if (
item.trackedDownloadState === 'imported' ||
item.artistId !== artistId
) {
return acc;
}

Expand Down
16 changes: 14 additions & 2 deletions frontend/src/typings/Queue.ts
Expand Up @@ -2,6 +2,18 @@ import ModelBase from 'App/ModelBase';
import { QualityModel } from 'Quality/Quality';
import CustomFormat from 'typings/CustomFormat';

export type QueueTrackedDownloadStatus = 'ok' | 'warning' | 'error';

export type QueueTrackedDownloadState =
| 'downloading'
| 'downloadFailed'
| 'downloadFailedPending'
| 'importPending'
| 'importing'
| 'importFailed'
| 'imported'
| 'ignored';

export interface StatusMessage {
title: string;
messages: string[];
Expand All @@ -17,8 +29,8 @@ interface Queue extends ModelBase {
estimatedCompletionTime: string;
added?: string;
status: string;
trackedDownloadStatus: string;
trackedDownloadState: string;
trackedDownloadStatus: QueueTrackedDownloadStatus;
trackedDownloadState: QueueTrackedDownloadState;
statusMessages: StatusMessage[];
errorMessage: string;
downloadId: string;
Expand Down

0 comments on commit ecb37b8

Please sign in to comment.