rechigo 293 Posted March 24, 2020 Share Posted March 24, 2020 (edited) 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 March 24, 2020 by rechigo Link to comment Share on other sites More sharing options...
Luke 36878 Posted March 24, 2020 Share Posted March 24, 2020 Yes this sequence is something that needs review. Link to comment Share on other sites More sharing options...
rechigo 293 Posted March 24, 2020 Author Share Posted March 24, 2020 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 comment Share on other sites More sharing options...
Luke 36878 Posted March 24, 2020 Share Posted March 24, 2020 I'm not sure yet as i haven't dove into at this point. Link to comment Share on other sites More sharing options...
darkside40 91 Posted March 25, 2020 Share Posted March 25, 2020 I think what you describe could be the root of a problem i already mentioned over half a year ago: https://emby.media/community/index.php?/topic/76177-notification-only-filename-send/ 1 Link to comment Share on other sites More sharing options...
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