mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 02:35:14 +00:00
test
This commit is contained in:
parent
f21cd216c3
commit
cd6e31acfa
4 changed files with 40 additions and 8 deletions
|
|
@ -1463,6 +1463,22 @@ class LogoViewSet(viewsets.ModelViewSet):
|
|||
|
||||
return super().destroy(request, *args, **kwargs)
|
||||
|
||||
def list(self, request, *args, **kwargs):
|
||||
"""Support optional no_pagination flag for convenience queries."""
|
||||
queryset = self.filter_queryset(self.get_queryset())
|
||||
|
||||
if request.query_params.get("no_pagination", "").lower() == "true":
|
||||
serializer = self.get_serializer(queryset, many=True)
|
||||
return Response(serializer.data)
|
||||
|
||||
page = self.paginate_queryset(queryset)
|
||||
if page is not None:
|
||||
serializer = self.get_serializer(page, many=True)
|
||||
return self.get_paginated_response(serializer.data)
|
||||
|
||||
serializer = self.get_serializer(queryset, many=True)
|
||||
return Response(serializer.data)
|
||||
|
||||
@action(detail=False, methods=["post"])
|
||||
def upload(self, request):
|
||||
if "file" not in request.FILES:
|
||||
|
|
|
|||
|
|
@ -341,6 +341,7 @@ const SeriesModal = ({ series, opened, onClose }) => {
|
|||
displaySeries?.series_image ||
|
||||
displaySeries?.logo?.cache_url ||
|
||||
displaySeries?.logo?.url ||
|
||||
displaySeries?.custom_properties?.poster_url ||
|
||||
null;
|
||||
|
||||
return (
|
||||
|
|
@ -706,10 +707,16 @@ const SeriesModal = ({ series, opened, onClose }) => {
|
|||
{/* Episode Image and Description Row */}
|
||||
<Flex gap="md">
|
||||
{/* Episode Image */}
|
||||
{episode.movie_image && (
|
||||
<Box style={{ flexShrink: 0 }}>
|
||||
<Image
|
||||
src={episode.movie_image}
|
||||
{(() => {
|
||||
const episodeImage =
|
||||
episode.movie_image || seriesPoster;
|
||||
if (!episodeImage) {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<Box style={{ flexShrink: 0 }}>
|
||||
<Image
|
||||
src={episodeImage}
|
||||
width={120}
|
||||
height={160}
|
||||
alt={episode.name}
|
||||
|
|
@ -717,7 +724,8 @@ const SeriesModal = ({ series, opened, onClose }) => {
|
|||
style={{ borderRadius: '4px' }}
|
||||
/>
|
||||
</Box>
|
||||
)}
|
||||
);
|
||||
})()}
|
||||
|
||||
{/* Episode Description */}
|
||||
<Box style={{ flex: 1 }}>
|
||||
|
|
|
|||
|
|
@ -323,6 +323,7 @@ const VODModal = ({ vod, opened, onClose }) => {
|
|||
displayVOD?.movie_image ||
|
||||
displayVOD?.logo?.cache_url ||
|
||||
displayVOD?.logo?.url ||
|
||||
displayVOD?.custom_properties?.poster_url ||
|
||||
null;
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -36,6 +36,9 @@ const VODCard = ({ vod, onClick }) => {
|
|||
const isEpisode = vod.type === 'episode';
|
||||
const posterSrc =
|
||||
vod.movie_image || vod.logo?.cache_url || vod.logo?.url || null;
|
||||
const fallbackPoster =
|
||||
vod.custom_properties?.poster_url || vod.custom_properties?.cover || null;
|
||||
const imageSrc = posterSrc || fallbackPoster;
|
||||
|
||||
const getDisplayTitle = () => {
|
||||
if (isEpisode && vod.series) {
|
||||
|
|
@ -73,9 +76,9 @@ const VODCard = ({ vod, onClick }) => {
|
|||
>
|
||||
<Card.Section>
|
||||
<Box style={{ position: 'relative', height: 300 }}>
|
||||
{posterSrc ? (
|
||||
{imageSrc ? (
|
||||
<Image
|
||||
src={posterSrc}
|
||||
src={imageSrc}
|
||||
height={300}
|
||||
alt={vod.name}
|
||||
fit="contain"
|
||||
|
|
@ -166,7 +169,11 @@ const VODCard = ({ vod, onClick }) => {
|
|||
|
||||
const SeriesCard = ({ series, onClick }) => {
|
||||
const seriesCover =
|
||||
series.series_image || series.logo?.cache_url || series.logo?.url || null;
|
||||
series.series_image ||
|
||||
series.logo?.cache_url ||
|
||||
series.logo?.url ||
|
||||
series.custom_properties?.poster_url ||
|
||||
null;
|
||||
return (
|
||||
<Card
|
||||
shadow="sm"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue