diff --git a/backend/package-lock.json b/backend/package-lock.json index dcbab6b..1c59a3e 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -25,7 +25,6 @@ "@types/express-http-proxy": "^1.6.6", "cache-manager": "^5.7.6", "express-http-proxy": "^2.0.0", - "plugin-types": "file:plugins/plugin-types", "reflect-metadata": "^0.2.1", "rxjs": "^7.8.1", "sqlite3": "^5.1.7", @@ -8840,10 +8839,6 @@ "node": ">=8" } }, - "node_modules/plugin-types": { - "resolved": "plugins/plugin-types", - "link": true - }, "node_modules/pluralize": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", @@ -11644,7 +11639,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@aleksilassila/reiverr-plugin": "*", + "@aleksilassila/reiverr-plugin": "^1.0.0", "@types/axios": "^0.14.4", "axios": "^1.7.8", "express-http-proxy": "^2.1.1", @@ -11654,6 +11649,7 @@ }, "plugins/plugin-types": { "version": "1.0.0", + "extraneous": true, "license": "ISC", "devDependencies": {} }, diff --git a/src/lib/components/HeroShowcase/HeroShowcase.svelte b/src/lib/components/HeroShowcase/HeroShowcase.svelte index 32b5465..d486923 100644 --- a/src/lib/components/HeroShowcase/HeroShowcase.svelte +++ b/src/lib/components/HeroShowcase/HeroShowcase.svelte @@ -1,19 +1,30 @@ items.map((i) => `${TMDB_IMAGES_ORIGINAL}${i.backdropUrl}`))} + urls={items.then((items) => items.map((i) => `${TMDB_IMAGES_ORIGINAL}${i.backdropUri}`))} bind:index={showcaseIndex} on:enter on:navigate={({ detail }) => { @@ -50,46 +61,20 @@
+
-
= 15 - } - )} - on:click={openItem} - > - {item?.title} -
-
-

{item.year}

- - -

{item.rating} TMDB

-
-
- {item.overview} -
- +
{/if} diff --git a/src/lib/components/HeroShowcase/HeroShowcase.ts b/src/lib/components/HeroShowcase/HeroShowcase.ts deleted file mode 100644 index db0be36..0000000 --- a/src/lib/components/HeroShowcase/HeroShowcase.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { formatMinutesToTime } from '../../utils'; -import type { tmdbApi } from '../../apis/tmdb/tmdb-api'; - -export type RatingSource = 'tmdb'; // TODO: Add more rating sources & move elsewhere - -export type ShowcaseItemProps = { - posterUrl: string; - backdropUrl: string; - - id: number; - trailerUrl?: string; - - title: string; - overview?: string; - year?: number; - runtime?: string; - rating?: string; - ratingSource?: RatingSource; - genres: string[]; - url?: string; -}; - -export async function getShowcasePropsFromTmdbMovie( - response: Awaited> -): Promise { - return response.slice(0, 10).map((movie) => ({ - id: movie.id || 0, - title: movie.title || '', - posterUrl: movie.poster_path || '', - backdropUrl: movie.backdrop_path || '', - rating: movie.vote_average?.toFixed(1) || '0', - genres: [], //(movie as any)?.genres?.map((genre: any) => genre?.name), - year: movie.release_date ? new Date(movie.release_date).getFullYear() : undefined, - runtime: formatMinutesToTime((movie as any).runtime || 0), - ratingSource: 'tmdb', - trailerUrl: '', - url: `https://www.themoviedb.org/movie/${movie.id}`, - overview: movie.overview || '' - })); -} - -export async function getShowcasePropsFromTmdbSeries( - response: Awaited> -): Promise { - return response.slice(0, 10).map((series) => ({ - id: series.id || 0, - title: series.name || '', - posterUrl: series.poster_path || '', - backdropUrl: series.backdrop_path || '', - rating: series.vote_average?.toFixed(1) || '0', - genres: [], //(series as any)?.genres?.map((genre: any) => genre?.name), - year: series.first_air_date ? new Date(series.first_air_date).getFullYear() : undefined, - runtime: formatMinutesToTime((series as any).runtime || 0), - ratingSource: 'tmdb', - trailerUrl: '', - url: `https://www.themoviedb.org/movie/${series.id}`, - overview: series.overview || '' - })); -} diff --git a/src/lib/components/HeroShowcase/TmdbMoviesHeroShowcase.svelte b/src/lib/components/HeroShowcase/TmdbMoviesHeroShowcase.svelte new file mode 100644 index 0000000..190d2f0 --- /dev/null +++ b/src/lib/components/HeroShowcase/TmdbMoviesHeroShowcase.svelte @@ -0,0 +1,37 @@ + + + navigate(`/movie/${detail?.id}`)} {items} /> diff --git a/src/lib/components/HeroShowcase/TmdbSeriesHeroShowcase.svelte b/src/lib/components/HeroShowcase/TmdbSeriesHeroShowcase.svelte new file mode 100644 index 0000000..792692f --- /dev/null +++ b/src/lib/components/HeroShowcase/TmdbSeriesHeroShowcase.svelte @@ -0,0 +1,38 @@ + + + navigate(`/series/${detail?.id}`)} {items} /> diff --git a/src/lib/components/IconButton.svelte b/src/lib/components/IconButton.svelte index aaa0e06..0cd47a3 100644 --- a/src/lib/components/IconButton.svelte +++ b/src/lib/components/IconButton.svelte @@ -6,7 +6,7 @@ - {#await Promise.all([jellyfinEpisode, sonarrEpisode])} + + {:else} {/if} - {/await} + {/await} --> - {#await sonarrFiles then files} + {#if PLATFORM_WEB}
--> - @@ -307,10 +307,10 @@ Remove from Library {/if} - --> -