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:
@@ -7,7 +7,7 @@ import { cn } from '@/shared/lib/cn'
|
||||
import { Badge } from '@/shared/ui/badge'
|
||||
import { Button } from '@/shared/ui/button'
|
||||
import { ChannelPlayer } from './ChannelPlayer'
|
||||
import { episodeStillUrl, getEpg, listChannels, showPosterUrl, watchChannel } from './api'
|
||||
import { episodeStillUrl, getEpg, imageUrl, listChannels, watchChannel } from './api'
|
||||
|
||||
function formatTime(iso: string) {
|
||||
return new Date(iso).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })
|
||||
@@ -89,9 +89,9 @@ export function AirPage() {
|
||||
selected === channel.slug && 'border-primary text-primary',
|
||||
)}
|
||||
>
|
||||
{channel.currentShowHasPoster && channel.currentShowId ? (
|
||||
{channel.currentShowPosterImageId ? (
|
||||
<img
|
||||
src={showPosterUrl(channel.currentShowId)}
|
||||
src={imageUrl(channel.currentShowPosterImageId)}
|
||||
alt=""
|
||||
className="h-10 w-7 shrink-0 rounded object-cover"
|
||||
/>
|
||||
@@ -144,9 +144,9 @@ export function AirPage() {
|
||||
alt=""
|
||||
className="hidden h-24 w-40 shrink-0 rounded object-cover sm:block"
|
||||
/>
|
||||
) : currentEntry?.showHasPoster && current.showId ? (
|
||||
) : currentEntry?.showPosterImageId ? (
|
||||
<img
|
||||
src={showPosterUrl(current.showId)}
|
||||
src={imageUrl(currentEntry.showPosterImageId)}
|
||||
alt=""
|
||||
className="hidden h-24 w-16 shrink-0 rounded object-cover sm:block"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user