pünktchen 1350 Posted February 29, 2020 Posted February 29, 2020 If i have a BaseItem that holds all the information of a MusicVideo, how do i get the Artist? BaseItem doesn't have a property Artists and the People property only returns Actors, Directors and so on. Also a new Librarymanager ItemQuery with AppearsInItemIds = "Id of MusicVideo" doesn't work. So how do i get the Artist?
PenkethBoy 2066 Posted February 29, 2020 Posted February 29, 2020 Assuming the MV has an Artist assigned in the Metadata in Emby Its not the same, but via the api i get Artist info returned as part of the json info for all MV's e.g. I have previously queried Emby for the $LibraryResult.Item($i).Id value $MediaUrl = $embyServerUrl + "/emby/users/" + $User.User.Id + "/items?Recursive=true&ParentID="+ $LibraryResult.Item($i).Id + "&SortBy=Artists,SortName&SortOrder=Ascending&IncludeItemTypes=MusicVideo" + "&api_key=" + $User.AccessToken Might give you a clue
pünktchen 1350 Posted February 29, 2020 Author Posted February 29, 2020 Yes, i know it's working via json api. But the json api is probably doing multiple function calls in the background to return all properties with only one requests. The question is what are those background methods?
pünktchen 1350 Posted March 1, 2020 Author Posted March 1, 2020 @@Luke your help would be much appreciated.
Luke 40077 Posted March 3, 2020 Posted March 3, 2020 You could try this method on librarymanager List<BaseItem> GetAllArtists(BaseItem item)
pünktchen 1350 Posted March 3, 2020 Author Posted March 3, 2020 (edited) Thanks, i'll try that. Edited March 3, 2020 by pünktchen
pünktchen 1350 Posted March 3, 2020 Author Posted March 3, 2020 That works. Thank you again. I was just blind because of GetAllArtists
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