From 16ec57081bcec4017f26e0340eeeb1317efb1dcf Mon Sep 17 00:00:00 2001 From: Larvey <39219859+LarveyOfficial@users.noreply.github.com> Date: Mon, 20 Jun 2022 13:32:31 -0400 Subject: [PATCH] Fix Calendar Item Duplication - https://github.com/ajnart/homarr/commit/6fd23cf6a003a2e666cea30dfb9e031e6e0e6e12 changed how items for the calendar are acquired, making it so every series gets updated when a new one gets added, or one gets moved. This causes the entries in the calendar to duplicate due to old code being left in. --- src/components/modules/calendar/CalendarModule.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/modules/calendar/CalendarModule.tsx b/src/components/modules/calendar/CalendarModule.tsx index f7bf5fe3a..4665f4480 100644 --- a/src/components/modules/calendar/CalendarModule.tsx +++ b/src/components/modules/calendar/CalendarModule.tsx @@ -68,7 +68,7 @@ export default function CalendarComponent(props: any) { useEffect(() => { // Create each Sonarr service and get the medias - const currentSonarrMedias: any[] = [...sonarrMedias]; + const currentSonarrMedias: any[] = []; Promise.all( sonarrServices.map((service) => getMedias(service, 'sonarr').then((res) => { @@ -80,7 +80,7 @@ export default function CalendarComponent(props: any) { ).then(() => { setSonarrMedias(currentSonarrMedias); }); - const currentRadarrMedias: any[] = [...radarrMedias]; + const currentRadarrMedias: any[] = []; Promise.all( radarrServices.map((service) => getMedias(service, 'radarr').then((res) => { @@ -92,7 +92,7 @@ export default function CalendarComponent(props: any) { ).then(() => { setRadarrMedias(currentRadarrMedias); }); - const currentLidarrMedias: any[] = [...lidarrMedias]; + const currentLidarrMedias: any[] = []; Promise.all( lidarrServices.map((service) => getMedias(service, 'lidarr').then((res) => { @@ -104,7 +104,7 @@ export default function CalendarComponent(props: any) { ).then(() => { setLidarrMedias(currentLidarrMedias); }); - const currentReadarrMedias: any[] = [...readarrMedias]; + const currentReadarrMedias: any[] = []; Promise.all( readarrServices.map((service) => getMedias(service, 'readarr').then((res) => {