fix-feat: ajax download call

This commit is contained in:
2025-04-23 16:17:03 -05:00
parent 5402680abf
commit 6dc6fbd449
15 changed files with 153 additions and 19 deletions

View File

@@ -7,6 +7,7 @@ import { Controller } from '@hotwired/stimulus';
/* stimulusFetch: 'lazy' */
export default class extends Controller {
static values = {
tmdbId: String,
imdbId: String
};
@@ -20,7 +21,7 @@ export default class extends Controller {
async setOptions() {
if (this.options.length === 0) {
await fetch(`/torrentio/movies/${this.imdbIdValue}`)
await fetch(`/torrentio/movies/${this.tmdbIdValue}/${this.imdbIdValue}`)
.then(res => res.text())
.then(response => {
this.element.innerHTML = response;