Fixed: Error on artist details if refresh isn't finished

This commit is contained in:
Qstick 2022-12-24 20:41:12 -06:00
parent a431a1ce95
commit e67f0becad
1 changed files with 6 additions and 4 deletions

View File

@ -29,11 +29,13 @@ function getAlbumTypeStatistics(albums) {
let sizeOnDisk = 0;
albums.forEach((album) => {
sizeOnDisk = sizeOnDisk + album.statistics.sizeOnDisk;
trackFileCount = trackFileCount + album.statistics.trackFileCount;
if (album.statistics) {
sizeOnDisk = sizeOnDisk + album.statistics.sizeOnDisk;
trackFileCount = trackFileCount + album.statistics.trackFileCount;
if (album.statistics.trackFileCount === album.statistics.totalTrackCount || (album.monitored && isBefore(album.airDateUtc))) {
albumCount++;
if (album.statistics.trackFileCount === album.statistics.totalTrackCount || (album.monitored && isBefore(album.airDateUtc))) {
albumCount++;
}
}
if (album.monitored) {