fix: remove log and correctly set the if statement for the cached image component

This commit is contained in:
JoaquinOlivero
2024-09-10 21:48:57 +00:00
parent ae5542b6d3
commit 6a475b5e41

View File

@@ -16,14 +16,10 @@ const CachedImage = ({ src, ...props }: ImageProps) => {
if (typeof imageUrl === 'string' && imageUrl.startsWith('http')) {
const parsedUrl = new URL(imageUrl);
console.log(parsedUrl);
if (parsedUrl.host === 'image.tmdb.org') {
if (currentSettings.cacheImages)
imageUrl = imageUrl.replace('https://image.tmdb.org', '/imageproxy');
}
if (parsedUrl.protocol === 'http:') {
} else if (parsedUrl.host !== 'gravatar.com') {
imageUrl = '/avatarproxy/' + imageUrl;
}
}