nfo: improvments
This commit is contained in:
@@ -1249,6 +1249,63 @@ textarea {
|
||||
min-width: auto;
|
||||
}
|
||||
|
||||
/* NFO Statistics Styling */
|
||||
.nfo-stats-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
gap: 1rem;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
.stat-box {
|
||||
background-color: var(--bg-secondary);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 8px;
|
||||
padding: 1rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.stat-number {
|
||||
font-size: 2rem;
|
||||
font-weight: 700;
|
||||
color: var(--primary-color);
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: 0.875rem;
|
||||
color: var(--text-secondary);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.recommendation-box {
|
||||
background-color: #fff3cd;
|
||||
border: 1px solid #ffeaa7;
|
||||
border-radius: 8px;
|
||||
padding: 1rem;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
.recommendation-box ul {
|
||||
margin: 0.5rem 0 0 1rem;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.recommendation-box li {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.success-box {
|
||||
background-color: #d4edda;
|
||||
border: 1px solid #c3e6cb;
|
||||
color: #155724;
|
||||
border-radius: 8px;
|
||||
padding: 1rem;
|
||||
margin: 1rem 0;
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* Responsive adjustments for admin tools */
|
||||
@media (max-width: 768px) {
|
||||
.table-container {
|
||||
|
||||
@@ -2013,13 +2013,35 @@ async function showEpisodesMissingNFODateadded() {
|
||||
const response = await apiCall('/api/admin/nfo/missing-dateadded');
|
||||
|
||||
if (response.success) {
|
||||
const totalFiles = response.total_nfo_files_missing || response.missing_dateadded_count;
|
||||
const fixableItems = response.missing_dateadded_count;
|
||||
const tvFiles = response.tv_nfo_files_missing || 0;
|
||||
const movieFiles = response.movie_nfo_files_missing || 0;
|
||||
|
||||
const html = `
|
||||
<h4>Episodes Missing NFO dateadded</h4>
|
||||
<p><strong>Found:</strong> ${response.missing_dateadded_count} episodes missing dateadded in NFO files</p>
|
||||
<p><strong>Total checked:</strong> ${response.total_episodes_checked} episodes</p>
|
||||
${response.missing_dateadded_count > 0 ?
|
||||
'<p><strong>Recommendation:</strong> Use the "NFO File Repair" tool to fix these issues.</p>' :
|
||||
'<p>✅ All NFO files are properly maintained!</p>'
|
||||
<h4>NFO Files Missing dateadded Elements</h4>
|
||||
<div class="nfo-stats-grid">
|
||||
<div class="stat-box">
|
||||
<div class="stat-number">${totalFiles}</div>
|
||||
<div class="stat-label">Total NFO Files Missing dateadded</div>
|
||||
</div>
|
||||
<div class="stat-box">
|
||||
<div class="stat-number">${fixableItems}</div>
|
||||
<div class="stat-label">Can Be Fixed Automatically</div>
|
||||
</div>
|
||||
</div>
|
||||
<p><strong>Breakdown:</strong> ${tvFiles} TV episodes, ${movieFiles} movies</p>
|
||||
<p><strong>Scanned:</strong> ${response.total_episodes_checked} TV NFO files, ${response.total_movies_checked} movie NFO files</p>
|
||||
${totalFiles > 0 ? `
|
||||
<div class="recommendation-box">
|
||||
<p><strong>📋 Action Required:</strong></p>
|
||||
<ul>
|
||||
<li><strong>${fixableItems} items</strong> have IMDb IDs and database entries - use "NFO File Repair" tool to fix</li>
|
||||
${totalFiles > fixableItems ? `<li><strong>${totalFiles - fixableItems} items</strong> need IMDb IDs first - check "Items Missing IMDb IDs" tool</li>` : ''}
|
||||
</ul>
|
||||
</div>
|
||||
` :
|
||||
'<div class="success-box">✅ All NFO files are properly maintained!</div>'
|
||||
}
|
||||
`;
|
||||
resultsContent.innerHTML = html;
|
||||
|
||||
Reference in New Issue
Block a user