From 7353806915b34582a8534348233119ffabae084e Mon Sep 17 00:00:00 2001 From: Brock H Caldwell Date: Wed, 9 Jul 2025 13:06:14 -0500 Subject: [PATCH] fix: wrong season listed in download season modal --- assets/controllers/result_filter_controller.js | 2 ++ templates/components/Filter.html.twig | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/controllers/result_filter_controller.js b/assets/controllers/result_filter_controller.js index bd552a3..ac00da4 100644 --- a/assets/controllers/result_filter_controller.js +++ b/assets/controllers/result_filter_controller.js @@ -127,6 +127,7 @@ export default class extends Controller { } async filter() { + const downloadSeasonSpan = document.querySelector("#downloadSeasonModal"); const currentSeason = this.activeFilter['season']; let results = []; @@ -145,6 +146,7 @@ export default class extends Controller { } else if ("tvshows" === this.mediaTypeValue) { results = this.tvResultsOutlets; this.activeFilter.season = this.seasonTarget.value; + downloadSeasonSpan.innerText = this.activeFilter.season; await results.forEach((list) => list.filter(this.activeFilter, currentSeason, this.seasonTarget.value)); } } diff --git a/templates/components/Filter.html.twig b/templates/components/Filter.html.twig index f203434..345aae1 100644 --- a/templates/components/Filter.html.twig +++ b/templates/components/Filter.html.twig @@ -99,7 +99,7 @@ preferences to choose the appropriate file(s).

- Do you wish to download season {{ results.season }} of "{{ results.media.title }}"? + Do you wish to download season {{ results.season }} of "{{ results.media.title }}"?