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:
Leonid Pershin
2026-07-25 11:43:17 +03:00
parent 149cd153b9
commit a970eae7d2
30 changed files with 1231 additions and 172 deletions
+6 -3
View File
@@ -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 },
})
}
/** Ссылка на локальный кадр серии. */