Compare commits

...

1 Commits

Author SHA1 Message Date
24355a4b30 fix: supports linking directly to tv season 2025-07-20 10:26:12 -05:00
2 changed files with 7 additions and 10 deletions

View File

@@ -10,7 +10,7 @@ use Symfony\UX\LiveComponent\Attribute\LiveProp;
use Symfony\UX\LiveComponent\DefaultActionTrait; use Symfony\UX\LiveComponent\DefaultActionTrait;
#[AsLiveComponent] #[AsLiveComponent]
final class TvEpisodeList final class TvEpisodeList
{ {
use DefaultActionTrait; use DefaultActionTrait;
use PaginateTrait; use PaginateTrait;

View File

@@ -73,18 +73,15 @@
{{ stimulus_action('result_filter', 'setSeason', 'change') }} {{ stimulus_action('result_filter', 'setSeason', 'change') }}
{{ stimulus_action('result_filter', 'uncheckSelectAllBtn', 'change') }} {{ stimulus_action('result_filter', 'uncheckSelectAllBtn', 'change') }}
> >
<option selected value="1">1</option> {% for season in range(1, results.media.episodes|length) %}
{% for season in range(2, results.media.episodes|length) %} <option value="{{ season }}"
<option value="{{ season }}">{{ season }}</option> {% if results.season == season %}
selected="selected"
{% endif %}
>{{ season }}</option>
{% endfor %} {% endfor %}
</select> </select>
</label> </label>
{# <label for="episodeNumber">#}
{# Episode#}
{# <select id="episodeNumber" name="episodeNumber" data-result-filter-target="episode" class="px-1 py-0.5 bg-stone-100 text-gray-800 rounded-sm">#}
{# <option selected value="">n/a</option>#}
{# </select>#}
{# </label>#}
{% endif %} {% endif %}
<span {{ stimulus_controller('loading_icon', {total: (results.media.mediaType == "tvshows") ? results.media.episodes[1]|length : 1, count: 0}) }} <span {{ stimulus_controller('loading_icon', {total: (results.media.mediaType == "tvshows") ? results.media.episodes[1]|length : 1, count: 0}) }}
class="loading-icon"> class="loading-icon">