Files
strimserve/src/lib/types.ts
T
apt-get 83cc73acff add varying intensity to stream tags
plus improving the tag select dropdown in general
2026-09-25 21:26:31 +02:00

32 lines
890 B
TypeScript

/** A track entry: [timestamp_seconds, artist, title] */
export type Track = [number, string, string];
// tag -> weight, 1 (light) to 3 (heavy)
export type TagWeights = Record<string, number>;
/** The summary shape used in sidebar listings. */
export interface StreamSummary {
id: string;
stream_date: number;
filename: string;
title: string | null;
tags: TagWeights;
length_seconds: number;
}
/** The full stream shape used on the detail/player page. */
export interface Stream extends StreamSummary {
format: string;
description: string | null;
// rendered at page load, so absent straight out of the database
descriptionHtml?: string;
tracks: Track[];
}
/** Partial stream downloads, as well as associated etag for cache validation. */
export interface PartialDownload {
received: number;
total: number;
etag: string | null;
}