HomerS 8 Posted December 11, 2016 Posted December 11, 2016 Hi, Im trying to write a plugin that will alert me / take action on any missing episodes but I can't really figure out how to query. the goal is to get a list of missing episodes only , would that be possible ? the idea is to have this running as a scheduled task. Br Homer
ebr 15679 Posted December 11, 2016 Posted December 11, 2016 This could be done more easily with the API and an external program/script of some sort as it would be a simple query against your TV library with filters for item type of Episode and a filter of IsMissing.
HomerS 8 Posted December 11, 2016 Author Posted December 11, 2016 You might be right but I like the ability to have config within the server gui. I managed to come up with this code: // Get a list of all series var episodeList = _libraryManager.GetItemList(new InternalItemsQuery() { IncludeItemTypes = new[] { typeof(Episode).Name }, Recursive = true, GroupByPresentationUniqueKey = false }).Cast<Episode>().ToList(); //Filter out the missing Episode var missingEpisodeList = episodeList.Where(item => item.IsMissingEpisode == true).ToList(); This gives me a list with episodes but something's not right as all (8) in my test are missing the name of the series, I have no problem extracting AiredSeasonNumber and AbsoluteEpisodeNumber but SeriesName and FindSeriesName() returns empty string so there must be a better way ? What are the criteria for IsMissingEpisode ? I was expecting a list of episodes that have been aired but missing in the series I have in my library but that doesn't seem to be the case ? I also plan to to used the build in task scheduler if I can figure out how. Br Homer
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