Jump to content

How to get artist of music video in a .Net plugin


Recommended Posts

pünktchen

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 post
Share on other sites
PenkethBoy

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 post
Share on other sites
pünktchen

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 post
Share on other sites
Luke

You could try this method on librarymanager

List<BaseItem> GetAllArtists(BaseItem item)
Link to post
Share on other sites
pünktchen
Posted (edited)

Thanks, i'll try that.

Edited by pünktchen
Link to post
Share on other sites
pünktchen

That works. Thank you again. I was just blind because of GetAllArtists  :rolleyes: 

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...