Fixed: Showing already imported episodes as downloading in Series index
This commit is contained in:
parent
10fbc4e25a
commit
8c3a0ebaba
|
@ -1,42 +1,10 @@
|
||||||
import ModelBase from 'App/ModelBase';
|
import Queue from 'typings/Queue';
|
||||||
import Language from 'Language/Language';
|
|
||||||
import { QualityModel } from 'Quality/Quality';
|
|
||||||
import CustomFormat from 'typings/CustomFormat';
|
|
||||||
import AppSectionState, {
|
import AppSectionState, {
|
||||||
AppSectionFilterState,
|
AppSectionFilterState,
|
||||||
AppSectionItemState,
|
AppSectionItemState,
|
||||||
Error,
|
Error,
|
||||||
} from './AppSectionState';
|
} from './AppSectionState';
|
||||||
|
|
||||||
export interface StatusMessage {
|
|
||||||
title: string;
|
|
||||||
messages: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Queue extends ModelBase {
|
|
||||||
languages: Language[];
|
|
||||||
quality: QualityModel;
|
|
||||||
customFormats: CustomFormat[];
|
|
||||||
size: number;
|
|
||||||
title: string;
|
|
||||||
sizeleft: number;
|
|
||||||
timeleft: string;
|
|
||||||
estimatedCompletionTime: string;
|
|
||||||
status: string;
|
|
||||||
trackedDownloadStatus: string;
|
|
||||||
trackedDownloadState: string;
|
|
||||||
statusMessages: StatusMessage[];
|
|
||||||
errorMessage: string;
|
|
||||||
downloadId: string;
|
|
||||||
protocol: string;
|
|
||||||
downloadClient: string;
|
|
||||||
outputPath: string;
|
|
||||||
episodeHasFile: boolean;
|
|
||||||
seriesId?: number;
|
|
||||||
episodeId?: number;
|
|
||||||
seasonNumber?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface QueueDetailsAppState extends AppSectionState<Queue> {
|
export interface QueueDetailsAppState extends AppSectionState<Queue> {
|
||||||
params: unknown;
|
params: unknown;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,10 @@ function createSeriesQueueDetailsSelector(
|
||||||
(queueItems) => {
|
(queueItems) => {
|
||||||
return queueItems.reduce(
|
return queueItems.reduce(
|
||||||
(acc: SeriesQueueDetails, item) => {
|
(acc: SeriesQueueDetails, item) => {
|
||||||
if (item.seriesId !== seriesId) {
|
if (
|
||||||
|
item.trackedDownloadState === 'imported' ||
|
||||||
|
item.seriesId !== seriesId
|
||||||
|
) {
|
||||||
return acc;
|
return acc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
import ModelBase from 'App/ModelBase';
|
||||||
|
import Language from 'Language/Language';
|
||||||
|
import { QualityModel } from 'Quality/Quality';
|
||||||
|
import CustomFormat from 'typings/CustomFormat';
|
||||||
|
|
||||||
|
export type QueueTrackedDownloadStatus = 'ok' | 'warning' | 'error';
|
||||||
|
|
||||||
|
export type QueueTrackedDownloadState =
|
||||||
|
| 'downloading'
|
||||||
|
| 'importPending'
|
||||||
|
| 'importing'
|
||||||
|
| 'imported'
|
||||||
|
| 'failedPending'
|
||||||
|
| 'failed'
|
||||||
|
| 'ignored';
|
||||||
|
|
||||||
|
export interface StatusMessage {
|
||||||
|
title: string;
|
||||||
|
messages: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Queue extends ModelBase {
|
||||||
|
languages: Language[];
|
||||||
|
quality: QualityModel;
|
||||||
|
customFormats: CustomFormat[];
|
||||||
|
size: number;
|
||||||
|
title: string;
|
||||||
|
sizeleft: number;
|
||||||
|
timeleft: string;
|
||||||
|
estimatedCompletionTime: string;
|
||||||
|
status: string;
|
||||||
|
trackedDownloadStatus: QueueTrackedDownloadStatus;
|
||||||
|
trackedDownloadState: QueueTrackedDownloadState;
|
||||||
|
statusMessages: StatusMessage[];
|
||||||
|
errorMessage: string;
|
||||||
|
downloadId: string;
|
||||||
|
protocol: string;
|
||||||
|
downloadClient: string;
|
||||||
|
outputPath: string;
|
||||||
|
episodeHasFile: boolean;
|
||||||
|
seriesId?: number;
|
||||||
|
episodeId?: number;
|
||||||
|
seasonNumber?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Queue;
|
Loading…
Reference in New Issue