-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compare rule "Watchlisted by" against empty ruleset #1249
Comments
I just had a thought about this and wanted to share. What if you said watchlisted by, not contains, |
Well, in the formatting of my post I used What I was trying to say is, what if you put a random name in there. Equaling no one is the same as not equaling (James, Lisa, Mary, John, Frank). So if you are looking for stuff that is watchlisted by no one, could you say not contains and list everyone? I don't know if I am making sense but basically equals no one is the same as not equals everyone. |
Now I think I understand you, but in that case I would need to know the list of all possible people to compare it with the list of people who have seen the item. And for that I would need to have something like "All Plex users". I hope you understood me now... :) |
I thought you were just looking for stuff not watchlisted by anyone. |
Yes, that would be what I'm looking for. Can you think of a way to do it? |
Thats what I was trying to say earlier. Equaling no one is the same as not equaling everyone/anyone. So you could say not contains and list everyone. Then it would return true as it wouldn't equal anyone. Instead of trying to equal blank to blank. Change it to not equaling a list of everyone. |
Also are we sure we're even talking about the same thing? Watchlisted and a "list of watches" are different things. Watchlisted is a feature in Plex where you can add something to your watchlist (or your "want to watch list"). |
It's hard to explain in writing, and we might be a bit lost in translation... I'm not an English speaker and I might be wrong about something. My idea is to be able to make a rule that allows a certain item to be deleted when it is not included in anyone's Watchlist. So, my first idea was "if the rule 'Watchlisted by' is empty" it means that no one has it in their watchlist. I hope I'll finally be able to get my ideas across to you :) |
I understand completely. We're on the same page there. |
I had thought about enabling the comparison of empty arrays and being able to do the reverse, that is, whenever "Watchlisted by" is an empty array "[]" and I compare it with the empty array text "[]" and it is "equal" it should give True. For me it is comparing 2 empty strings, which in essence should be the same. When someone has watchlisted it, the array would be "[John Doe, Jane Doe]" and when comparing with an empty array "[]" with the "equal" rule it would give False |
What do you mean when someone has seen it? |
When someone "Watchlisted", sorry... -_- |
You should come over to discord and we can DM about it. |
I have same issue, I think. Was there was a resolution discussed elsewhere? Ideally, I just want to add a rule so a title won't get deleted if |
You don't want to delete something if it's on the watchlist of someone, right? The solution is to put not contains and list all users |
Thanks for the reply! I actually picked this up off the Discord chat history after I posted.
Works for my use case without listing all the Users manually. If any Users have media in a watchlist, it will return false. |
Nice. I am glad you found your answer! |
Heya, the most recent workaround doesn't seem to work anymore (empty list != empty list is returning false for me), so I just wanted to bump this ticket. I'm a developer and I'm happy to raise a PR to implement this as a feature, if it's reasonable to simply add "Empty list" as a match value, i.e.: While doing LMK if that seems reasonable and I can go ahead and raise a PR :) (such a matcher would also be very useful for all other list[] values, especially ones where you can't simply enumerate all of the possible values easily, like Labels) |
You shouldn't need to workaround this any more if I'm understanding your scenario correctly. An empty list to empty list comparison should return true when using equals (OPs original issue), so you can do that instead. You can use not equals empty list for the inverse. With regards to your suggestion, something I'd like to implement for lists is Count equals, Count not equals, Count greater & Count smaller. I believe that'll be more flexible. |
Yep, after cloning and reading through the code and finding the re: count - that sounds reasonable and definitely more flexible. Still happy to raise a PR for that if you think that it's a decent first task into the repo :) |
Not crazy haha, this was fixed in v2.7.0
We'd be very happy to accept that. I just had a very brief look at a possible implementation; add a new RuleType (RuleType.TEXT_ARRAY?) with new RulePossibility's (RulePossibility.COUNT_EQUALS etc.) in |
Just to put my two cents in here, there is also a new rule in the dev branch that just returns true or false if the item is watchlisted by anyone. |
Describe the bug
I'm trying to create a rule that says "if 'Watchlisted by' is empty [] then true to delete it" but when I compare the empty list with the string "[]" it tells me it's false.
To Reproduce
Expected behavior
Since the list is empty and I compare it with an empty list, it should give "true" in the rule.
Device (please complete the following information):
The text was updated successfully, but these errors were encountered: