97 lines
5.8 KiB
Twig
97 lines
5.8 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block title %}{{ results.media.title }} — Download Options — Torsearch{% endblock %}
|
|
|
|
{% block body %}
|
|
<div class="p-4 flex flex-col grow gap-4">
|
|
<h2 class="mb-2 text-3xl font-bold text-gray-50">Media Results</h2>
|
|
<div class="flex flex-row w-full gap-2">
|
|
<twig:Card title="" contentClass="flex flex-col gap-4 justify-between w-full text-gray-50">
|
|
<div class="p-4 flex flex-row gap-6">
|
|
{% if results.media.poster != null %}
|
|
<img class="w-40 rounded-lg" src="{{ results.media.poster }}" />
|
|
{% else %}
|
|
<div class="w-40 h-[144px] rounded-lg bg-gray-700 flex items-center justify-center">
|
|
<twig:ux:icon width="24" name="hugeicons:loading-01" />
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="w-full flex flex-col">
|
|
<div class="mb-4 flex flex-row gap-2 justify-between">
|
|
<h3 class="text-xl font-medium leading-tight font-bold text-gray-50">
|
|
{{ results.media.title }} - {{ results.media.year }}
|
|
</h3>
|
|
|
|
|
|
<div {{ stimulus_controller('monitor_button', {
|
|
tmdbId: results.media.tmdbId,
|
|
imdbId: results.media.imdbId,
|
|
title: results.media.title,
|
|
})}}
|
|
data-monitor-button-result-filter-outlet="#filter"
|
|
>
|
|
<button data-monitor-button-target="button" {{ stimulus_action('monitor_button', 'toggle', 'click') }} class="h-8 text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-2 py-1.5 text-center inline-flex items-center dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800" type="button">
|
|
Monitor
|
|
<svg class="w-2.5 h-2.5 ms-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
|
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 4 4 4-4"/>
|
|
</svg>
|
|
</button>
|
|
|
|
<!-- Dropdown menu -->
|
|
<div data-monitor-button-target="options" class="absolute mt-1 right-12 z-40 hidden bg-white divide-y rounded-lg shadow-sm w-44 dark:bg-green-600 backdrop-filter backdrop-blur-md bg-opacity-60">
|
|
<ul class="py-2 text-sm text-gray-700 dark:text-gray-200" aria-labelledby="dropdownDefaultButton">
|
|
<li {{ stimulus_action('monitor_button', 'monitorSeries', 'click') }}>
|
|
<button class="px-4 py-2 hover:bg-green-700 w-full text-left">
|
|
Entire Series
|
|
</button>
|
|
</li>
|
|
<li {{ stimulus_action('monitor_button', 'monitorSeason', 'click') }}>
|
|
<button class="px-4 py-2 hover:bg-green-700 w-full text-left">
|
|
Season
|
|
</button>
|
|
</li>
|
|
<li {{ stimulus_action('monitor_button', 'monitorEpisode', 'click') }}>
|
|
<button class="px-4 py-2 hover:bg-green-700 w-full text-left">
|
|
Episode
|
|
</button>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<p class="text-gray-50">
|
|
{{ results.media.description }}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<twig:Filter results="{{ results }}" filter="{{ filter }}" />
|
|
|
|
{% if "movies" == results.media.mediaType %}
|
|
<div class="results" {{ stimulus_controller('movie_results', {title: results.media.title, tmdbId: results.media.tmdbId, imdbId: results.media.imdbId}) }}>
|
|
</div>
|
|
{% elseif "tvshows" == results.media.mediaType %}
|
|
{% for season, episodes in results.media.episodes %}
|
|
{% set active = (season == '1') ? true : false %}
|
|
{% for episode in episodes %}
|
|
<div class="results {{ (active == false) ? 'hidden' }}"
|
|
data-tv-results-loading-icon-outlet=".loading-icon"
|
|
data-download-button-outlet=".download-btn"
|
|
{{ stimulus_controller('tv_results', {
|
|
title: results.media.title,
|
|
tmdbId: results.media.tmdbId,
|
|
imdbId: results.media.imdbId,
|
|
season: season,
|
|
episode: episode['episode_number'],
|
|
active: active,
|
|
}) }}></div>
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
</twig:Card>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|