bakes82 90 Posted October 12, 2023 Share Posted October 12, 2023 How do we know the "library" an item is in when a library contain multiple paths? I thought it was GetTopParent, but that doesnt seem to be it, I think its only returning the ID of the top folder path. EX if I have a library with 3 paths, and I have the same movie in 2 of the 3 paths the GetTopParentId of the two items doesnt seem to be the same. var movies = _libraryManager.GetItemList(new InternalItemsQuery { IncludeItemTypes = new[] { nameof(Movie) }, IsVirtualItem = false, Recursive = true }) .Select(m => m as Movie); var duplications = movies.Where(m => m.ProviderIds != null && m.GetProviderId(MetadataProviders.Imdb) != null && m.GetProviderId(MetadataProviders.Tmdb) == null) .GroupBy(x => new { V = x.GetProviderId(MetadataProviders.Imdb) + x.GetTopParent().Id.ToString() }) .Where(x => x.Count() > 1) .ToList(); Link to comment Share on other sites More sharing options...
bakes82 90 Posted October 12, 2023 Author Share Posted October 12, 2023 @Lukeinsight? Link to comment Share on other sites More sharing options...
Luke 37094 Posted October 12, 2023 Share Posted October 12, 2023 HI, you can call LibraryManager.GetCollectionFolders(item) 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