feat: language filter

This commit is contained in:
2025-04-22 19:40:00 -05:00
parent f04c33f80e
commit 7359813bbe
4 changed files with 26 additions and 12 deletions

View File

@@ -14,13 +14,19 @@ export default class extends Controller {
options = []
connect() {
fetch(`/torrentio/movies/${this.imdbIdValue}`)
.then(res => res.text())
.then(response => {
this.element.innerHTML = response;
this.options = this.element.querySelectorAll('tbody tr');
});
async connect() {
await this.setOptions();
}
async setOptions() {
if (this.options.length === 0) {
await fetch(`/torrentio/movies/${this.imdbIdValue}`)
.then(res => res.text())
.then(response => {
this.element.innerHTML = response;
this.options = this.element.querySelectorAll('tbody tr');
});
}
}
listTargetConnected(target) {