Sludge Vohaul 22 Posted August 30, 2017 Share Posted August 30, 2017 Hello, I have programatically created a collection on the server, and would like to fetch it's metadata from the available providers. How do I do that? The code which creates the collection is below. Thanks in advance sv public async Task<ICollectionIdentifier> CreateCollectionAsync(IEmbyClient client, string collectionName) { var args = new Dictionary<string, string> { {"IsLocked", "false"}, {"Name", collectionName}, {"ParentId", ""}, {"Ids", ""} }; var collectionCreationResult = await client.PostAsync<CollectionCreationResult>(client.GetApiUrl("Collections"), args); return new CollectionIdentifier { Name = collectionName, Id = collectionCreationResult.Id, }; } Link to comment Share on other sites More sharing options...
Solution Luke 37098 Posted August 30, 2017 Solution Share Posted August 30, 2017 That's all you need to do because the server will look for internet metadata right after creating the collection. 1 Link to comment Share on other sites More sharing options...
Sludge Vohaul 22 Posted August 30, 2017 Author Share Posted August 30, 2017 Argh, sorry for wasting your time - you were right. My source data had a typo in the collection's name ('asd Fimreihe' instead of 'asd Filmreihe') so there was never a match. Link to comment Share on other sites More sharing options...
Luke 37098 Posted August 31, 2017 Share Posted August 31, 2017 Thanks for the feedback. Link to comment Share on other sites More sharing options...
Sludge Vohaul 22 Posted September 1, 2017 Author Share Posted September 1, 2017 Just for the sake of completeness: The automatic retrieval of metadata for a newly created collection seems to be aborted if it is still in progress (has not finished yet) when movies are added to it (i.e. create a collection, add immediately a movie to it -> no metadata). Link to comment Share on other sites More sharing options...
Luke 37098 Posted September 1, 2017 Share Posted September 1, 2017 Why do you think that? Link to comment Share on other sites More sharing options...
Sludge Vohaul 22 Posted September 1, 2017 Author Share Posted September 1, 2017 (edited) That's how it behaves here (3.2.27.0). I have a code block which creates all the collections, followed by a code block which adds a movie to these created collections. 1. If both blocks are executed, the collection metadata is not updated. 2. If only the first block is executed, the collection metadata is updated. 3. if I add a breakpoint before executing the second block and a wait a little, the collection metadata is updated. It's not a browser cache issue, as the collections do not have a tmdb id in Point 1 Edited September 1, 2017 by Sludge Vohaul 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