Calculate duration playlist duration in ms
This commit is contained in:
parent
088f1d0f99
commit
7b13e24ce4
1 changed files with 2 additions and 2 deletions
|
@ -531,7 +531,7 @@ const normalizeAlbum = (item: NDAlbum, server: ServerListItem, imageSize?: numbe
|
||||||
artists: [{ id: item.artistId, name: item.artist }],
|
artists: [{ id: item.artistId, name: item.artist }],
|
||||||
backdropImageUrl: imageBackdropUrl,
|
backdropImageUrl: imageBackdropUrl,
|
||||||
createdAt: item.createdAt.split('T')[0],
|
createdAt: item.createdAt.split('T')[0],
|
||||||
duration: item.duration || null,
|
duration: item.duration * 1000 || null,
|
||||||
genres: item.genres,
|
genres: item.genres,
|
||||||
id: item.id,
|
id: item.id,
|
||||||
imagePlaceholderUrl,
|
imagePlaceholderUrl,
|
||||||
|
@ -591,7 +591,7 @@ const normalizePlaylist = (
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
duration: item.duration,
|
duration: item.duration * 1000,
|
||||||
id: item.id,
|
id: item.id,
|
||||||
imagePlaceholderUrl,
|
imagePlaceholderUrl,
|
||||||
imageUrl,
|
imageUrl,
|
||||||
|
|
Reference in a new issue