jorenn92 / Maintainerr

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

Watchlisted rule returns null value #1203

Closed sameleff closed 1 month ago

sameleff commented 1 month ago

Describe the bug Watchlisted rule returns null value for TV Shows that are included in a user's watchlist.

To Reproduce Steps to reproduce the behavior:

  1. Add a TV Show to a particular Plex user's watchlist.
  2. Create a new rule that excludes TV Shows that are on the user's watchlist.
  3. Run the rule.
  4. TV Show is included in the "Leaving Soon" collection.

Expected behavior Using "Plex - [list] Watchlisted by (username) [experimental]" rule, expect it to return a list of all users that have watchlisted a particular TV Show. Instead, it returns a null value [].

Screenshots Screenshots for rule creation: image image image image

Output from Test Media using Breaking Bad as an example. Confirmed it is included in the Plex watchlist.

- plexId: 63158
  result: true
  sectionResults:
    - id: 0
      result: false
      ruleResults:
        - operator: OR
          action: not_contains_partial
          firstValueName: Plex - [list] Collections media is present in (titles)
          firstValue:
            - TV Shows Leaving Soon
            - IMDb Top 250
            - IMDb Popular
          secondValueName: text
          secondValue: TV Show Vault
          result: true
        - operator: AND
          action: contains_partial
          firstValueName: Plex - [list] Users that saw all available episodes
          firstValue: []
          secondValueName: text
          secondValue: sameleff
          result: false
    - id: 1
      result: false
      operator: OR
      ruleResults:
        - operator: OR
          action: not_contains_partial
          firstValueName: Plex - [list] Collections media is present in (titles)
          firstValue:
            - TV Shows Leaving Soon
            - IMDb Top 250
            - IMDb Popular
          secondValueName: text
          secondValue: TV Show Vault
          result: true
        - operator: AND
          action: before
          firstValueName: Plex - Date added
          firstValue: 2023-10-05T22:39:42.000Z
          secondValueName: custom_days
          secondValue: 2024-02-12T18:26:36.932Z
          result: true
        - operator: AND
          action: equals
          firstValueName: Plex - Total views
          firstValue: 0
          secondValueName: number
          secondValue: 0
          result: true
        - operator: AND
          action: not_contains_partial
          firstValueName: Plex - [list] Watchlisted by (username) [experimental]
          firstValue: []
          secondValueName: text
          secondValue: sameleff
          result: true

Device (please complete the following information):

Additional context The user involved is a non-admin on the Plex server.

jorenn92 commented 1 month ago

Hey, thanks for testing the watchlisted rule! Is the user who added the item to their watchlist set to have their watchlist publicly viewable?

In other words, when you visit your friend's profile page on Plex Web, can you see their watchlist? We can only pull watchlists from users who have made them publicly available.

If you're able to view it, could you share some logs? Preferably debug. Thanks!

sameleff commented 1 month ago

Aha, that was it (my watchlist was set to private). As soon as I changed it to visible to Friends Only everything seems to work!

Could you add this requirement in the description for the Watchlisted by (username) entry in the Rules Glossary of the official docs?

jorenn92 commented 1 month ago

Aha, that was it (my watchlist was set to private). As soon as I changed it to visible to Friends Only everything seems to work!

Could you add this requirement in the description for the Watchlisted by (username) entry in the Rules Glossary of the official docs?

Great! I've added a clarification to the documentation.