wip: working episode pagination, season switcher, monitor only new content
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
data-result-filter-media-type-value="{{ results.media.mediaType }}"
|
||||
data-result-filter-movie-results-outlet=".results"
|
||||
data-result-filter-tv-results-outlet=".results"
|
||||
data-result-filter-tv-episode-list-outlet=".episode-list"
|
||||
>
|
||||
<div class="w-full p-4 flex flex-row gap-4 bg-stone-500 text-md text-gray-500 dark:text-gray-50 rounded-lg">
|
||||
<label for="resolution">
|
||||
@@ -58,7 +59,9 @@
|
||||
<label for="season">
|
||||
Season
|
||||
<select id="season" name="season" value="1" data-result-filter-target="season" class="px-1 py-0.5 bg-stone-100 text-gray-800 rounded-md"
|
||||
{{ stimulus_action('result_filter', 'uncheckSelectAllBtn', 'change') }}>
|
||||
{{ stimulus_action('result_filter', 'setSeason', 'change') }}
|
||||
{{ stimulus_action('result_filter', 'uncheckSelectAllBtn', 'change') }}
|
||||
>
|
||||
<option selected value="1">1</option>
|
||||
{% for season in range(2, results.media.episodes|length) %}
|
||||
<option value="{{ season }}">{{ season }}</option>
|
||||
|
||||
27
templates/components/TvEpisodeList.html.twig
Normal file
27
templates/components/TvEpisodeList.html.twig
Normal file
@@ -0,0 +1,27 @@
|
||||
<div{{ attributes.defaults(stimulus_controller('tv_episode_list')) }}
|
||||
class="episode-list flex flex-col gap-4"
|
||||
>
|
||||
<div data-live-id="{{ uniqid() }}" class="episode-container flex flex-col gap-4">
|
||||
{% for episode in this.episodes.items %}
|
||||
<div id="episode_{{ episode['season_number'] }}_{{ episode['episode_number'] }}" class="results"
|
||||
data-tv-results-loading-icon-outlet=".loading-icon"
|
||||
data-download-button-outlet=".download-btn"
|
||||
{{ stimulus_controller('tv_results', {
|
||||
title: this.title,
|
||||
tmdbId: this.tmdbId,
|
||||
imdbId: this.imdbId,
|
||||
season: episode['season_number'],
|
||||
episode: episode['episode_number'],
|
||||
active: 'true',
|
||||
}) }}></div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% set paginator = this.episodes %}
|
||||
{% include 'partial/tv-episode-list-paginator.html.twig' %}
|
||||
</div>
|
||||
|
||||
{% macro placeholder(props) %}
|
||||
<span>
|
||||
<twig:ux:icon name="codex:loader" height="40" width="40" data-loading-icon-target="icon" class="text-end" />
|
||||
</span>
|
||||
{% endmacro %}
|
||||
Reference in New Issue
Block a user