Add lastPlayedAt to album type

This commit is contained in:
jeffvli 2022-12-24 13:32:27 -08:00
parent a4584ecd5c
commit 747633fb25
2 changed files with 5 additions and 3 deletions

View File

@ -413,14 +413,15 @@ const normalizeAlbum = (item: NDAlbum, server: ServerListItem, imageSize?: numbe
albumArtists: [{ id: item.albumArtistId, name: item.albumArtist }],
artists: [{ id: item.artistId, name: item.artist }],
backdropImageUrl: null,
createdAt: item.createdAt,
duration: null,
createdAt: item.createdAt.split('T')[0],
duration: item.duration || null,
genres: item.genres,
id: item.id,
imagePlaceholderUrl,
imageUrl,
isCompilation: item.compilation,
isFavorite: item.starred,
lastPlayedAt: item.playDate ? item.playDate.split('T')[0] : null,
name: item.name,
playCount: item.playCount,
rating: item.rating,
@ -456,7 +457,7 @@ const normalizeSong = (
bitRate: item.bitRate,
compilation: item.compilation,
container: item.suffix,
createdAt: item.createdAt,
createdAt: item.createdAt.split('T')[0],
discNumber: item.discNumber,
duration: item.duration,
genres: item.genres,

View File

@ -153,6 +153,7 @@ export type Album = {
imageUrl: string | null;
isCompilation: boolean | null;
isFavorite: boolean;
lastPlayedAt: string | null;
name: string;
playCount: number | null;
rating: number | null;