Jump to content

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


Recommended Posts

pünktchen
Posted

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
Posted

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
Posted

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?

PenkethBoy
Posted

Ah ok - i get what you mean now

pünktchen
Posted

@@Luke your help would be much appreciated.

Posted

You could try this method on librarymanager

List<BaseItem> GetAllArtists(BaseItem item)
pünktchen
Posted (edited)

Thanks, i'll try that.

Edited by pünktchen
pünktchen
Posted

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

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...