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

Merge pull request #4873 from scampower3/year-fix-mediainfo

Fix duplicate year in the series details page
This commit is contained in:
Bill Thornton 2023-10-18 15:41:17 -04:00 committed by GitHub
commit 0dbdc5de96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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);