How can I recover ambumid of a selected album.
#1
Hi,

I wonder if it is possible to recover the ALBUMID of a particular album.
For example, in the music menu I selected the band AC / DC and chose the High Voltage album. It is possible to recover that ID within the album with JSON-RPC without being playing music?

Thanks
Reply
#2
If what you mean by "the music menu" you mean the current audio playlist, then yes, you can extract all sorts of info from your library using the Playlist.GetItems method.
Specifically any item that is valid to audio items listed in the API under List.Item.Base. which includes 'albumid'
try:
{"jsonrpc":"2.0","method":"Playlist.GetItems","params":{"playlistid":0,"properties":["albumid"]},"id":1}


fwiw, i really think playlistid should have been type enum string,
Reply
#3
If you are talking about the album id of the album currently being highlighted in the GUI there's no simply way to do it. You can try to retrieve the label through XBMC.GetInfoLabels and then call AudioLibrary.GetAlbums with a filter on the album name but if you have multiple albums with the same name (from different artists) you've lost.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#4
Hi axa88,

I tried using the parameters reported to recover oalbumid but the return was not found.
I do not know if something was wrong because I am trying to perform this action by Voxcommando.

(2015-07-16, 03:58)axa88 Wrote: If what you mean by "the music menu" you mean the current audio playlist, then yes, you can extract all sorts of info from your library using the Playlist.GetItems method.
Specifically any item that is valid to audio items listed in the API under List.Item.Base. which includes 'albumid'
try:
{"jsonrpc":"2.0","method":"Playlist.GetItems","params":{"playlistid":0,"properties":["albumid"]},"id":1}


fwiw, i really think playlistid should have been type enum string,
Reply
#5
Hi Montellese,

What parameter should I use this case to retrieve the album's name?

(2015-07-16, 07:44)Montellese Wrote: If you are talking about the album id of the album currently being highlighted in the GUI there's no simply way to do it. You can try to retrieve the label through XBMC.GetInfoLabels and then call AudioLibrary.GetAlbums with a filter on the album name but if you have multiple albums with the same name (from different artists) you've lost.
Reply
#6
I imagine I would need to know something about this Voxcommando to give a definitive answer.
But at any point, if the media you are interested in interrogating is indeed your current playlist (audio playlist queue), and Voxcommando gives you access to the JsonRpcAPI, you can inspect the audio queue using the method I specified.
If what you want to get at is just being browsed on the UI, is not added to the audio playlist queue or not part of your Audio Library otherwise, you would need a more roundabout way to get at it as Montellese suggests.
good luck

(2015-07-17, 15:00)mparadiso Wrote: Hi axa88,

I tried using the parameters reported to recover oalbumid but the return was not found.
I do not know if something was wrong because I am trying to perform this action by Voxcommando.

(2015-07-16, 03:58)axa88 Wrote: If what you mean by "the music menu" you mean the current audio playlist, then yes, you can extract all sorts of info from your library using the Playlist.GetItems method.
Specifically any item that is valid to audio items listed in the API under List.Item.Base. which includes 'albumid'
try:
{"jsonrpc":"2.0","method":"Playlist.GetItems","params":{"playlistid":0,"properties":["albumid"]},"id":1}


fwiw, i really think playlistid should have been type enum string,
Reply

Logout Mark Read Team Forum Stats Members Help
How can I recover ambumid of a selected album.0