From 31fcf3e18911f55acd43cfc28f3bde368f20a255 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Thu, 7 Dec 2023 03:15:28 -0800
Subject: feat(media): outbound links option

---
 src/lib/List/Anime/CleanAnimeList.svelte | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

(limited to 'src/lib/List/Anime/CleanAnimeList.svelte')

diff --git a/src/lib/List/Anime/CleanAnimeList.svelte b/src/lib/List/Anime/CleanAnimeList.svelte
index 9eded7a0..e082f00a 100644
--- a/src/lib/List/Anime/CleanAnimeList.svelte
+++ b/src/lib/List/Anime/CleanAnimeList.svelte
@@ -7,6 +7,7 @@
 	import type { AniListAuthorisation, UserIdentity } from '$lib/AniList/identity';
 	import ListTitle from '../ListTitle.svelte';
 	import MediaTitle from '../MediaTitleDisplay.svelte';
+	import { outboundLink } from '$lib/Media/media';
 
 	export let media: Media[];
 	export let title: string;
@@ -38,14 +39,7 @@
 
 		{#if title.includes('Upcoming Episodes') || progress !== (anime.nextAiringEpisode?.episode || 9999) - 1}
 			<li>
-				<a
-					href={$settings.linkToLiveChart
-						? `https://www.livechart.me/search?q=${
-								anime.title.native || anime.title.english || anime.title.romaji
-						  }`
-						: `https://anilist.co/anime/${anime.id}`}
-					target="_blank"
-				>
+				<a href={outboundLink(anime, 'anime', $settings.outboundLinksTo)} target="_blank">
 					<span
 						style={lastUpdatedMedia === anime.id && anime.episodes !== progress
 							? 'color: lightcoral'
-- 
cgit v1.2.3

