Jump to content

How to retrieve Ids recursively?


Recommended Posts

thierry.deo
Posted

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

Posted

What kind of statistics?  We already have an endpoint to get counts of different types of items.

thierry.deo
Posted

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.

thierry.deo
Posted

Thanks, was exactly what I was looking for. Guess I will look more stuff on this wiki;

Posted

Also be sure you are using the Swagger API docs accessed via the menu on the server tray icon.

  • 1 month later...
Posted (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 by chef

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...