mirror of
https://github.com/immich-app/immich.git
synced 2026-06-12 19:11:52 -07:00
fix(server): add hint header for segment after init.mp4 (#28867)
* add hint header for segment after init.mp4 * use zod * actually validate * update openapi * linting
This commit is contained in:
@@ -4472,13 +4472,14 @@ export function getMediaPlaylist({ id, key, sessionId, slug, variantIndex }: {
|
||||
/**
|
||||
* Get HLS segment or init file
|
||||
*/
|
||||
export function getSegment({ filename, id, key, sessionId, slug, variantIndex }: {
|
||||
export function getSegment({ filename, id, key, sessionId, slug, variantIndex, xImmichHlsMsn }: {
|
||||
filename: string;
|
||||
id: string;
|
||||
key?: string;
|
||||
sessionId: string;
|
||||
slug?: string;
|
||||
variantIndex: number;
|
||||
xImmichHlsMsn?: number;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchBlob<{
|
||||
status: 200;
|
||||
@@ -4487,7 +4488,10 @@ export function getSegment({ filename, id, key, sessionId, slug, variantIndex }:
|
||||
key,
|
||||
slug
|
||||
}))}`, {
|
||||
...opts
|
||||
...opts,
|
||||
headers: oazapfts.mergeHeaders(opts?.headers, {
|
||||
"x-immich-hls-msn": xImmichHlsMsn
|
||||
})
|
||||
}));
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user