ShaneP 223 Posted July 12, 2021 Share Posted July 12, 2021 Hi all, is there any documentation around MediaBrowser API (C#), more so, around Collections, what I would like to know is: Creating/Deleting Collections. Adding/Removing Items. Currently I am in the context of of Folder (Collection) which I get by public Folder FindCollection(User user, string collectionName) { return _libraryManager.GetItemsResult(new InternalItemsQuery { Name = collectionName, IncludeItemTypes = new[] { "collections", "Boxset" }, User = user ////try using the user with policy.IsAdministator for testing }).Items.OfType<Folder>().FirstOrDefault(); } Which gives me reference to the Collection, is this the correct way, or should I be casting to another type? Link to comment Share on other sites More sharing options...
ShaneP 223 Posted July 16, 2021 Author Share Posted July 16, 2021 Don't stress... figured it out Link to comment Share on other sites More sharing options...
ebr 14862 Posted July 18, 2021 Share Posted July 18, 2021 Hi. The API is documented automatically. See the link at the bottom of your dashboard. Link to comment Share on other sites More sharing options...
ShaneP 223 Posted July 18, 2021 Author Share Posted July 18, 2021 Just now, ebr said: Hi. The API is documented automatically. See the link at the bottom of your dashboard. Thanks Ebr, but unless I misread it, that seemed to be the docs for the rest api. But all good I eventually figured it out :) Link to comment Share on other sites More sharing options...
ebr 14862 Posted July 18, 2021 Share Posted July 18, 2021 Oh, sorry, you are talking about creating a plug-in. I read too fast. The public plug-ins are the best source of examples there. Thanks. 1 Link to comment Share on other sites More sharing options...
Luke 36887 Posted July 20, 2021 Share Posted July 20, 2021 To answer the question, you can make use of MediaBrowser.Controller.Collections.ICollectionManager to manipulate collections. Link to comment Share on other sites More sharing options...
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