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

View file

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