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,8 +183,8 @@ export function getMediaInfoHtml(item, options = {}) {
if (item.EndDate) { if (item.EndDate) {
try { try {
const endYear = datetime.toLocaleString(datetime.parseISO8601Date(item.EndDate).getFullYear(), { useGrouping: false }); const endYear = datetime.toLocaleString(datetime.parseISO8601Date(item.EndDate).getFullYear(), { useGrouping: false });
/* At this point, text will contain only the start year */
if (endYear !== item.ProductionYear) { if (endYear !== text) {
text += ` - ${endYear}`; text += ` - ${endYear}`;
} }
} catch (e) { } catch (e) {