mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Append year to title of content in video playback if possible.
This commit is contained in:
parent
60a7722c1a
commit
631284e56f
1 changed files with 12 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue