wip: filter twig component pre-select options

This commit is contained in:
2025-04-29 23:40:27 -05:00
parent 8a1a89f17d
commit 3971cf3260
4 changed files with 49 additions and 36 deletions

View File

@@ -26,7 +26,8 @@ export default class extends Controller {
}
async setOptions() {
if (true === this.activeValue) {
if (true === this.activeValue && this.optionsLoaded === false) {
this.optionsLoaded = true;
await fetch(`/torrentio/tvshows/${this.tmdbIdValue}/${this.imdbIdValue}/${this.seasonValue}/${this.episodeValue}`)
.then(res => res.text())
.then(response => {
@@ -38,7 +39,6 @@ export default class extends Controller {
} else {
this.episodeSelectorTarget.disabled = true;
}
this.optionsLoaded = true;
this.loadingIconOutlet.increaseCount();
});
}