fix-feat: ajax download call
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
{{ include('search/partial/filter.html.twig') }}
|
||||
|
||||
{% if "movies" == results.media.mediaType %}
|
||||
<div class="results" {{ stimulus_controller('movie_results', {imdbId: results.media.imdbId}) }}>
|
||||
<div class="results" {{ stimulus_controller('movie_results', {tmdbId: results.media.tmdbId, imdbId: results.media.imdbId}) }}>
|
||||
</div>
|
||||
{% elseif "tvshows" == results.media.mediaType %}
|
||||
{% for season, episodes in results.media.episodes %}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<table class="w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400 hidden"
|
||||
<table class="w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400 {{ results.media.mediaType == "tvshows" ? "hidden" }}"
|
||||
{{ stimulus_target(controller, "list") }}
|
||||
>
|
||||
<thead class="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
|
||||
@@ -34,7 +34,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for result in results.results %}
|
||||
<tr class="bg-white border-b dark:bg-slate-700 dark:border-gray-600 border-gray-200" data-languages="{{ result.languages|json_encode }}" data-season="{{ results.season }}">
|
||||
<tr class="bg-white border-b dark:bg-slate-700 dark:border-gray-600 border-gray-200" data-languages="{{ result.languages|json_encode }}" {% if "tvshows" == results.media.mediaType %} data-season="{{ results.season }} {% endif %}">
|
||||
<td id="size" class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-800 dark:text-gray-50">
|
||||
{{ result.size }}
|
||||
</td>
|
||||
@@ -54,7 +54,16 @@
|
||||
{{ result.languageFlags|raw }}
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-end text-gray-800 dark:text-gray-50 flex flex-row gap-2 items-center justify-end">
|
||||
<button class="p-1.5 bg-green-600 rounded-md text-gray-50">
|
||||
<button class="p-1.5 bg-green-600 rounded-md text-gray-50"
|
||||
{{ stimulus_controller('download_button', {
|
||||
url: result.url,
|
||||
title: result.title,
|
||||
filename: result.filename,
|
||||
mediaType: results.media.mediaType,
|
||||
imdbId: results.media.imdbId
|
||||
}) }}
|
||||
{{ stimulus_action('download_button', 'download', 'click') }}
|
||||
>
|
||||
Download
|
||||
</button>
|
||||
<label for="select">
|
||||
|
||||
Reference in New Issue
Block a user