1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Fix Same year appears in <year> - <year> format under card.

This commit is contained in:
scampower3 2023-10-11 01:49:41 +08:00 committed by GitHub
parent 54d9d90e84
commit fbcd543a26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -669,7 +669,7 @@ function getCardFooterText(item, apiClient, options, footerClass, progressHtml,
lines.push(globalize.translate('SeriesYearToPresent', productionYear || '')); lines.push(globalize.translate('SeriesYearToPresent', productionYear || ''));
} else if (item.EndDate && item.ProductionYear) { } else if (item.EndDate && item.ProductionYear) {
const endYear = datetime.toLocaleString(datetime.parseISO8601Date(item.EndDate).getFullYear(), { useGrouping: false }); const endYear = datetime.toLocaleString(datetime.parseISO8601Date(item.EndDate).getFullYear(), { useGrouping: false });
lines.push(productionYear + ((endYear === item.ProductionYear) ? '' : (' - ' + endYear))); lines.push(productionYear + ((endYear === productionYear) ? '' : (' - ' + endYear)));
} else { } else {
lines.push(productionYear || ''); lines.push(productionYear || '');
} }