pünktchen 1258 Posted February 29, 2020 Share 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? Link to comment Share on other sites More sharing options...
PenkethBoy 2063 Posted February 29, 2020 Share 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 Link to comment Share on other sites More sharing options...
pünktchen 1258 Posted February 29, 2020 Author Share 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? Link to comment Share on other sites More sharing options...
PenkethBoy 2063 Posted February 29, 2020 Share Posted February 29, 2020 Ah ok - i get what you mean now Link to comment Share on other sites More sharing options...
pünktchen 1258 Posted March 1, 2020 Author Share Posted March 1, 2020 @@Luke your help would be much appreciated. Link to comment Share on other sites More sharing options...
Luke 37060 Posted March 3, 2020 Share Posted March 3, 2020 You could try this method on librarymanager List<BaseItem> GetAllArtists(BaseItem item) Link to comment Share on other sites More sharing options...
pünktchen 1258 Posted March 3, 2020 Author Share Posted March 3, 2020 (edited) Thanks, i'll try that. Edited March 3, 2020 by pünktchen Link to comment Share on other sites More sharing options...
pünktchen 1258 Posted March 3, 2020 Author Share Posted March 3, 2020 That works. Thank you again. I was just blind because of GetAllArtists 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