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

Fixed year appearing as <year>-<year> in the series page when the years are the same.

This commit is contained in:
LJQ 2023-10-13 01:54:42 +08:00
parent 71e431d562
commit 36db09fb53

View file

@ -183,9 +183,9 @@ export function getMediaInfoHtml(item, options = {}) {
if (item.EndDate) {
try {
const endYear = datetime.toLocaleString(datetime.parseISO8601Date(item.EndDate).getFullYear(), { useGrouping: false });
if (endYear !== item.ProductionYear) {
text += `-${endYear}`;
/* At this point, text will contain only the start year */
if (endYear !== text) {
text += ` - ${endYear}`;
}
} catch (e) {
console.error('error parsing date:', item.EndDate);