Jump to content

How to retrieve Ids recursively?


thierry.deo

Recommended Posts

thierry.deo

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

thierry.deo

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

  • 1 month later...

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
Link to comment
Share on other sites

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...