Posts: 42
Joined: Feb 2015
Reputation:
3
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
Posts: 146
Joined: Mar 2015
Reputation:
6
axa88
Senior Member
Posts: 146
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,
Posts: 5,184
Joined: Jan 2009
Reputation:
131
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.