This commit is contained in:
@@ -1847,17 +1847,18 @@ async function checkMissingNFODates() {
|
||||
html += `
|
||||
<div class="missing-episodes">
|
||||
<h5>Items with missing dateadded (showing first 50):</h5>
|
||||
<div class="table-container">
|
||||
<table class="results-table">
|
||||
<div class="nfo-repair-table-container">
|
||||
<table class="nfo-repair-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<th>IMDb ID</th>
|
||||
<th>Season</th>
|
||||
<th>Episode</th>
|
||||
<th>Database Date</th>
|
||||
<th>Source</th>
|
||||
<th>NFO Path</th>
|
||||
<th style="width: 8%">Type</th>
|
||||
<th style="width: 12%">IMDb ID</th>
|
||||
<th style="width: 8%">Season</th>
|
||||
<th style="width: 8%">Episode</th>
|
||||
<th style="width: 15%">Database Date</th>
|
||||
<th style="width: 10%">Source</th>
|
||||
<th style="width: 25%">Series/Movie</th>
|
||||
<th style="width: 14%">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -1865,20 +1866,39 @@ async function checkMissingNFODates() {
|
||||
|
||||
(response.items || response.episodes || []).forEach(item => {
|
||||
const displayDate = item.dateadded ? new Date(item.dateadded).toLocaleString() : 'None';
|
||||
const seriesName = item.series_name || item.title || 'Unknown';
|
||||
const nfoFileName = item.nfo_path ? item.nfo_path.split('/').pop() : 'Unknown';
|
||||
|
||||
html += `
|
||||
<tr>
|
||||
<td>${item.media_type || 'episode'}</td>
|
||||
<td>${item.imdb_id}</td>
|
||||
<td>${item.season || 'N/A'}</td>
|
||||
<td>${item.episode || 'N/A'}</td>
|
||||
<td>${displayDate}</td>
|
||||
<td>${item.source || 'unknown'}</td>
|
||||
<td><small>${item.nfo_path}</small></td>
|
||||
<td><span class="media-type-badge ${item.media_type || 'episode'}">${item.media_type || 'episode'}</span></td>
|
||||
<td><code>${item.imdb_id}</code></td>
|
||||
<td class="text-center">${item.season || 'N/A'}</td>
|
||||
<td class="text-center">${item.episode || 'N/A'}</td>
|
||||
<td><small>${displayDate}</small></td>
|
||||
<td><small>${item.source || 'unknown'}</small></td>
|
||||
<td><strong>${seriesName}</strong><br><small class="text-muted">${nfoFileName}</small></td>
|
||||
<td>
|
||||
${item.dateadded ?
|
||||
'<span class="status-ready">✅ Ready to fix</span>' :
|
||||
'<span class="status-missing">❌ No DB date</span>'
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
|
||||
html += '</tbody></table></div></div>';
|
||||
html += `
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="nfo-fix-actions">
|
||||
<button onclick="fixAllMissingNFODates()" class="btn btn-primary">
|
||||
🔧 Fix All Missing dateadded Elements
|
||||
</button>
|
||||
<p class="text-muted">This will automatically add dateadded elements to NFO files using database values.</p>
|
||||
</div>
|
||||
</div>`;
|
||||
} else {
|
||||
html += '<div class="success">✅ All NFO files have dateadded elements!</div>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user