feat: add anime metadata editing and NFO diagnostics
- Add PUT /anime/{key} endpoint for updating anime key, tmdb_id, tvdb_id
- Add NFO diagnostics and repair endpoints (GET/POST /nfo/diagnostics)
- Add edit modal UI with context menu integration
- Add frontend JS modules for context-menu and edit-modal
- Add comprehensive tests for edit, rename, and NFO repair flows
This commit is contained in:
@@ -640,6 +640,80 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Edit Metadata Modal -->
|
||||
<div id="edit-metadata-modal" class="modal hidden">
|
||||
<div class="modal-overlay"></div>
|
||||
<div class="modal-content edit-modal-content">
|
||||
<div class="modal-header">
|
||||
<h3>Edit Metadata</h3>
|
||||
<button id="btn-cancel-metadata" class="btn btn-icon">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="edit-metadata-form" onsubmit="return false;">
|
||||
<!-- Identity Section -->
|
||||
<div class="edit-section">
|
||||
<h4><i class="fa-solid fa-key"></i> Identity</h4>
|
||||
<div class="form-group">
|
||||
<label for="edit-key">Series Key</label>
|
||||
<input type="text" id="edit-key" class="input-field"
|
||||
placeholder="e.g. attack-on-titan"
|
||||
pattern="[a-z0-9][a-z0-9-]*[a-z0-9]">
|
||||
<span class="field-error" style="display:none;"></span>
|
||||
</div>
|
||||
<div id="key-change-warning" class="key-warning" style="display:none;">
|
||||
<i class="fa-solid fa-triangle-exclamation"></i>
|
||||
Changing the key will update the primary identifier. This may affect provider linkage.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- External IDs Section -->
|
||||
<div class="edit-section">
|
||||
<h4><i class="fa-solid fa-database"></i> External IDs</h4>
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="edit-tmdb-id">TMDB ID</label>
|
||||
<input type="number" id="edit-tmdb-id" class="input-field"
|
||||
placeholder="e.g. 1429" min="1">
|
||||
<span class="field-error" style="display:none;"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="edit-tvdb-id">TVDB ID</label>
|
||||
<input type="number" id="edit-tvdb-id" class="input-field"
|
||||
placeholder="e.g. 267440" min="1">
|
||||
<span class="field-error" style="display:none;"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- NFO Status Section -->
|
||||
<div class="edit-section">
|
||||
<h4><i class="fa-solid fa-file-lines"></i> NFO Status</h4>
|
||||
<div class="nfo-diagnostics">
|
||||
<div id="nfo-status-badge" class="nfo-status-badge">Loading...</div>
|
||||
<div id="nfo-diagnostics-container">
|
||||
<div id="nfo-missing-tags" class="missing-tags-list"></div>
|
||||
</div>
|
||||
<p id="repair-hint" class="repair-hint" style="display:none;">
|
||||
<i class="fa-solid fa-circle-info"></i>
|
||||
No TMDB ID set. Repair will search TMDB by series name.
|
||||
</p>
|
||||
<button type="button" id="btn-repair-nfo" class="btn btn-secondary btn-repair">
|
||||
<i class="fa-solid fa-wrench"></i> Repair NFO
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" id="btn-save-metadata" class="btn btn-primary">
|
||||
<i class="fa-solid fa-floppy-disk"></i> Save
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Toast notifications -->
|
||||
<div id="toast-container" class="toast-container"></div>
|
||||
</div>
|
||||
@@ -665,6 +739,8 @@
|
||||
<script src="/static/js/user_preferences.js?v={{ static_v }}"></script>
|
||||
|
||||
<!-- Index Page Modules -->
|
||||
<script src="/static/js/index/context-menu.js?v={{ static_v }}"></script>
|
||||
<script src="/static/js/index/edit-modal.js?v={{ static_v }}"></script>
|
||||
<script src="/static/js/index/series-manager.js?v={{ static_v }}"></script>
|
||||
<script src="/static/js/index/selection-manager.js?v={{ static_v }}"></script>
|
||||
<script src="/static/js/index/search.js?v={{ static_v }}"></script>
|
||||
|
||||
Reference in New Issue
Block a user