web: debug with dates
Local Docker Build (Dev) / build-dev (push) Successful in 4s

This commit is contained in:
2025-10-26 12:11:11 -04:00
parent 5d3754b401
commit 4d7d9752fc
3 changed files with 95 additions and 41 deletions
+16 -11
View File
@@ -1836,20 +1836,23 @@ async function checkMissingNFODates() {
let html = `
<div class="scan-summary">
<h4>NFO Scan Results</h4>
<p><strong>Total episodes checked:</strong> ${response.total_episodes_checked}</p>
<p><strong>Episodes missing dateadded in NFO:</strong> ${response.missing_dateadded_count}</p>
<p><strong>Total episodes checked:</strong> ${response.total_episodes_checked || 0}</p>
<p><strong>Total movies checked:</strong> ${response.total_movies_checked || 0}</p>
<p><strong>Total items checked:</strong> ${response.total_items_checked || 0}</p>
<p><strong>Items missing dateadded in NFO:</strong> ${response.missing_dateadded_count}</p>
</div>
`;
if (response.missing_dateadded_count > 0) {
html += `
<div class="missing-episodes">
<h5>Episodes with missing dateadded (showing first 50):</h5>
<h5>Items with missing dateadded (showing first 50):</h5>
<div class="table-container">
<table class="results-table">
<thead>
<tr>
<th>Series</th>
<th>Type</th>
<th>IMDb ID</th>
<th>Season</th>
<th>Episode</th>
<th>Database Date</th>
@@ -1860,15 +1863,17 @@ async function checkMissingNFODates() {
<tbody>
`;
response.episodes.forEach(ep => {
(response.items || response.episodes || []).forEach(item => {
const displayDate = item.dateadded ? new Date(item.dateadded).toLocaleString() : 'None';
html += `
<tr>
<td>${ep.imdb_id}</td>
<td>${ep.season}</td>
<td>${ep.episode}</td>
<td>${new Date(ep.dateadded).toLocaleString()}</td>
<td>${ep.source}</td>
<td><small>${ep.nfo_path}</small></td>
<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>
</tr>
`;
});