Fix Calendar Item Duplication

- 6fd23cf6a0 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.
This commit is contained in:
Larvey
2022-06-20 13:32:31 -04:00
committed by GitHub
parent 690f09fcf3
commit 16ec57081b

View File

@@ -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) => {