[READ-ONLY] Mirror of https://github.com/flo-bit/skywatched. review movies and tv shows, based on at proto skywatched.app
0

Configure Feed

Select the types of activity you want to include in your feed.

adding second movie

+15 -5
+13 -3
src/routes/game/[kind]/[id]/[kind2]/[id2]/[counter]/+page.server.ts
··· 12 12 13 13 /** @type {import('./$types').PageServerLoad} */ 14 14 export async function load(event) { 15 - const id = "10193"; 16 - const kind = "movie"; 15 + const id = parseInt(event.params.id.split('-')[0]); 16 + const id2 = parseInt(event.params.id2.split('-')[0]); 17 + const kind = event.params.kind; 18 + const kind2=event.params.kind2; 17 19 const couter=0; 18 20 19 21 if (kind !== 'movie' && kind !== 'tv') { ··· 24 26 return error(404, 'Not found'); 25 27 } 26 28 const resultPromise = getDetails(id, kind); 29 + const resultPromise2 = getDetails(id2, kind2); 27 30 28 31 const trailerPromise = getTrailer(id, kind); 29 32 ··· 38 41 39 42 const castPromise = getCast(id, kind); 40 43 41 - const [result, trailer, recommendations, watchProviders, ratings, cast] = await Promise.all([ 44 + const [result,result2, trailer, recommendations, watchProviders, ratings, cast] = await Promise.all([ 42 45 resultPromise, 46 + resultPromise2, 43 47 trailerPromise, 44 48 recommendationsPromise, 45 49 watchProvidersPromise, ··· 57 61 movieId: kind === 'movie' ? id : undefined, 58 62 showId: kind === 'tv' ? id : undefined 59 63 }, 64 + result2: { 65 + ...result2, 66 + movieId: kind === 'movie' ? id : undefined, 67 + showId: kind === 'tv' ? id : undefined 68 + }, 60 69 trailer, 61 70 // @ts-expect-error - TODO: fix this 62 71 recommendations: recommendations.map((item) => { ··· 67 76 } 68 77 }), 69 78 kind, 79 + kind2, 70 80 watchProviders, 71 81 ratings, 72 82 cast,
+2 -2
src/routes/game/[kind]/[id]/[kind2]/[id2]/[counter]/+page.svelte
··· 108 108 style:--name={`poster-${data.result.id}`} 109 109 /> 110 110 <img 111 - src="https://image.tmdb.org/t/p/w500{data.result.poster_path}" 111 + src="https://image.tmdb.org/t/p/w500{data.result2.poster_path}" 112 112 alt="" 113 113 class="poster h-36 w-24 shrink-0 rounded-lg border border-white/10 sm:h-64 sm:w-44" 114 - style:--name={`poster-${data.result.id}`} 114 + style:--name={`poster-${data.result2.id}`} 115 115 /> 116 116 <div class="flex flex-col gap-4"> 117 117 <div