feat(web): movie detail page at /movies/{id}
This commit is contained in:
+3
-22
@@ -3,7 +3,7 @@
|
||||
// (src/api/) is uncommitted, so CI's tsc cannot see it.
|
||||
|
||||
import type { ActionOutcome, MovieRelease, ReleasesOutcome, WaiveOutcome } from "./releases";
|
||||
import { errorDetail, waiverOverride } from "./releases";
|
||||
import { errorDetail, probedAttributeTags, waiverOverride } from "./releases";
|
||||
|
||||
/** §4.2 derived status — displayed, never editable. */
|
||||
export type SeriesStatus = "airing" | "incomplete" | "waiting" | "complete" | "ended";
|
||||
@@ -277,26 +277,7 @@ export function formatAirDate(airDate: string | null): string {
|
||||
return airDate ?? "—";
|
||||
}
|
||||
|
||||
/** The probed attributes a file row shows as chips (§5.6, §7.4). */
|
||||
/** The probed attributes an episode file row shows as chips (§5.6, §7.4). */
|
||||
export function fileAttributeTags(file: EpisodeFile): string[] {
|
||||
const probed = file.probed;
|
||||
if (!probed) {
|
||||
return [];
|
||||
}
|
||||
const tags: string[] = [];
|
||||
if (probed.resolution) {
|
||||
tags.push(probed.resolution);
|
||||
}
|
||||
if (probed.source) {
|
||||
tags.push(probed.source);
|
||||
}
|
||||
if (probed.hdr && probed.hdr !== "SDR") {
|
||||
tags.push(probed.hdr);
|
||||
}
|
||||
for (const track of probed.audio_tracks ?? []) {
|
||||
if (track.language) {
|
||||
tags.push(track.language);
|
||||
}
|
||||
}
|
||||
return tags;
|
||||
return probedAttributeTags(file.probed);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user