Posts: 6
Joined: Dec 2014
Reputation:
0
Hi,
How can I retrieve "Composers" with AudioLibrary.GetRoles
(Audio.Artist.Roles,Audio.Details.Role,Audio.Fields.Role)
this is works
{"jsonrpc":"2.0","id":"AudioLibrary.GetRoles","method":"AudioLibrary.GetRoles","params":{"limits":{ "start" : 0, "end": 50},"sort":{"method":"label","order":"ascending"}}}
{
"id": "AudioLibrary.GetRoles",
"jsonrpc": "2.0",
"result": {
"limits": {
"end": 2,
"start": 0,
"total": 2
},
"roles": [
{
"label": "Artist",
"roleid": 1
},
{
"label": "Composer",
"roleid": 2
}
]
}
}
Posts: 6
Joined: Dec 2014
Reputation:
0
Thanks ,
How can I retrieve list of all "Composers" Labels and then retrieve "AudioLibrary.GetArtists" filtered by specific composer label or id ?
Posts: 4,545
Joined: Jun 2015
Reputation:
269
I'm having difficulty understanding what you want to achieve.
If by " list of all Composers Labels" you mean their names then use the request I gave previously.
Use Audiolibrary.GetArtistDetails to get the infromation about a single artist (that could be a composer), although you can get the same details for many artists with one call using Audiolibrary.GetArtists.
Composers are not something separate from artists, a subset of artists are composers, "composer" is a role that some artists contribute to the music
Posts: 6
Joined: Dec 2014
Reputation:
0
Can I query list off all composers name from local music library ?
Then , Can I show the artists list name or alums list name filtered by specific composer name
For example:
Composers list:
Johann Sebastian Bach --> all songs sorted by albums name or artist name
Wolfgang Amadeus Mozart --> all songs sorted by albums name or artist name
Posts: 6
Joined: Dec 2014
Reputation:
0
Dave ,
Thank's for your help !
Posts: 1
Joined: Jan 2024
Reputation:
0
Hi,
The following request works perfectly :
{"jsonrpc": "2.0", "id": 1, "method": "AudioLibrary.GetSongs", "params":{ "filter": {"artist": "Wolfgang Amadeus Mozart", "role":"composer"}, "properties": ["title", ...] }}
But when I try to combine it with another condition using boolean "and", it fails :
{"jsonrpc": "2.0", "id": 1, "method": "AudioLibrary.GetSongs", "params":{ "filter": {"and": [{"artist": "Wolfgang Amadeus Mozart", "role": "composer"}, {"field": "title", "operator": "contains", "value": "symphony"}]}, "properties": ["title", ...] }}
Yet I already used successfully the "and" / "or" syntax with "field" conditions...
Is it normal ? Is there a way to achieve what I need ?
Thank you very much in advance