mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00: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:
parent
74878628c8
commit
aa126e377c
9 changed files with 115 additions and 17 deletions
|
|
@ -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
|
||||
})
|
||||
}));
|
||||
}
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue