jelum 34 Posted March 21, 2024 Posted March 21, 2024 Hi, Where can I find correct usage examples of INotificationManager? I want to notify a user about problems with a token
Solution Luke 40086 Posted March 21, 2024 Solution Posted March 21, 2024 Hi, you could try this: var notification = new NotificationRequest { Date = DateTimeOffset.UtcNow, Description = "My description", Title = "My Title" }; _notificationManager.SendNotification(notification); 1
jelum 34 Posted March 21, 2024 Author Posted March 21, 2024 How the user will know that the notification came from my plugin?
Luke 40086 Posted March 21, 2024 Posted March 21, 2024 1 hour ago, jelum said: How the user will know that the notification came from my plugin? You'll have to use the title and description as best you can to accomplish that. 1
jelum 34 Posted March 22, 2024 Author Posted March 22, 2024 I was not able to find any documentation about MediaBrowser.Controller.Entities.InternalItemsQuery object and namely property Recursive. What item is Recursive? Series, since it may have folders for seasons inside. Is it somehow applicable to Movies or other item types with simple structure (only one file)? Can you please explain it, point to documentation, or share it?
jelum 34 Posted March 22, 2024 Author Posted March 22, 2024 I want to find: 1. all libraries with type Movie, Series, Mixed libraryManager.QueryItems(new InternalItemsQuery { IncludeItemTypes = new[] { nameof(CollectionFolder),nameof(BoxSet) }, Recursive = false, HasPath = true, IsFolder = true, IsVirtualItem = false }); 2. all collections with a specific name libraryManager.QueryItems(new InternalItemsQuery { IncludeItemTypes = new[] { nameof(BoxSet) }, Recursive = false, Name = collectionName }); 3. Movies and Series from a specific Library having specific Provider IDs return libraryManager.QueryItems(new InternalItemsQuery { IncludeItemTypes = new[] { nameof(Movie), nameof(Series) }, AnyProviderIdEquals = providerIdList, Recursive = false, IsVirtualItem = false, ParentIds = librariesIds, HasPath = true }); 4. Same as 3, but from all Libraries, so I removed 'ParentIds' property.
Luke 40086 Posted March 24, 2024 Posted March 24, 2024 Your queries for #2, #3 and #4 all look good, but just change Recursive to true.
Luke 40086 Posted March 24, 2024 Posted March 24, 2024 For #1, just remove boxset as one of the types you're requesting and then I think it should work.
Luke 40086 Posted March 25, 2024 Posted March 25, 2024 @jelumplease let us know how this goes. Thanks. 1
jelum 34 Posted April 5, 2024 Author Posted April 5, 2024 @Lukelooks like it does what it has to do. I'll update you in case will find any strange behavior. Thanks for the help once again 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now