Implement image management enhancements: add functionality to relocate legacy images during startup, update image handling in show metadata, and refactor related API endpoints to utilize the new image storage system. Adjust database schema to support image references and update UI components for improved image selection and display.
This commit is contained in:
@@ -72,9 +72,12 @@ export function clearMetadata(showId: string) {
|
||||
return apiRequest<void>(`/admin/metadata/shows/${showId}`, { method: 'DELETE' })
|
||||
}
|
||||
|
||||
/** Ссылка на локальный постер шоу (публичный эндпоинт; cache-buster — по флагу наличия). */
|
||||
export function showPosterUrl(showId: string, bust?: string) {
|
||||
return `/api/metadata/shows/${showId}/poster${bust ? `?v=${encodeURIComponent(bust)}` : ''}`
|
||||
/** Привязать/снять постер шоу по ссылке на изображение из реестра (null — отвязать). */
|
||||
export function setShowPoster(showId: string, imageId: string | null) {
|
||||
return apiRequest<void>(`/admin/metadata/shows/${showId}/poster-image`, {
|
||||
method: 'PUT',
|
||||
body: { imageId },
|
||||
})
|
||||
}
|
||||
|
||||
/** Ссылка на локальный кадр серии. */
|
||||
|
||||
Reference in New Issue
Block a user