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

Merge pull request #641 from Larvitar/master

If item EndYear is the same as ProductionYear only display ProductionYear
This commit is contained in:
dkanada 2019-12-20 16:54:56 +09:00 committed by GitHub
commit a1f45f8e77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -892,7 +892,8 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'focusMana
} else { } else {
if (item.EndDate && item.ProductionYear) { if (item.EndDate && item.ProductionYear) {
lines.push(item.ProductionYear + ' - ' + datetime.parseISO8601Date(item.EndDate).getFullYear()); var endYear = datetime.parseISO8601Date(item.EndDate).getFullYear();
lines.push(item.ProductionYear + (endYear === item.ProductionYear) ? '' : (' - ' + endYear));
} else { } else {
lines.push(item.ProductionYear || ''); lines.push(item.ProductionYear || '');
} }