Merge pull request #3621 from jesse231/append-year

This commit is contained in:
Bill Thornton 2022-05-11 00:01:13 -04:00 committed by GitHub
commit 9f78268a9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -210,7 +210,18 @@ import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../../components
itemName = parentName || '';
}
LibraryMenu.setTitle(itemName);
// Display the item with its premiere date if it has one
let title = itemName;
if (item.PremiereDate) {
try {
const year = datetime.parseISO8601Date(item.PremiereDate).getFullYear();
title += ` (${year})`;
} catch (e) {
console.error(e);
}
}
LibraryMenu.setTitle(title);
const documentTitle = parentName || (item ? item.Name : null);