jorenn92 / Maintainerr

Looks and smells like Overseerr, does the opposite. Maintenance tool for the Plex ecosystem
https://maintainerr.info
MIT License
815 stars 15 forks source link

[Bug] The "is monitored" returns null when unmonitored #906

Open RouNNdeL opened 8 months ago

RouNNdeL commented 8 months ago

Describe the bug The is monitored rule will return null instead of false when a movie is unmonitored in Radarr (I have not check Sonarr).

To Reproduce Steps to reproduce the behavior:

  1. Have unmonitored movies in Radarr
  2. Create a rule using Radarr - is monitored equals false rule
  3. Run the rules
  4. The rule will fail to match unmonitored Movies
  5. Change the rule to Radarr - is monitored not equals true
  6. The rule will now correctly match the Movies

Expected behavior The workaround with setting the rule to not equal true works but not obvious, so I assume this is a bug. Expected behavior would be to match the rule when the movie is unmonitored.

Screenshots

Current behaviour:

- operator: OR
  action: equals
  firstValueName: Radarr - is monitored
  firstValue: null
  secondValueName: boolean
  secondValue: 0
  result: false

Workaround:

- operator: OR
  action: not_equals
  firstValueName: Radarr - is monitored
  firstValue: null
  secondValueName: boolean
  secondValue: 1
  result: true

Expected behaviour:

- operator: OR
  action: equals
  firstValueName: Radarr - is monitored
  firstValue: 0
  secondValueName: boolean
  secondValue: 0
  result: true

Device (please complete the following information):

Additional context

None.

Gwindalmir commented 2 months ago

I think it's related to what I mentioned in #1113, this happens when the item was never requested in radarr, but instead was detected from a library scan.

Does this also happen if you monitor a movie, then unmonitor it?

jorenn92 commented 2 months ago

Thanks for this report! I believe the underlying reason for this is indeed @Gwindalmir's suggestion. I'll have to catch this scenario since it probably happens a lot.