removed dates on episodes and seasons and songs

This commit is contained in:
2026-02-14 03:18:36 -06:00
parent 3facd00721
commit 2dfbc7bbad

View File

@@ -799,10 +799,19 @@ fn render_library(
let (start, end) = compute_window(len, selected, viewport);
fn show_year_for(item_type: Option<&str>) -> bool {
matches!(item_type, Some("Movie" | "Series" | "MusicAlbum"))
}
let list_items: Vec<ListItem> = items[start..end]
.iter()
.map(|it| {
let year = it.production_year.map(|y| format!(" ({y})")).unwrap_or_default();
let year = if show_year_for(it.item_type.as_deref()) {
it.production_year.map(|y| format!(" ({y})")).unwrap_or_default()
} else {
String::new()
};
ListItem::new(format!("{}{}", it.name, year))
})
.collect();