Jump to content

C# How to get all episodes of a given tv show?


pünktchen

Recommended Posts

pünktchen

Topic title says it all. How do i get all episodes of a Series BaseItem? (Without getting all library episodes first and then query for DisplayParent.DisplayParent.Name)

Link to comment
Share on other sites

 

Using LibraryManager, set the InternalItemQuery() params:

IncludeItemTypes 'Series'.

Get the series BaseItem you want by name.

(You could also add a search term if you know the name of the series you want, using 'NameStartsWith', or 'SearchName')

 

Then do a new query with 'recursive = true',

the 'parent = series',

and IncludeItenTypes = new[] { "Episode" }'

 

you can also include, or not include VirtualItems (missing/future episodes)

 

is that right?

 

Edited by chef
Link to comment
Share on other sites

If you already have the series object just call GetItems and pass Recursive=true and IncludeItemTypes Episode.

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