diff --git a/docs/widgets/services/calendar.md b/docs/widgets/services/calendar.md index bb8b5016..a3990861 100644 --- a/docs/widgets/services/calendar.md +++ b/docs/widgets/services/calendar.md @@ -24,6 +24,9 @@ widget: color: teal # optional - defaults to pre-defined color for the service (teal for sonarr) params: # optional - additional params for the service unmonitored: true # optional - defaults to false, used with *arr stack + showCinemaRelease: true # optional - defaults to true + showPhysicalRelease: true # optional - defaults to true + showDigitalRelease: true # optional - defaults to true - type: ical # Show calendar events from another service url: https://domain.url/with/link/to.ics # URL with calendar events name: My Events # required - name for these calendar events diff --git a/src/widgets/calendar/integrations/radarr.jsx b/src/widgets/calendar/integrations/radarr.jsx index 945eadd9..ff7de778 100644 --- a/src/widgets/calendar/integrations/radarr.jsx +++ b/src/widgets/calendar/integrations/radarr.jsx @@ -17,13 +17,14 @@ export default function Integration({ config, params, setEvents, hideErrors = fa } const eventsToAdd = {}; + const showCinemaRelease = config?.showCinemaRelease ?? true; + const showPhysicalRelease = config?.showPhysicalRelease ?? true; + const showDigitalRelease = config?.showDigitalRelease ?? true; radarrData?.forEach((event) => { - const cinemaTitle = `${event.title} - ${t("calendar.inCinemas")}`; - const physicalTitle = `${event.title} - ${t("calendar.physicalRelease")}`; - const digitalTitle = `${event.title} - ${t("calendar.digitalRelease")}`; - if (event.inCinemas) { + if (event.inCinemas && showCinemaRelease) { + const cinemaTitle = `${event.title} - ${t("calendar.inCinemas")}`; eventsToAdd[cinemaTitle] = { title: cinemaTitle, date: DateTime.fromISO(event.inCinemas), @@ -33,7 +34,8 @@ export default function Integration({ config, params, setEvents, hideErrors = fa }; } - if (event.physicalRelease) { + if (event.physicalRelease && showPhysicalRelease) { + const physicalTitle = `${event.title} - ${t("calendar.physicalRelease")}`; eventsToAdd[physicalTitle] = { title: physicalTitle, date: DateTime.fromISO(event.physicalRelease), @@ -43,7 +45,8 @@ export default function Integration({ config, params, setEvents, hideErrors = fa }; } - if (event.digitalRelease) { + if (event.digitalRelease && showDigitalRelease) { + const digitalTitle = `${event.title} - ${t("calendar.digitalRelease")}`; eventsToAdd[digitalTitle] = { title: digitalTitle, date: DateTime.fromISO(event.digitalRelease),