pünktchen 1258 Posted March 15, 2022 Share Posted March 15, 2022 @Luke ILibraryManager.UpdateItem void UpdateItem(BaseItem item, BaseItem parent, ItemUpdateType updateReason, MetadataRefreshOptions metadataRefreshOptions); has a new parameter MetadataRefreshOptions that needs some argument public MetadataRefreshOptions(IFileSystem fileSystem); public MetadataRefreshOptions(IDirectoryService directoryService); public MetadataRefreshOptions(MetadataRefreshOptions copy); Where do i get "copy"? Isn't this an infinite loop? Link to comment Share on other sites More sharing options...
Luke 37095 Posted March 15, 2022 Share Posted March 15, 2022 It's to pass the current library scan options all the way through the save operation. For today's purposes, you can pass in null. I will add back the overload for the method that doesn't use that so that you can just omit it altogether. 1 Link to comment Share on other sites More sharing options...
ShaneP 227 Posted June 21, 2022 Share Posted June 21, 2022 Hey @Luke, I see that when I use the latest MediaBrowser.Server.Core (4.7.3), that now has the extra MetadataRefreshOptions parameter, when I pass through null when updating a collection, it removes the images from the item. So basically I add and remove items from a collection via AddCollectionInfo and RemoveCollection on the base item and then call UpdateItems with UpdateItemType.None. This used to work without issue before the update. I'm not sure what I can pass here. Is that the best way to create/edit collections to begin with. (sorry can't find much docs). Thanks in advance. Link to comment Share on other sites More sharing options...
Luke 37095 Posted June 21, 2022 Share Posted June 21, 2022 4 hours ago, ShaneP said: Hey @Luke, I see that when I use the latest MediaBrowser.Server.Core (4.7.3), that now has the extra MetadataRefreshOptions parameter, when I pass through null when updating a collection, it removes the images from the item. So basically I add and remove items from a collection via AddCollectionInfo and RemoveCollection on the base item and then call UpdateItems with UpdateItemType.None. This used to work without issue before the update. I'm not sure what I can pass here. Is that the best way to create/edit collections to begin with. (sorry can't find much docs). Thanks in advance. You can't do that. I would pass in UpdateItemType.Edit since that's what you actually did. But instead of all of that I would use the dedicated ICollectionManager in MediaBrowser.Controller.Collections Link to comment Share on other sites More sharing options...
ShaneP 227 Posted June 21, 2022 Share Posted June 21, 2022 1 hour ago, Luke said: You can't do that. I would pass in UpdateItemType.Edit since that's what you actually did. But instead of all of that I would use the dedicated ICollectionManager in MediaBrowser.Controller.Collections Thanks @Luke that work like a charm (ICollectionManager)! 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