[musicbrainz] Reset cover picker button after use

This commit is contained in:
SuperSaltyGamer
2023-12-03 18:20:50 +02:00
parent 1680723c40
commit 8819c647e1

View File

@@ -29,7 +29,7 @@ onReleaseAddCoverRoute(() => {
const buttonEl = fromHTML<HTMLSelectElement>(`
<select>
<option disabled selected>Search MH Covers...</option>
<option value="" disabled selected>Search MH Covers...</option>
<option value="search">by Artist and Album</option>
${release.barcode ? `<option value="barcode">by Barcode</option>` : ""}
${release.catalogs.length ? `<option value="catalog">by Catalog</option>` : ""}
@@ -38,7 +38,9 @@ onReleaseAddCoverRoute(() => {
`);
buttonEl.addEventListener("input", async () => {
await openPicker(release, buttonEl.value as QueryType);
const value = buttonEl.value as QueryType;
buttonEl.value = "";
await openPicker(release, value);
});
refEl.appendChild(buttonEl);