fix: uses correct title for directory name

This commit is contained in:
2025-04-23 20:48:01 -05:00
parent d8e8c7f0f0
commit 35718958ee
8 changed files with 14 additions and 5 deletions

View File

@@ -23,7 +23,7 @@ export default class extends Controller {
},
body: JSON.stringify({
url: this.urlValue,
title: this.titleValue,
title: this.element.dataset['title'],
filename: this.filenameValue,
mediaType: this.mediaTypeValue,
imdbId: this.imdbIdValue

View File

@@ -7,6 +7,7 @@ import { Controller } from '@hotwired/stimulus';
/* stimulusFetch: 'lazy' */
export default class extends Controller {
static values = {
title: String,
tmdbId: String,
imdbId: String
};
@@ -26,6 +27,7 @@ export default class extends Controller {
.then(response => {
this.element.innerHTML = response;
this.options = this.element.querySelectorAll('tbody tr');
this.options.forEach((option) => option.querySelector('.download-btn').dataset['title'] = this.titleValue);
});
}
}

View File

@@ -7,6 +7,7 @@ import { Controller } from '@hotwired/stimulus';
/* stimulusFetch: 'lazy' */
export default class extends Controller {
static values = {
title: String,
tmdbId: String,
imdbId: String,
season: String,
@@ -31,6 +32,7 @@ export default class extends Controller {
.then(response => {
this.element.innerHTML = response;
this.options = this.element.querySelectorAll('tbody tr');
this.options.forEach((option) => option.querySelector('.download-btn').dataset['title'] = this.titleValue);
this.optionsLoaded = true;
this.loadingIconOutlet.increaseCount();
});