refactor: overhaul NFO settings UI and backend
- Rework nfo-settings page with improved styling and layout - Update edit-modal and context-menu with enhanced functionality - Refactor NFO API endpoints and models - Remove deprecated test_nfo_diagnostics_repair.py - Clean up tasks.md documentation
This commit is contained in:
@@ -360,7 +360,21 @@
|
||||
.form-row {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--spacing-md);
|
||||
gap: var(--spacing-lg);
|
||||
}
|
||||
|
||||
/* Edit modal specific input sizing */
|
||||
.edit-modal-content .input-field {
|
||||
width: 100%;
|
||||
min-width: 140px;
|
||||
}
|
||||
|
||||
.edit-modal-content .form-group {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.edit-modal-content .form-row .form-group {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.field-error {
|
||||
@@ -394,6 +408,22 @@
|
||||
gap: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.nfo-status-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-md);
|
||||
}
|
||||
|
||||
.nfo-path-display {
|
||||
font-size: var(--font-size-caption);
|
||||
color: var(--color-text-tertiary);
|
||||
font-family: 'Consolas', 'Monaco', monospace;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
max-width: 200px;
|
||||
}
|
||||
|
||||
.nfo-status-badge {
|
||||
display: inline-block;
|
||||
padding: 4px 12px;
|
||||
@@ -456,9 +486,14 @@
|
||||
gap: var(--spacing-xs);
|
||||
}
|
||||
|
||||
.nfo-actions-row {
|
||||
display: flex;
|
||||
gap: var(--spacing-sm);
|
||||
margin-top: var(--spacing-xs);
|
||||
}
|
||||
|
||||
.btn-repair {
|
||||
align-self: flex-start;
|
||||
margin-top: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
|
||||
@@ -1,427 +1,637 @@
|
||||
/* NFO Settings Page Styles */
|
||||
/**
|
||||
* AniWorld - NFO Settings Page Styles
|
||||
*
|
||||
* Standalone page for NFO diagnostics, repair, and settings.
|
||||
*/
|
||||
|
||||
#app {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.nfo-main-content {
|
||||
padding: var(--spacing-lg);
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
.page-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 1rem 2rem;
|
||||
background: var(--color-surface);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
/* ========== Stats Section ========== */
|
||||
.nfo-stats-section {
|
||||
margin-bottom: var(--spacing-xl);
|
||||
}
|
||||
|
||||
.header-left .back-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
color: var(--color-text-secondary);
|
||||
text-decoration: none;
|
||||
font-size: 0.875rem;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
|
||||
.header-left .back-link:hover {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
.header-center h1 {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.header-right {
|
||||
display: flex;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
/* Stats Bar */
|
||||
.stats-bar {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
padding: 1rem 2rem;
|
||||
background: var(--color-surface);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.stat-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 0.75rem 1.5rem;
|
||||
background: var(--color-background);
|
||||
border-radius: 8px;
|
||||
min-width: 120px;
|
||||
}
|
||||
|
||||
.stat-value {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: 0.75rem;
|
||||
color: var(--color-text-secondary);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.stat-missing .stat-value {
|
||||
color: var(--color-error);
|
||||
}
|
||||
|
||||
.stat-incomplete .stat-value {
|
||||
color: var(--color-warning);
|
||||
}
|
||||
|
||||
.stat-complete .stat-value {
|
||||
color: var(--color-success);
|
||||
}
|
||||
|
||||
/* Toolbar */
|
||||
.toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 1rem 2rem;
|
||||
background: var(--color-surface);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.search-box {
|
||||
position: relative;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.search-box i {
|
||||
position: absolute;
|
||||
left: 12px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
.search-box .input-field {
|
||||
width: 100%;
|
||||
padding-left: 2.5rem;
|
||||
}
|
||||
|
||||
.filter-buttons {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.filter-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding: 0.5rem 1rem;
|
||||
background: var(--color-background);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 6px;
|
||||
color: var(--color-text-secondary);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.filter-btn:hover {
|
||||
background: var(--color-surface-hover);
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.filter-btn.active {
|
||||
background: var(--color-primary);
|
||||
border-color: var(--color-primary);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.filter-btn .count {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
padding: 0.125rem 0.5rem;
|
||||
border-radius: 10px;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.filter-btn:not(.active) .count {
|
||||
background: var(--color-border);
|
||||
}
|
||||
|
||||
/* Series List */
|
||||
.series-list-container {
|
||||
flex: 1;
|
||||
padding: 1rem 2rem;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.series-list {
|
||||
.nfo-stats-section .stats-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
|
||||
gap: 1rem;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.loading-state,
|
||||
.empty-state {
|
||||
grid-column: 1 / -1;
|
||||
.nfo-stats-section .stat-card {
|
||||
background: var(--color-surface);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--border-radius-lg);
|
||||
padding: var(--spacing-lg);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.nfo-stats-section .stat-icon {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 4rem;
|
||||
color: var(--color-text-secondary);
|
||||
background: var(--color-bg-tertiary);
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.loading-state i {
|
||||
font-size: 2rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.empty-state i {
|
||||
font-size: 3rem;
|
||||
.nfo-stats-section .stat-success .stat-icon {
|
||||
background: rgba(16, 124, 16, 0.1);
|
||||
color: var(--color-success);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
/* Series Card */
|
||||
.series-card {
|
||||
background: var(--color-surface);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 8px;
|
||||
padding: 1rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.series-card:hover {
|
||||
border-color: var(--color-primary);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.series-card.missing {
|
||||
border-left: 4px solid var(--color-error);
|
||||
}
|
||||
|
||||
.series-card.incomplete {
|
||||
border-left: 4px solid var(--color-warning);
|
||||
}
|
||||
|
||||
.series-card.complete {
|
||||
border-left: 4px solid var(--color-success);
|
||||
}
|
||||
|
||||
.series-card-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.series-name {
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
color: var(--color-text);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.series-folder {
|
||||
font-size: 0.75rem;
|
||||
color: var(--color-text-secondary);
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
|
||||
.nfo-status-badge {
|
||||
display: inline-block;
|
||||
padding: 0.25rem 0.75rem;
|
||||
border-radius: 4px;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.nfo-status-badge.missing,
|
||||
.nfo-status-badge.no-nfo {
|
||||
background: var(--color-error-bg);
|
||||
color: var(--color-error);
|
||||
}
|
||||
|
||||
.nfo-status-badge.incomplete {
|
||||
background: var(--color-warning-bg);
|
||||
.nfo-stats-section .stat-warning .stat-icon {
|
||||
background: rgba(255, 140, 0, 0.1);
|
||||
color: var(--color-warning);
|
||||
}
|
||||
|
||||
.nfo-status-badge.complete {
|
||||
background: var(--color-success-bg);
|
||||
color: var(--color-success);
|
||||
.nfo-stats-section .stat-error .stat-icon {
|
||||
background: rgba(209, 52, 56, 0.1);
|
||||
color: var(--color-error);
|
||||
}
|
||||
|
||||
.missing-tags-list {
|
||||
.nfo-stats-section .stat-info {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
margin-top: 0.5rem;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.missing-tag-chip {
|
||||
display: inline-block;
|
||||
padding: 0.25rem 0.5rem;
|
||||
background: var(--color-background);
|
||||
border-radius: 4px;
|
||||
font-size: 0.75rem;
|
||||
.nfo-stats-section .stat-value {
|
||||
font-size: 28px;
|
||||
font-weight: 600;
|
||||
color: var(--color-text-primary);
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.nfo-stats-section .stat-label {
|
||||
font-size: var(--font-size-body);
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
/* Detail Panel */
|
||||
.detail-panel {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 500px;
|
||||
z-index: 1000;
|
||||
/* ========== Tab Navigation ========== */
|
||||
.nfo-tabs {
|
||||
display: flex;
|
||||
gap: var(--spacing-xs);
|
||||
background: var(--color-bg-secondary);
|
||||
padding: var(--spacing-xs);
|
||||
border-radius: var(--border-radius-lg);
|
||||
margin-bottom: var(--spacing-lg);
|
||||
border: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.detail-panel.hidden {
|
||||
display: none;
|
||||
.nfo-tab {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: var(--spacing-sm);
|
||||
padding: var(--spacing-md) var(--spacing-lg);
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--color-text-secondary);
|
||||
font-size: var(--font-size-body);
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
border-radius: var(--border-radius-md);
|
||||
transition: all var(--transition-duration) ease;
|
||||
}
|
||||
|
||||
.panel-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
.nfo-tab:hover {
|
||||
background: var(--color-surface-hover);
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.panel-content {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
.nfo-tab.active {
|
||||
background: var(--color-surface);
|
||||
box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: var(--color-primary);
|
||||
box-shadow: var(--shadow-card);
|
||||
}
|
||||
|
||||
.nfo-tab i {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* ========== Tab Content ========== */
|
||||
.nfo-tab-content {
|
||||
background: var(--color-surface);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--border-radius-lg);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tab-panel {
|
||||
display: none;
|
||||
padding: var(--spacing-xl);
|
||||
animation: fadeIn 0.2s ease;
|
||||
}
|
||||
|
||||
.tab-panel.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; transform: translateY(4px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
.panel-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 1rem 1.5rem;
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
margin-bottom: var(--spacing-xl);
|
||||
flex-wrap: wrap;
|
||||
gap: var(--spacing-md);
|
||||
}
|
||||
|
||||
.panel-header h3 {
|
||||
font-size: 1.125rem;
|
||||
font-weight: 600;
|
||||
color: var(--color-text);
|
||||
.panel-header h2 {
|
||||
margin: 0;
|
||||
font-size: var(--font-size-title);
|
||||
color: var(--color-text-primary);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.panel-header h2 i {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
.panel-actions {
|
||||
display: flex;
|
||||
gap: var(--spacing-sm);
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.panel-actions .search-input {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.panel-actions .filter-select {
|
||||
min-width: 140px;
|
||||
}
|
||||
|
||||
/* ========== Overview Tab ========== */
|
||||
.overview-content {
|
||||
max-width: 900px;
|
||||
}
|
||||
|
||||
.health-summary {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--spacing-xl);
|
||||
}
|
||||
|
||||
.health-chart {
|
||||
background: var(--color-bg-secondary);
|
||||
border-radius: var(--border-radius-lg);
|
||||
padding: var(--spacing-xl);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 250px;
|
||||
}
|
||||
|
||||
.health-details h3 {
|
||||
font-size: var(--font-size-subtitle);
|
||||
margin: 0 0 var(--spacing-sm) 0;
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.health-details h3:not(:first-child) {
|
||||
margin-top: var(--spacing-xl);
|
||||
}
|
||||
|
||||
.info-text {
|
||||
color: var(--color-text-secondary);
|
||||
margin: 0 0 var(--spacing-sm) 0;
|
||||
font-size: var(--font-size-body);
|
||||
}
|
||||
|
||||
.tag-list {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.panel-body {
|
||||
flex: 1;
|
||||
padding: 1.5rem;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.detail-section {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.detail-section h4 {
|
||||
font-size: 0.875rem;
|
||||
font-weight: 600;
|
||||
.tag-list li {
|
||||
padding: var(--spacing-xs) 0;
|
||||
color: var(--color-text-secondary);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
margin-bottom: 0.75rem;
|
||||
font-size: var(--font-size-body);
|
||||
}
|
||||
|
||||
.status-display {
|
||||
display: flex;
|
||||
.tag-list li code {
|
||||
background: var(--color-bg-tertiary);
|
||||
padding: 2px 6px;
|
||||
border-radius: var(--border-radius-sm);
|
||||
font-family: 'Consolas', 'Monaco', monospace;
|
||||
font-size: 13px;
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.optional-tags {
|
||||
columns: 2;
|
||||
}
|
||||
|
||||
/* ========== Diagnostics Tab ========== */
|
||||
.series-list-container {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.series-diagnostics-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: var(--font-size-body);
|
||||
}
|
||||
|
||||
.series-diagnostics-table th,
|
||||
.series-diagnostics-table td {
|
||||
padding: var(--spacing-md);
|
||||
text-align: left;
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.series-diagnostics-table th {
|
||||
background: var(--color-bg-secondary);
|
||||
font-weight: 600;
|
||||
color: var(--color-text-primary);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.series-diagnostics-table th.sortable {
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.series-diagnostics-table th.sortable:hover {
|
||||
background: var(--color-bg-tertiary);
|
||||
}
|
||||
|
||||
.series-diagnostics-table th i {
|
||||
margin-left: var(--spacing-xs);
|
||||
color: var(--color-text-tertiary);
|
||||
}
|
||||
|
||||
.series-diagnostics-table tbody tr:hover {
|
||||
background: var(--color-surface-hover);
|
||||
}
|
||||
|
||||
.series-diagnostics-table .status-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
gap: var(--spacing-xs);
|
||||
padding: 4px 10px;
|
||||
border-radius: 12px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.series-diagnostics-table .status-complete {
|
||||
background: rgba(16, 124, 16, 0.1);
|
||||
color: var(--color-success);
|
||||
}
|
||||
|
||||
.series-diagnostics-table .status-incomplete {
|
||||
background: rgba(255, 140, 0, 0.1);
|
||||
color: var(--color-warning);
|
||||
}
|
||||
|
||||
.series-diagnostics-table .status-missing {
|
||||
background: rgba(209, 52, 56, 0.1);
|
||||
color: var(--color-error);
|
||||
}
|
||||
|
||||
.missing-tags-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--spacing-xs);
|
||||
}
|
||||
|
||||
.missing-tag-chip {
|
||||
display: inline-block;
|
||||
background: var(--color-bg-tertiary);
|
||||
color: var(--color-text-secondary);
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
font-size: 11px;
|
||||
font-family: 'Consolas', 'Monaco', monospace;
|
||||
}
|
||||
|
||||
.nfo-path {
|
||||
font-size: 0.75rem;
|
||||
color: var(--color-text-secondary);
|
||||
word-break: break-all;
|
||||
font-family: 'Consolas', 'Monaco', monospace;
|
||||
font-size: 12px;
|
||||
color: var(--color-text-tertiary);
|
||||
max-width: 200px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.action-buttons {
|
||||
.loading-row td {
|
||||
text-align: center;
|
||||
padding: var(--spacing-xxl);
|
||||
}
|
||||
|
||||
.loading-spinner {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.action-buttons .btn {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.nfo-preview {
|
||||
background: var(--color-background);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 6px;
|
||||
padding: 1rem;
|
||||
max-height: 300px;
|
||||
overflow: auto;
|
||||
font-size: 0.75rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.nfo-preview code {
|
||||
gap: var(--spacing-sm);
|
||||
color: var(--color-text-secondary);
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
@media (max-width: 768px) {
|
||||
.page-header {
|
||||
flex-wrap: wrap;
|
||||
gap: 1rem;
|
||||
.loading-spinner i {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
/* ========== Repair Tab ========== */
|
||||
.repair-content {
|
||||
max-width: 900px;
|
||||
}
|
||||
|
||||
.repair-info {
|
||||
margin-bottom: var(--spacing-xl);
|
||||
}
|
||||
|
||||
.info-card {
|
||||
display: flex;
|
||||
gap: var(--spacing-md);
|
||||
padding: var(--spacing-lg);
|
||||
background: var(--color-bg-secondary);
|
||||
border-radius: var(--border-radius-lg);
|
||||
border-left: 4px solid var(--color-primary);
|
||||
}
|
||||
|
||||
.info-card i {
|
||||
font-size: 20px;
|
||||
color: var(--color-primary);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.info-card h4 {
|
||||
margin: 0 0 var(--spacing-xs) 0;
|
||||
font-size: var(--font-size-subtitle);
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.info-card p {
|
||||
margin: 0;
|
||||
font-size: var(--font-size-body);
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
.repair-actions {
|
||||
display: flex;
|
||||
gap: var(--spacing-sm);
|
||||
margin-bottom: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.repair-list-container {
|
||||
margin-bottom: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.repair-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: var(--font-size-body);
|
||||
}
|
||||
|
||||
.repair-table th,
|
||||
.repair-table td {
|
||||
padding: var(--spacing-md);
|
||||
text-align: left;
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.repair-table th {
|
||||
background: var(--color-bg-secondary);
|
||||
font-weight: 600;
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.checkbox-col {
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
.repair-table tbody tr:hover {
|
||||
background: var(--color-surface-hover);
|
||||
}
|
||||
|
||||
.repair-footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-top: var(--spacing-lg);
|
||||
border-top: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.selection-count {
|
||||
color: var(--color-text-secondary);
|
||||
font-size: var(--font-size-body);
|
||||
}
|
||||
|
||||
.selection-count span {
|
||||
font-weight: 600;
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
/* ========== Settings Tab ========== */
|
||||
.settings-content {
|
||||
max-width: 700px;
|
||||
}
|
||||
|
||||
.settings-section {
|
||||
margin-bottom: var(--spacing-xxl);
|
||||
padding-bottom: var(--spacing-xxl);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.settings-section:last-child {
|
||||
border-bottom: none;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.settings-section h3 {
|
||||
margin: 0 0 var(--spacing-lg) 0;
|
||||
font-size: var(--font-size-subtitle);
|
||||
color: var(--color-text-primary);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.settings-section h3 i {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
.setting-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
gap: var(--spacing-xl);
|
||||
padding: var(--spacing-md) 0;
|
||||
}
|
||||
|
||||
.setting-info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.setting-info label {
|
||||
font-weight: 500;
|
||||
color: var(--color-text-primary);
|
||||
display: block;
|
||||
margin-bottom: var(--spacing-xs);
|
||||
}
|
||||
|
||||
.setting-description {
|
||||
margin: 0;
|
||||
font-size: var(--font-size-body);
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
.setting-description a {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
.setting-control {
|
||||
display: flex;
|
||||
gap: var(--spacing-sm);
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.setting-control .input-field {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
/* Toggle Switch */
|
||||
.toggle-switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 48px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.toggle-switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.toggle-slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: var(--color-bg-tertiary);
|
||||
transition: 0.2s;
|
||||
border-radius: 13px;
|
||||
}
|
||||
|
||||
.toggle-slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
left: 3px;
|
||||
bottom: 3px;
|
||||
background-color: white;
|
||||
transition: 0.2s;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
.toggle-switch input:checked + .toggle-slider {
|
||||
background-color: var(--color-primary);
|
||||
}
|
||||
|
||||
.toggle-switch input:checked + .toggle-slider:before {
|
||||
transform: translateX(22px);
|
||||
}
|
||||
|
||||
/* Connection Status */
|
||||
.connection-status {
|
||||
margin-top: var(--spacing-md);
|
||||
padding: var(--spacing-md);
|
||||
border-radius: var(--border-radius-md);
|
||||
font-size: var(--font-size-body);
|
||||
}
|
||||
|
||||
.connection-status.success {
|
||||
background: rgba(16, 124, 16, 0.1);
|
||||
color: var(--color-success);
|
||||
border: 1px solid var(--color-success);
|
||||
}
|
||||
|
||||
.connection-status.error {
|
||||
background: rgba(209, 52, 56, 0.1);
|
||||
color: var(--color-error);
|
||||
border: 1px solid var(--color-error);
|
||||
}
|
||||
|
||||
/* ========== Responsive ========== */
|
||||
@media (max-width: 1024px) {
|
||||
.nfo-stats-section .stats-grid {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
|
||||
.stats-bar {
|
||||
flex-wrap: wrap;
|
||||
padding: 0.75rem 1rem;
|
||||
}
|
||||
|
||||
.stat-item {
|
||||
min-width: 100px;
|
||||
padding: 0.5rem 1rem;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
padding: 0.75rem 1rem;
|
||||
}
|
||||
|
||||
.search-box {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.filter-buttons {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.series-list-container {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.series-list {
|
||||
|
||||
.health-summary {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.detail-panel {
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.nfo-tabs {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.nfo-tab {
|
||||
flex: 1 1 45%;
|
||||
}
|
||||
|
||||
.nfo-tab span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.panel-header {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.panel-actions {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.panel-actions .search-input,
|
||||
.panel-actions .filter-select {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.setting-item {
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-md);
|
||||
}
|
||||
|
||||
.setting-control {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.setting-control .input-field {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.repair-footer {
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-md);
|
||||
}
|
||||
|
||||
.repair-footer .btn {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,6 +71,10 @@ AniWorld.ContextMenu = (function() {
|
||||
<i class="fa-solid fa-pen-to-square"></i>
|
||||
<span>Edit Metadata</span>
|
||||
</div>
|
||||
<div class="context-menu-item" data-action="nfo-diagnostics">
|
||||
<i class="fa-solid fa-file-circle-check"></i>
|
||||
<span>NFO Diagnostics</span>
|
||||
</div>
|
||||
`;
|
||||
|
||||
document.body.appendChild(menuElement);
|
||||
@@ -102,6 +106,13 @@ AniWorld.ContextMenu = (function() {
|
||||
AniWorld.EditModal.open(currentSeriesKey);
|
||||
}
|
||||
});
|
||||
|
||||
// NFO Diagnostics - opens the full NFO settings page
|
||||
menuElement.querySelector('[data-action="nfo-diagnostics"]').addEventListener('click', function() {
|
||||
hide();
|
||||
// Navigate to NFO settings page with this series selected
|
||||
window.location.href = '/settings/nfo?key=' + encodeURIComponent(currentSeriesKey);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -36,12 +36,13 @@ AniWorld.EditModal = (function() {
|
||||
hideKeyWarning();
|
||||
|
||||
try {
|
||||
// Try to find series data from the local series list first
|
||||
let seriesData = findSeriesData(seriesKey);
|
||||
// Always fetch fresh data from API for edit modal to ensure accuracy
|
||||
// This is more reliable than local cache which may be stale or missing
|
||||
let seriesData = await fetchSeriesDetails(seriesKey);
|
||||
|
||||
// If not found locally, fetch from API
|
||||
// Fallback: try local data if API fails
|
||||
if (!seriesData) {
|
||||
seriesData = await fetchSeriesDetails(seriesKey);
|
||||
seriesData = findSeriesData(seriesKey);
|
||||
}
|
||||
|
||||
originalData = {
|
||||
@@ -384,6 +385,7 @@ AniWorld.EditModal = (function() {
|
||||
function renderDiagnostics(data) {
|
||||
const badge = document.getElementById('nfo-status-badge');
|
||||
const tagsList = document.getElementById('nfo-missing-tags');
|
||||
const pathDisplay = document.getElementById('nfo-path-display');
|
||||
|
||||
if (badge) {
|
||||
if (!data.has_nfo) {
|
||||
@@ -398,6 +400,19 @@ AniWorld.EditModal = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
// Show NFO path if available
|
||||
if (pathDisplay) {
|
||||
if (data.nfo_path) {
|
||||
// Extract just the relative path from the full path
|
||||
const parts = data.nfo_path.split('/');
|
||||
const relativePath = parts.slice(-3).join('/'); // folder/tvshow.nfo
|
||||
pathDisplay.textContent = relativePath;
|
||||
pathDisplay.title = data.nfo_path;
|
||||
} else {
|
||||
pathDisplay.textContent = '';
|
||||
}
|
||||
}
|
||||
|
||||
if (tagsList) {
|
||||
if (data.missing_tags.length === 0) {
|
||||
tagsList.innerHTML = '<p class="nfo-all-good">All required tags present</p>';
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -742,7 +742,10 @@
|
||||
<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 class="nfo-status-row">
|
||||
<div id="nfo-status-badge" class="nfo-status-badge">Loading...</div>
|
||||
<span id="nfo-path-display" class="nfo-path-display"></span>
|
||||
</div>
|
||||
<div id="nfo-diagnostics-container">
|
||||
<div id="nfo-missing-tags" class="missing-tags-list"></div>
|
||||
</div>
|
||||
@@ -750,12 +753,14 @@
|
||||
<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>
|
||||
<a id="btn-open-nfo-diagnostics" class="btn btn-secondary btn-open-diagnostics" href="#" style="display:none; text-decoration: none; margin-top: 0.5rem;">
|
||||
<i class="fa-solid fa-external-link-alt"></i> Open Full Diagnostics
|
||||
</a>
|
||||
<div class="nfo-actions-row">
|
||||
<button type="button" id="btn-repair-nfo" class="btn btn-secondary btn-repair">
|
||||
<i class="fa-solid fa-wrench"></i> Repair NFO
|
||||
</button>
|
||||
<a id="btn-open-nfo-diagnostics" class="btn btn-secondary btn-open-diagnostics" href="#" style="display:none; text-decoration: none;">
|
||||
<i class="fa-solid fa-external-link-alt"></i> Full Diagnostics
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -1,183 +1,373 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" data-theme="dark">
|
||||
<html lang="en" data-theme="light">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title data-text="nfo-diagnostics-title">NFO Diagnostics - Aniworld</title>
|
||||
<link rel="stylesheet" href="/static/css/base/variables.css?v={{ static_version('css/base/variables.css') }}">
|
||||
<link rel="stylesheet" href="/static/css/base/reset.css?v={{ static_version('css/base/reset.css') }}">
|
||||
<link rel="stylesheet" href="/static/css/base/typography.css?v={{ static_version('css/base/typography.css') }}">
|
||||
<link rel="stylesheet" href="/static/css/components/buttons.css?v={{ static_version('css/components/buttons.css') }}">
|
||||
<link rel="stylesheet" href="/static/css/components/modals.css?v={{ static_version('css/components/modals.css') }}">
|
||||
<link rel="stylesheet" href="/static/css/components/forms.css?v={{ static_version('css/components/forms.css') }}">
|
||||
<link rel="stylesheet" href="/static/css/components/cards.css?v={{ static_version('css/components/cards.css') }}">
|
||||
<link rel="stylesheet" href="/static/css/components/notifications.css?v={{ static_version('css/components/notifications.css') }}">
|
||||
<link rel="stylesheet" href="/static/css/layout/page.css?v={{ static_version('css/layout/page.css') }}">
|
||||
<title>NFO Diagnostics - AniWorld Manager</title>
|
||||
<link rel="stylesheet" href="/static/css/styles.css?v={{ static_version('css/styles.css') }}">
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/static/css/pages/nfo-settings.css?v={{ static_version('css/pages/nfo-settings.css') }}">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app">
|
||||
<div class="app-container">
|
||||
<!-- Header -->
|
||||
<header class="page-header">
|
||||
<div class="header-left">
|
||||
<a href="/" class="back-link">
|
||||
<i class="fas fa-arrow-left"></i>
|
||||
<span data-text="back-to-library">Back to Library</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<h1 data-text="nfo-diagnostics-title">NFO Diagnostics & Repair</h1>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<button id="btn-scan-all" class="btn btn-secondary">
|
||||
<i class="fas fa-search"></i>
|
||||
<span data-text="scan-all">Scan All</span>
|
||||
</button>
|
||||
<button id="btn-repair-all" class="btn btn-primary">
|
||||
<i class="fas fa-wrench"></i>
|
||||
<span data-text="repair-all">Repair All</span>
|
||||
</button>
|
||||
<header class="header">
|
||||
<div class="header-content">
|
||||
<div class="header-title">
|
||||
<i class="fas fa-file-lines"></i>
|
||||
<h1>NFO Diagnostics</h1>
|
||||
</div>
|
||||
<div class="header-actions">
|
||||
<a href="/" class="btn btn-secondary">
|
||||
<i class="fas fa-arrow-left"></i>
|
||||
<span>Back to Main</span>
|
||||
</a>
|
||||
<button id="theme-toggle" class="btn btn-icon" title="Toggle theme">
|
||||
<i class="fas fa-moon"></i>
|
||||
</button>
|
||||
<button id="logout-btn" class="btn btn-secondary" title="Logout" style="display: none;">
|
||||
<i class="fas fa-sign-out-alt"></i>
|
||||
<span>Logout</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- Stats Bar -->
|
||||
<div class="stats-bar">
|
||||
<div class="stat-item">
|
||||
<span class="stat-value" id="total-series">0</span>
|
||||
<span class="stat-label" data-text="total-series">Total Series</span>
|
||||
</div>
|
||||
<div class="stat-item stat-missing">
|
||||
<span class="stat-value" id="missing-nfo">0</span>
|
||||
<span class="stat-label" data-text="missing-nfo">Missing NFO</span>
|
||||
</div>
|
||||
<div class="stat-item stat-incomplete">
|
||||
<span class="stat-value" id="incomplete-nfo">0</span>
|
||||
<span class="stat-label" data-text="incomplete-nfo">Incomplete NFO</span>
|
||||
</div>
|
||||
<div class="stat-item stat-complete">
|
||||
<span class="stat-value" id="complete-nfo">0</span>
|
||||
<span class="stat-label" data-text="complete-nfo">Complete</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Search and Filter -->
|
||||
<div class="toolbar">
|
||||
<div class="search-box">
|
||||
<i class="fas fa-search"></i>
|
||||
<input type="text" id="search-input" class="input-field"
|
||||
placeholder="Search series..." data-text="search-placeholder">
|
||||
</div>
|
||||
<div class="filter-buttons">
|
||||
<button class="filter-btn active" data-filter="all">
|
||||
<span data-text="filter-all">All</span>
|
||||
<span class="count" id="filter-all-count">0</span>
|
||||
</button>
|
||||
<button class="filter-btn" data-filter="missing">
|
||||
<i class="fas fa-exclamation-circle"></i>
|
||||
<span data-text="filter-missing">Missing</span>
|
||||
<span class="count" id="filter-missing-count">0</span>
|
||||
</button>
|
||||
<button class="filter-btn" data-filter="incomplete">
|
||||
<i class="fas fa-exclamation-triangle"></i>
|
||||
<span data-text="filter-incomplete">Incomplete</span>
|
||||
<span class="count" id="filter-incomplete-count">0</span>
|
||||
</button>
|
||||
<button class="filter-btn" data-filter="complete">
|
||||
<i class="fas fa-check-circle"></i>
|
||||
<span data-text="filter-complete">Complete</span>
|
||||
<span class="count" id="filter-complete-count">0</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Series List -->
|
||||
<div class="series-list-container">
|
||||
<div id="series-list" class="series-list">
|
||||
<!-- Loading state -->
|
||||
<div class="loading-state" id="loading-state">
|
||||
<i class="fas fa-spinner fa-spin"></i>
|
||||
<span data-text="loading">Loading...</span>
|
||||
</div>
|
||||
|
||||
<!-- Empty state -->
|
||||
<div class="empty-state hidden" id="empty-state">
|
||||
<i class="fas fa-check-circle"></i>
|
||||
<span data-text="all-nfo-complete">All NFO files are complete!</span>
|
||||
</div>
|
||||
|
||||
<!-- Series cards will be rendered here -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Detail Panel (slide-out) -->
|
||||
<div id="detail-panel" class="detail-panel hidden">
|
||||
<div class="panel-overlay"></div>
|
||||
<div class="panel-content">
|
||||
<div class="panel-header">
|
||||
<h3 id="panel-title">Series Name</h3>
|
||||
<button id="btn-close-panel" class="btn btn-icon">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<!-- NFO Status -->
|
||||
<div class="detail-section">
|
||||
<h4 data-text="nfo-status">NFO Status</h4>
|
||||
<div class="status-display">
|
||||
<span id="panel-status-badge" class="nfo-status-badge">-</span>
|
||||
<span id="panel-nfo-path" class="nfo-path"></span>
|
||||
<!-- Main content -->
|
||||
<main class="main-content nfo-main-content">
|
||||
<!-- Statistics Overview -->
|
||||
<section class="nfo-stats-section">
|
||||
<div class="stats-grid">
|
||||
<div class="stat-card">
|
||||
<div class="stat-icon">
|
||||
<i class="fas fa-folder text-primary"></i>
|
||||
</div>
|
||||
<div class="stat-info">
|
||||
<div class="stat-value" id="total-series">-</div>
|
||||
<div class="stat-label">Total Series</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Missing Tags -->
|
||||
<div class="detail-section" id="missing-tags-section">
|
||||
<h4 data-text="missing-tags">Missing Tags</h4>
|
||||
<div id="panel-missing-tags" class="missing-tags-list">
|
||||
<!-- Tags will be rendered here -->
|
||||
|
||||
<div class="stat-card stat-success">
|
||||
<div class="stat-icon">
|
||||
<i class="fas fa-check-circle text-success"></i>
|
||||
</div>
|
||||
<div class="stat-info">
|
||||
<div class="stat-value" id="complete-series">-</div>
|
||||
<div class="stat-label">Complete NFOs</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Actions -->
|
||||
<div class="detail-section">
|
||||
<h4 data-text="actions">Actions</h4>
|
||||
<div class="action-buttons">
|
||||
<button id="btn-repair-single" class="btn btn-primary">
|
||||
<i class="fas fa-wrench"></i>
|
||||
<span data-text="repair-nfo">Repair NFO</span>
|
||||
</button>
|
||||
<button id="btn-validate" class="btn btn-secondary">
|
||||
<i class="fas fa-check"></i>
|
||||
<span data-text="validate-nfo">Validate XML</span>
|
||||
</button>
|
||||
<button id="btn-view-nfo" class="btn btn-secondary">
|
||||
<i class="fas fa-file-code"></i>
|
||||
<span data-text="view-nfo">View NFO</span>
|
||||
|
||||
<div class="stat-card stat-warning">
|
||||
<div class="stat-icon">
|
||||
<i class="fas fa-exclamation-circle text-warning"></i>
|
||||
</div>
|
||||
<div class="stat-info">
|
||||
<div class="stat-value" id="incomplete-series">-</div>
|
||||
<div class="stat-label">Need Repair</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="stat-card stat-error">
|
||||
<div class="stat-icon">
|
||||
<i class="fas fa-times-circle text-error"></i>
|
||||
</div>
|
||||
<div class="stat-info">
|
||||
<div class="stat-value" id="missing-series">-</div>
|
||||
<div class="stat-label">Missing NFO</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Tab Navigation -->
|
||||
<nav class="nfo-tabs">
|
||||
<button class="nfo-tab active" data-tab="overview">
|
||||
<i class="fas fa-list"></i>
|
||||
<span>Overview</span>
|
||||
</button>
|
||||
<button class="nfo-tab" data-tab="diagnostics">
|
||||
<i class="fas fa-search"></i>
|
||||
<span>Series Diagnostics</span>
|
||||
</button>
|
||||
<button class="nfo-tab" data-tab="repair">
|
||||
<i class="fas fa-wrench"></i>
|
||||
<span>Batch Repair</span>
|
||||
</button>
|
||||
<button class="nfo-tab" data-tab="settings">
|
||||
<i class="fas fa-cog"></i>
|
||||
<span>Settings</span>
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
<!-- Tab Content -->
|
||||
<div class="nfo-tab-content">
|
||||
<!-- Overview Tab -->
|
||||
<div id="tab-overview" class="tab-panel active">
|
||||
<div class="panel-header">
|
||||
<h2><i class="fas fa-chart-pie"></i> NFO Health Overview</h2>
|
||||
<button id="btn-refresh-overview" class="btn btn-secondary">
|
||||
<i class="fas fa-refresh"></i> Refresh
|
||||
</button>
|
||||
</div>
|
||||
<div class="overview-content">
|
||||
<div class="health-summary">
|
||||
<div class="health-chart">
|
||||
<canvas id="nfo-health-chart"></canvas>
|
||||
</div>
|
||||
<div class="health-details">
|
||||
<h3>Required Tags</h3>
|
||||
<p class="info-text">Each NFO file must contain these tags for Kodi compatibility:</p>
|
||||
<ul class="tag-list">
|
||||
<li><code>title</code> - Series title</li>
|
||||
<li><code>plot</code> - Series description</li>
|
||||
<li><code>tmdbid</code> - TMDB identifier</li>
|
||||
</ul>
|
||||
<h3>Optional Tags</h3>
|
||||
<p class="info-text">These enhance the Kodi experience:</p>
|
||||
<ul class="tag-list optional-tags">
|
||||
<li><code>year</code>, <code>premiered</code>, <code>genre</code></li>
|
||||
<li><code>studio</code>, <code>rating</code>, <code>mpaa</code></li>
|
||||
<li><code>actor</code>, <code>trailer</code>, <code>thumb</code></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Diagnostics Tab -->
|
||||
<div id="tab-diagnostics" class="tab-panel">
|
||||
<div class="panel-header">
|
||||
<h2><i class="fas fa-search"></i> Series Diagnostics</h2>
|
||||
<div class="panel-actions">
|
||||
<input type="text" id="diagnostics-search" class="search-input" placeholder="Search series...">
|
||||
<select id="filter-status" class="filter-select">
|
||||
<option value="all">All Status</option>
|
||||
<option value="complete">Complete</option>
|
||||
<option value="incomplete">Incomplete</option>
|
||||
<option value="missing">Missing</option>
|
||||
</select>
|
||||
<button id="btn-refresh-diagnostics" class="btn btn-secondary">
|
||||
<i class="fas fa-refresh"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- NFO Content Preview -->
|
||||
<div class="detail-section" id="nfo-preview-section">
|
||||
<h4 data-text="nfo-preview">NFO Preview</h4>
|
||||
<pre id="nfo-preview-content" class="nfo-preview"><code></code></pre>
|
||||
<div class="series-list-container">
|
||||
<table class="series-diagnostics-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="sortable" data-sort="name">
|
||||
<span>Series Name</span>
|
||||
<i class="fas fa-sort"></i>
|
||||
</th>
|
||||
<th class="sortable" data-sort="status">
|
||||
<span>Status</span>
|
||||
<i class="fas fa-sort"></i>
|
||||
</th>
|
||||
<th>Missing Tags</th>
|
||||
<th>NFO Path</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="diagnostics-table-body">
|
||||
<tr class="loading-row">
|
||||
<td colspan="5">
|
||||
<div class="loading-spinner">
|
||||
<i class="fas fa-spinner fa-spin"></i>
|
||||
<span>Loading diagnostics...</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Repair Tab -->
|
||||
<div id="tab-repair" class="tab-panel">
|
||||
<div class="panel-header">
|
||||
<h2><i class="fas fa-wrench"></i> Batch Repair</h2>
|
||||
</div>
|
||||
<div class="repair-content">
|
||||
<div class="repair-info">
|
||||
<div class="info-card">
|
||||
<i class="fas fa-info-circle"></i>
|
||||
<div>
|
||||
<h4>About NFO Repair</h4>
|
||||
<p>Repairs NFO files using TMDB metadata. If a series has no TMDB ID set, the repair will search TMDB by the series name.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="repair-actions">
|
||||
<button id="btn-select-all-repair" class="btn btn-secondary">
|
||||
<i class="fas fa-check-square"></i> Select All Needing Repair
|
||||
</button>
|
||||
<button id="btn-clear-selection" class="btn btn-secondary">
|
||||
<i class="fas fa-times"></i> Clear Selection
|
||||
</button>
|
||||
</div>
|
||||
<div class="repair-list-container">
|
||||
<table class="repair-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="checkbox-col">
|
||||
<input type="checkbox" id="select-all-repair">
|
||||
</th>
|
||||
<th>Series Name</th>
|
||||
<th>Status</th>
|
||||
<th>TMDB ID</th>
|
||||
<th>Priority</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="repair-table-body">
|
||||
<tr class="loading-row">
|
||||
<td colspan="5">
|
||||
<div class="loading-spinner">
|
||||
<i class="fas fa-spinner fa-spin"></i>
|
||||
<span>Loading series needing repair...</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="repair-footer">
|
||||
<div class="selection-count">
|
||||
<span id="selected-count">0</span> series selected
|
||||
</div>
|
||||
<button id="btn-batch-repair" class="btn btn-primary" disabled>
|
||||
<i class="fas fa-wrench"></i> Repair Selected
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Settings Tab -->
|
||||
<div id="tab-settings" class="tab-panel">
|
||||
<div class="panel-header">
|
||||
<h2><i class="fas fa-cog"></i> NFO Settings</h2>
|
||||
</div>
|
||||
<div class="settings-content">
|
||||
<div class="settings-section">
|
||||
<h3><i class="fas fa-plug"></i> TMDB Connection</h3>
|
||||
<div class="setting-item">
|
||||
<div class="setting-info">
|
||||
<label for="tmdb-api-key">TMDB API Key</label>
|
||||
<p class="setting-description">Required for fetching metadata. Get your key from <a href="https://www.themoviedb.org/settings/api" target="_blank">TMDB</a></p>
|
||||
</div>
|
||||
<div class="setting-control">
|
||||
<input type="password" id="tmdb-api-key" class="input-field" placeholder="Enter TMDB API key">
|
||||
<button id="btn-test-tmdb" class="btn btn-secondary">
|
||||
<i class="fas fa-plug"></i> Test Connection
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tmdb-status" class="connection-status hidden"></div>
|
||||
</div>
|
||||
|
||||
<div class="settings-section">
|
||||
<h3><i class="fas fa-file-code"></i> Auto-Generation</h3>
|
||||
<div class="setting-item">
|
||||
<div class="setting-info">
|
||||
<label for="nfo-auto-create">Auto-create NFO files</label>
|
||||
<p class="setting-description">Automatically create NFO metadata when downloading new series</p>
|
||||
</div>
|
||||
<div class="setting-control">
|
||||
<label class="toggle-switch">
|
||||
<input type="checkbox" id="nfo-auto-create">
|
||||
<span class="toggle-slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<div class="setting-info">
|
||||
<label for="nfo-update-on-scan">Update NFO on rescan</label>
|
||||
<p class="setting-description">Refresh existing NFO files when rescanning library</p>
|
||||
</div>
|
||||
<div class="setting-control">
|
||||
<label class="toggle-switch">
|
||||
<input type="checkbox" id="nfo-update-on-scan">
|
||||
<span class="toggle-slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-section">
|
||||
<h3><i class="fas fa-image"></i> Image Downloads</h3>
|
||||
<div class="setting-item">
|
||||
<div class="setting-info">
|
||||
<label for="nfo-download-poster">Download poster.jpg</label>
|
||||
<p class="setting-description">Download series poster image</p>
|
||||
</div>
|
||||
<div class="setting-control">
|
||||
<label class="toggle-switch">
|
||||
<input type="checkbox" id="nfo-download-poster" checked>
|
||||
<span class="toggle-slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<div class="setting-info">
|
||||
<label for="nfo-download-fanart">Download fanart.jpg</label>
|
||||
<p class="setting-description">Download background fanart image</p>
|
||||
</div>
|
||||
<div class="setting-control">
|
||||
<label class="toggle-switch">
|
||||
<input type="checkbox" id="nfo-download-fanart" checked>
|
||||
<span class="toggle-slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<div class="setting-info">
|
||||
<label for="nfo-download-logo">Download logo.png</label>
|
||||
<p class="setting-description">Download series logo/clearlogo</p>
|
||||
</div>
|
||||
<div class="setting-control">
|
||||
<label class="toggle-switch">
|
||||
<input type="checkbox" id="nfo-download-logo" checked>
|
||||
<span class="toggle-slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-section">
|
||||
<h3><i class="fas fa-save"></i> Save Settings</h3>
|
||||
<button id="btn-save-nfo-settings" class="btn btn-primary">
|
||||
<i class="fas fa-save"></i> Save NFO Settings
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Toast Notifications -->
|
||||
<div id="toast-container" class="toast-container"></div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<!-- Loading overlay -->
|
||||
<div id="loading-overlay" class="loading-overlay hidden">
|
||||
<div class="loading-spinner">
|
||||
<i class="fas fa-spinner fa-spin"></i>
|
||||
<p>Processing...</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Toast notifications -->
|
||||
<div id="toast-container" class="toast-container"></div>
|
||||
|
||||
<!-- Shared Modules -->
|
||||
<script src="/static/js/shared/constants.js?v={{ static_version('js/shared/constants.js') }}"></script>
|
||||
<script src="/static/js/shared/auth.js?v={{ static_version('js/shared/auth.js') }}"></script>
|
||||
<script src="/static/js/shared/api-client.js?v={{ static_version('js/shared/api-client.js') }}"></script>
|
||||
<script src="/static/js/shared/theme.js?v={{ static_version('js/shared/theme.js') }}"></script>
|
||||
<script src="/static/js/shared/ui-utils.js?v={{ static_version('js/shared/ui-utils.js') }}"></script>
|
||||
|
||||
<!-- Page Module -->
|
||||
<script src="/static/js/shared/websocket-client.js?v={{ static_version('js/shared/websocket-client.js') }}"></script>
|
||||
<script src="/static/js/localization.js?v={{ static_version('js/localization.js') }}"></script>
|
||||
<script src="/static/js/user_preferences.js?v={{ static_version('js/user_preferences.js') }}"></script>
|
||||
|
||||
<!-- NFO Settings Page Module -->
|
||||
<script src="/static/js/pages/nfo-settings.js?v={{ static_version('js/pages/nfo-settings.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user