update serie icons

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-05-19 22:41:30 +02:00
parent 2882498568
commit 43f9cf08b5
3 changed files with 25 additions and 3 deletions

View File

@@ -5,6 +5,7 @@ import {
ExternalLinkIcon,
HelpCircleIcon,
MailIcon,
MessageCircleIcon,
MonitorIcon,
MonitorPlayIcon,
PodcastIcon,
@@ -47,6 +48,8 @@ const mapper: Record<string, LucideIcon> = {
search: SearchIcon,
social: PodcastIcon,
email: MailIcon,
podcast: PodcastIcon,
comment: MessageCircleIcon,
unknown: HelpCircleIcon,
[NOT_SET_VALUE]: ScanIcon,
@@ -77,6 +80,10 @@ export function SerieIcon({ name, ...props }: SerieIconProps) {
return createImageIcon(getProxyImage(name));
}
if (name.match(/(.+)\.\w{2,3}$/)) {
return createImageIcon(getProxyImage(`https://${name}`));
}
return null;
}, [name]);