diff --git a/src/components/Collection/SeriesMetadata.tsx b/src/components/Collection/SeriesMetadata.tsx
index 204404428..5e603ddcd 100644
--- a/src/components/Collection/SeriesMetadata.tsx
+++ b/src/components/Collection/SeriesMetadata.tsx
@@ -3,10 +3,13 @@ import { mdiCloseCircleOutline, mdiOpenInNew, mdiPencilCircleOutline, mdiPlusCir
import { Icon } from '@mdi/react';
import Button from '@/components/Input/Button';
+import { useDeleteSeriesTvdbLinkMutation } from '@/core/rtkQuery/splitV3Api/seriesApi';
-const MetadataLink = ({ id, site }: { site: string, id: number | number[] }) => {
+const MetadataLink = ({ id, seriesId, site }: { id: number | number[], seriesId: number, site: string }) => {
const linkId = Array.isArray(id) ? id[0] : id;
+ const [disableTvDBTrigger] = useDeleteSeriesTvdbLinkMutation();
+
const siteLink = useMemo(() => {
switch (site) {
case 'AniDB':
@@ -24,6 +27,18 @@ const MetadataLink = ({ id, site }: { site: string, id: number | number[] }) =>
}
}, [linkId, site]);
+ const canDisable = site === 'TvDB';
+
+ const disableMetadata = () => {
+ switch (site) {
+ case 'TvDB':
+ disableTvDBTrigger({ seriesId, tvdbShowId: linkId }).catch(() => {});
+ break;
+ default:
+ break;
+ }
+ };
+
return (
@@ -50,7 +65,7 @@ const MetadataLink = ({ id, site }: { site: string, id: number | number[] }) =>
-