SetSongDetails and genre
#1
I'm trying to update my webinterface addon for Gotham. I'm having a lot of trouble with SetSongDetails and the genre. It seems that with Frodo, genres were passed around as arrays of strings. Now they seem to be numeric IDs, although I'm not sure how you would introduce a new genre unless you can pass a string.

I'm trying to pass my genre value as an array of strings. I get an OK result from the JSON-RPC server, but the genre value doesn't change; when I use GetSongDetails on the same song later, I get the original genre.

Below are the parameters I'm passing to SetSongDetails. Any ideas why this is failing?

I've scoured the web for other examples of calls to SetSongDetails; I must be one of the very few devs using it.

Code:
{
  id: 11
  jsonrpc: "2.0"
  method: "AudioLibrary.SetSongDetails"
  params: [32584, California Love, [2Pac], [2Pac], [Hip-Hop], null, 0, , null, null, null, ]
    0: 32584
    1: "California Love"
    2: [2Pac]
      0: "2Pac"
    3: [2Pac]
      0: "2Pac"
    4: [Hip-Hop]
      0: "Hip-Hop"
    5: null
    6: 0
    7: ""
    8: null
    9: null
    10: null
    11: ""
}
Reply
#2
It appears that the genres should be passed as strings, based on my reading of the schema.

Digging deeper, it seems that SetSongDetails calls the underlying CMusicDatabase::UpdateSong(). That function updates the song.strGenres column, but it does nothing with the genre table or the song_genre table.

Changes in May of 2013 broke UpdateSong(). I've filed a ticket here:

http://trac.xbmc.org/ticket/15247
Reply
#3
SetSongDetails also does not handle artists properly.

Anyone been using trying to use this function to update genre or artist?
Reply
#4
Finally got around to fixing the issues in SetSongDetails() see https://github.com/xbmc/xbmc/pull/13051
Reply

Logout Mark Read Team Forum Stats Members Help
SetSongDetails and genre0