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

@@ -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);
});
}
}