fix: uses correct title for directory name
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user