mirror of
https://github.com/aleksilassila/reiverr.git
synced 2026-04-20 02:53:30 +02:00
feat: Implemented jellyfin api
This commit is contained in:
30
src/lib/components/Card/JellyfinCard.svelte
Normal file
30
src/lib/components/Card/JellyfinCard.svelte
Normal file
@@ -0,0 +1,30 @@
|
||||
<script lang="ts">
|
||||
import { jellyfinApi, type JellyfinItem } from '../../apis/jellyfin/jellyfin-api';
|
||||
import Card from './Card.svelte';
|
||||
|
||||
export let item: JellyfinItem;
|
||||
|
||||
// return {
|
||||
// tmdbId: Number(item.ProviderIds?.Tmdb) || 0,
|
||||
// jellyfinId: item.Id,
|
||||
// title: item.Name || undefined,
|
||||
// subtitle: item.Genres?.join(', ') || undefined,
|
||||
// backdropUrl: getJellyfinPosterUrl(item, 80),
|
||||
// size: 'dynamic',
|
||||
// ...(item.Type === 'Movie' ? { type: 'movie' } : { type: 'series' }),
|
||||
// orientation: 'portrait',
|
||||
// rating: item.CommunityRating || undefined
|
||||
// };
|
||||
</script>
|
||||
|
||||
<Card
|
||||
tmdbId={Number(item.ProviderIds?.Tmdb) || 0}
|
||||
jellyfinId={item.Id}
|
||||
title={item.Name || undefined}
|
||||
subtitle={item.Genres?.join(', ') || undefined}
|
||||
backdropUrl={jellyfinApi.getPosterUrl(item, 80)}
|
||||
size="dynamic"
|
||||
type={item.Type === 'Movie' ? 'movie' : 'series'}
|
||||
orientation="portrait"
|
||||
rating={item.CommunityRating || undefined}
|
||||
/>
|
||||
Reference in New Issue
Block a user