changes to series order system. add artist retagging tool
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
</div>
|
||||
|
||||
<div id="modalTagEditor" class="tag-editor" data-image-id="">
|
||||
<!-- Shown when image IS in a series -->
|
||||
<div id="modalSeriesInfo" class="modal-series-info" style="display: none;">
|
||||
<div class="series-info-row">
|
||||
<span class="series-info-label">📚 Page</span>
|
||||
@@ -22,6 +23,20 @@
|
||||
<span id="pageUpdateStatus" class="page-update-status"></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Shown when image is NOT in a series -->
|
||||
<div id="modalAddToSeries" class="modal-add-to-series" style="display: none;">
|
||||
<div class="add-series-header">
|
||||
<span class="series-info-label">📚 Add to Series</span>
|
||||
</div>
|
||||
<div class="add-series-controls">
|
||||
<select id="seriesSelect" class="series-select">
|
||||
<option value="">Select series...</option>
|
||||
</select>
|
||||
<input type="number" id="addSeriesPageNumber" min="1" value="1" class="series-page-input" placeholder="#">
|
||||
<button id="addToSeriesBtn" class="btn-small" disabled>Add</button>
|
||||
</div>
|
||||
<span id="addToSeriesStatus" class="page-update-status"></span>
|
||||
</div>
|
||||
<div id="modalTagList" class="tags"></div>
|
||||
<form id="modalTagForm" class="tag-form" autocomplete="off">
|
||||
<div class="tag-form-wrapper">
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
<button id="retryFailedBtn" class="btn warning-btn">Retry Failed Tasks</button>
|
||||
<button id="clearCompletedBtn" class="btn secondary-btn">Clear Completed</button>
|
||||
<button id="regenMissingThumbsBtn" class="btn secondary-btn">Regenerate Missing Thumbnails</button>
|
||||
<button id="reapplyArtistTagsBtn" class="btn secondary-btn">Reapply Artist Tags from Paths</button>
|
||||
</div>
|
||||
|
||||
<div id="celeryWorkerInfo" style="margin-top: 1rem;">
|
||||
@@ -733,6 +734,34 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
});
|
||||
|
||||
// Reapply Artist Tags from Paths
|
||||
document.getElementById('reapplyArtistTagsBtn').addEventListener('click', async () => {
|
||||
const btn = document.getElementById('reapplyArtistTagsBtn');
|
||||
|
||||
if (!confirm('This will re-apply artist tags to all images based on their file paths. Continue?')) {
|
||||
return;
|
||||
}
|
||||
|
||||
btn.disabled = true;
|
||||
btn.textContent = 'Processing...';
|
||||
|
||||
try {
|
||||
const r = await fetch('/api/reapply-artist-tags', { method: 'POST' });
|
||||
const data = await r.json();
|
||||
|
||||
if (data.ok) {
|
||||
alert(`Artist tags reapplied!\n\nUpdated: ${data.updated}\nSkipped: ${data.skipped}\nTotal images: ${data.total}`);
|
||||
} else {
|
||||
alert('Failed: ' + (data.error || 'Unknown error'));
|
||||
}
|
||||
} catch (e) {
|
||||
alert('Failed: ' + e.message);
|
||||
} finally {
|
||||
btn.disabled = false;
|
||||
btn.textContent = 'Reapply Artist Tags from Paths';
|
||||
}
|
||||
});
|
||||
|
||||
// Load import settings
|
||||
fetch('/api/import-settings')
|
||||
.then(r => r.json())
|
||||
|
||||
Reference in New Issue
Block a user