-
Notifications
You must be signed in to change notification settings - Fork 7
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
[Feature Request] Interesting interaction with hide_unflagged #4
Comments
I agree this behaviour is unexpected. This component just provides the data and doesn't handle displaying or limiting results. I would open an issue with the card here: https://github.com/custom-cards/upcoming-media-card/issues |
Actually I did open the case over there first, and they said it was on your end |
Thanks for pointing this out, the issue there provides more context into what the actual problem is. |
This was added in the latest release: https://github.com/boralyl/kodi-recently-added/releases/tag/v1.1.0 |
i know its not your work, but can you perhaps look over the custom-components/sensor.plex_recently_added#53 and add there the option to only show the unwatched? |
I don't have plex to test and assist with this. From the docs I don't see a watched attribute, but it appears there is a |
it gives the watched or unwatched flag in the recently added Plex Entitys, what is missing is the Option to sort the results from plex by this. for example here are two movies from the sensor in >HA, one is watched, one is unwatched. flag: true
flag: false
i dont know what i must change in the script to only get the results with "flag: true" |
@pimp1310 Oh, I see what you mean. I had only read the title and not the full description. So the reason this works with kodi is kodi supports requesting watched/unwatched at the api level so it will do the filtering on it's side and return the exact number of results. It looks like there isn't a way to filter these out in plex. So if you request 10 results, the filtering happens in the component which means if you have 5 watched and 5 unwatched, the component will end up showing only 5 results. The component would have to request more than self.api_json = sorted(self.api_json, key=lambda i: i['addedAt'],
reverse=True) Obviously if your max is 10, and it fetches 20, but all of them are watched and you only want unwatched the card will end up showing 0 results since they are all watched. I only took a glance at this, so there might be a better way, but it's not quite as easy to do as what I did with the kodi component. |
yeah the api doesnt have this function i think. BUT perhaps i missunderstand you, here is my code in the configuration,yaml for the sensor in HA, you see the MAX is definied.
when i remove the "[:self.max_items]" then he doesnt shows only the unwatched or missunderstand you? |
okay i get it to work with a workaround |
In upcoming-media-card when I set hide_unflagged to false the 5 most recent movies are displayed, when I set it to true nothing is displayed. I played so more with it and set the max to 15 then 2 movies showed up.
It looks like when it queries it grabs the first 5 (max) records and then selects the ones without flags.
I would like the behavior to be grab records until it finds the 5 (max) most recent un-flagged.
The text was updated successfully, but these errors were encountered: