window.open(`/${type}/${tmdbId}`, '_self')} class="h-full w-full opacity-0 hover:opacity-100 transition-opacity flex flex-col justify-between cursor-pointer p-2 px-3 relative z-[1] peer" style={progress > 0 ? 'padding-bottom: 0.6rem;' : ''} >

{title}

{genres.map((genre) => genre.charAt(0).toUpperCase() + genre.slice(1)).join(', ')}
{#if completionTime}
Downloaded in {formatMinutesToTime((new Date(completionTime).getTime() - Date.now()) / 1000 / 60)}
{:else} {#if runtimeMinutes}
{progress ? formatMinutesToTime(runtimeMinutes - runtimeMinutes * (progress / 100)) + ' left' : formatMinutesToTime(runtimeMinutes)}
{/if} {#if seasons}
{seasons} seasons
{/if} {#if rating}
{rating.toFixed(1)}
{/if} {/if}