feat: tv episode results

This commit is contained in:
2025-04-21 22:39:22 -05:00
parent 7f29d737c1
commit d60fae24d1
9 changed files with 253 additions and 7 deletions

View File

@@ -0,0 +1,26 @@
import { Controller } from '@hotwired/stimulus';
/*
* The following line makes this controller "lazy": it won't be downloaded until needed
* See https://github.com/symfony/stimulus-bridge#lazy-controllers
*/
/* stimulusFetch: 'lazy' */
export default class extends Controller {
static values = {
tmdbId: String,
imdbId: String,
season: String,
episode: String,
active: Boolean,
};
connect() {
if (true === this.activeValue) {
fetch(`/torrentio/tvshows/${this.tmdbIdValue}/${this.imdbIdValue}/${this.seasonValue}/${this.episodeValue}`)
.then(res => res.text())
.then(response => {
this.element.innerHTML = response;
});
}
}
}