feat(api): tv series in the attention queues endpoint
This commit is contained in:
+17
-1
@@ -11,9 +11,21 @@ export interface AttentionMovie extends LibraryMovie {
|
||||
last_searched_at: string | null;
|
||||
}
|
||||
|
||||
/** A series in a TV attention queue, with what put it there (§9.5). */
|
||||
export interface SeriesAttention {
|
||||
series_id: number;
|
||||
tmdb_id: number;
|
||||
title: string;
|
||||
year: number | null;
|
||||
episodes: number[];
|
||||
seasons: number[];
|
||||
}
|
||||
|
||||
export interface AttentionQueues {
|
||||
no_pt_source: AttentionMovie[];
|
||||
needs_decision: AttentionMovie[];
|
||||
tv_no_pt_source: SeriesAttention[];
|
||||
tv_needs_decision: SeriesAttention[];
|
||||
}
|
||||
|
||||
export type AttentionOutcome =
|
||||
@@ -66,7 +78,11 @@ export async function allowEnglishAudio(movieId: number): Promise<AllowEnglishOu
|
||||
return { kind: "done", searchQueued: true };
|
||||
}
|
||||
|
||||
/** Entries across both queues — the rail badge's number. */
|
||||
/** Entries across both queues — the rail badge's number.
|
||||
*
|
||||
* Deliberately movies only for now: the TV lanes are new and the QUEUES
|
||||
* deck does not render them yet (issue #126 covered the backend).
|
||||
*/
|
||||
export function attentionTotal(queues: AttentionQueues): number {
|
||||
return queues.no_pt_source.length + queues.needs_decision.length;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user