Jump to content

ItemChangeEvenArgs - I'm totally lost


Recommended Posts

rechigo

So for the past hour I've been messing with ILibraryManager and its ItemAdded and ItemUpdated events to try to get information on a movie when it is added/populated with metadata from sources like TVDB or omdb 

 

I need specific information about a piece of content when it is added, like Title, coverart, description, etc. The problem is ItemAdded is emitted as soon as the item is discovered, *BEFORE* the metadata is discovered

 

So my thought originally was when ItemAdded is emitted, shortly after the metadata is added, the ItemUpdated event would be triggered with an ItemUpdateType that signified that metadata was downloaded/imported/edited, but it was not. 

 

Right now, the only thing I can think of doing is to store the item ID in an array and iterating over that array at an interval, checking each item in the array to see if metadata has arrived, and if it has, remove the item from the array & in my case, send a notification to Discord containing some of the metadata. Is there a better way to identify when metadata is first added to content after it is scanned into a library?

Edited by rechigo
Link to post
Share on other sites
rechigo

In the future, should I expect ItemAdded event to wait for metadata before emitting? How long do you think it would be until something like this would be implemented? 

Link to post
Share on other sites
Luke

I'm not sure yet as i haven't dove into at this point.

Link to post
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...