Remove image placeholders (performance issues?)

This commit is contained in:
jeffvli 2023-01-03 01:49:01 -08:00
parent acb906aad9
commit b87d7778df
2 changed files with 5 additions and 23 deletions

View file

@ -620,7 +620,7 @@ const normalizeSong = (
duration: item.RunTimeTicks / 10000000, duration: item.RunTimeTicks / 10000000,
genres: item.GenreItems.map((entry: any) => ({ id: entry.Id, name: entry.Name })), genres: item.GenreItems.map((entry: any) => ({ id: entry.Id, name: entry.Name })),
id: item.Id, id: item.Id,
imagePlaceholderUrl: getSongCoverArtUrl({ baseUrl: server.url, item, size: 1 }), imagePlaceholderUrl: null,
imageUrl: getSongCoverArtUrl({ baseUrl: server.url, item, size: imageSize || 300 }), imageUrl: getSongCoverArtUrl({ baseUrl: server.url, item, size: imageSize || 300 }),
isFavorite: (item.UserData && item.UserData.IsFavorite) || false, isFavorite: (item.UserData && item.UserData.IsFavorite) || false,
lastPlayedAt: null, lastPlayedAt: null,
@ -661,11 +661,7 @@ const normalizeAlbum = (item: JFAlbum, server: ServerListItem, imageSize?: numbe
duration: item.RunTimeTicks / 10000000, duration: item.RunTimeTicks / 10000000,
genres: item.GenreItems?.map((entry) => ({ id: entry.Id, name: entry.Name })), genres: item.GenreItems?.map((entry) => ({ id: entry.Id, name: entry.Name })),
id: item.Id, id: item.Id,
imagePlaceholderUrl: getAlbumCoverArtUrl({ imagePlaceholderUrl: null,
baseUrl: server.url,
item,
size: 1,
}),
imageUrl: getAlbumCoverArtUrl({ imageUrl: getAlbumCoverArtUrl({
baseUrl: server.url, baseUrl: server.url,
item, item,
@ -725,11 +721,7 @@ const normalizePlaylist = (
size: imageSize || 300, size: imageSize || 300,
}); });
const imagePlaceholderUrl = getPlaylistCoverArtUrl({ const imagePlaceholderUrl = null;
baseUrl: server.url,
item,
size: 1,
});
return { return {
description: item.Overview || null, description: item.Overview || null,

View file

@ -517,12 +517,7 @@ const normalizeAlbum = (item: NDAlbum, server: ServerListItem, imageSize?: numbe
size: imageSize || 300, size: imageSize || 300,
}); });
const imagePlaceholderUrl = getCoverArtUrl({ const imagePlaceholderUrl = null;
baseUrl: server.url,
coverArtId: item.coverArtId || item.id,
credential: server.credential,
size: 1,
});
const imageBackdropUrl = imageUrl?.replace(/size=\d+/, 'size=1000') || null; const imageBackdropUrl = imageUrl?.replace(/size=\d+/, 'size=1000') || null;
@ -583,12 +578,7 @@ const normalizePlaylist = (
size: imageSize || 300, size: imageSize || 300,
}); });
const imagePlaceholderUrl = getCoverArtUrl({ const imagePlaceholderUrl = null;
baseUrl: server.url,
coverArtId: item.id,
credential: server.credential,
size: 1,
});
return { return {
description: item.comment, description: item.comment,