ShaneP 246 Posted July 12, 2021 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?
ebr 15667 Posted July 18, 2021 Posted July 18, 2021 Hi. The API is documented automatically. See the link at the bottom of your dashboard.
ShaneP 246 Posted July 18, 2021 Author 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 :)
ebr 15667 Posted July 18, 2021 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
Luke 40079 Posted July 20, 2021 Posted July 20, 2021 To answer the question, you can make use of MediaBrowser.Controller.Collections.ICollectionManager to manipulate collections.
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