thierry.deo 0 Posted December 1, 2013 Share Posted December 1, 2013 Hi, I'm starting figuring out how to use the mediabrowser server api, and I am trying to collect statistics about my movie/shows collection. The one thing I can't manage to figure out is how to explore recursively my collection with the Ids, I didn't find them in the .xml files in my storage device, and I didn't find anything in the api. Is there a solution ? Should I try with the client api ? In such case, how can I use it ? Thanks, Thierry Link to comment Share on other sites More sharing options...
ebr 14959 Posted December 1, 2013 Share Posted December 1, 2013 What kind of statistics? We already have an endpoint to get counts of different types of items. Link to comment Share on other sites More sharing options...
thierry.deo 0 Posted December 1, 2013 Author Share Posted December 1, 2013 I'd like to know for each show, the total duration of all episodes and the duration I have already seen. so I think I need to retrieve the played status of each item, and then it is basic manipulation of length of items. Link to comment Share on other sites More sharing options...
Luke 37254 Posted December 1, 2013 Share Posted December 1, 2013 See the bottom example here for getting all episodes: https://github.com/MediaBrowser/MediaBrowser/wiki/Browsing-the-Library Link to comment Share on other sites More sharing options...
thierry.deo 0 Posted December 3, 2013 Author Share Posted December 3, 2013 Thanks, was exactly what I was looking for. Guess I will look more stuff on this wiki; Link to comment Share on other sites More sharing options...
ebr 14959 Posted December 3, 2013 Share Posted December 3, 2013 Also be sure you are using the Swagger API docs accessed via the menu on the server tray icon. Link to comment Share on other sites More sharing options...
chef 3749 Posted January 17, 2014 Share Posted January 17, 2014 (edited) In vb.net ' :: Query the Library Dim LibQuery As New ItemQuery LibQuery.UserId = Session.UserId LibQuery.SortOrder = SortOrder.Ascending LibQuery.recursive = true Dim LibResult As ItemsResult Try LibResult = Await Client.GetItemsAsync(LibQuery) Catch x As TaskCanceledException End Try Then enumerate the result with a "for each loop" or something. For each LibItem in LibResult.items Next Then get the "LibItem.Id" When you use the user I'd as the top level folder to recursively scan, you'll get all your items. Edited January 16, 2014 by chef 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