Fix Jellyfin album duration normalization (#191)

This commit is contained in:
Gelaechter 2023-07-29 17:35:30 +00:00 committed by GitHub
parent 8e83beffcc
commit 93e00e7afb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -201,7 +201,7 @@ const normalizeAlbum = (
})),
backdropImageUrl: null,
createdAt: item.DateCreated,
duration: item.RunTimeTicks / 10000,
duration: item.RunTimeTicks / 10000000,
genres: item.GenreItems?.map((entry) => ({ id: entry.Id, name: entry.Name })),
id: item.Id,
imagePlaceholderUrl: null,

View File

@ -37,7 +37,8 @@ export const AlbumDetailHeader = forwardRef(
id: 'duration',
secondary: false,
value:
detailQuery?.data?.duration && formatDurationString(detailQuery.data.duration),
detailQuery?.data?.duration &&
formatDurationString(detailQuery.data.duration * 1000),
},
];