JSON-RPC: Add playcount to "AudioLibrary.setSongDetails" and scrobble-like options

With addons like chorus for the web interface and yatse as an android application streaming from kodi to our pc/smartphone has become a real fact. I've been a few months guessing how can I simply synchronize my phone playcounts with kodi, just for having some dynamic playlists that really work despite not listening music on my media center. I found nothing.

So after starting to build my own webinterface, I realised that there's no "playcount" in "AudioLibrary.setSongDetails" method. Is there any reason for not adding this option? Because I've seen you can update the playcount on tvshows and movies.

As a second idea (for me it would be perfection), I would propose adding some extra methods to the AudioLibrary in the JSON-RPC api: AudioLibrary.scrobbleSong (maybe album too). These methods simply increase the playcount of the given element and update the lastplayed to the current time.
I think resume on music is just not something anyone coded in. I doubt we
would reject a PR for it.

Re audio book support I think @notspiff have done some work in the area and
if anyone wants to pick out PRS of that I'd be happy :)
Den 10 dec 2014 09:39 skrev "Sascha Montellese" <notifications@github.com>:

> In xbmc/interfaces/json-rpc/AudioLibrary.cpp
> <https://github.com/xbmc/xbmc/pull/5906#discussion-diff-21589727>:
>
> > @@ -508,6 +508,10 @@ JSONRPC_STATUS CAudioLibrary::SetSongDetails(const std::string &method, ITranspo
> >      song.strComment = parameterObject["comment"].asString();
> >    if (ParameterNotNull(parameterObject, "musicbrainztrackid"))
> >      song.strMusicBrainzTrackID = parameterObject["musicbrainztrackid"].asString();
> > +  if (ParameterNotNull(parameterObject, "playcount"))
> > +    song.iTimesPlayed = parameterObject["playcount"].asInteger();
> > +  if (ParameterNotNull(parameterObject, "lastplayed"))
> > +    song.lastPlayed = parameterObject["lastplayed"].asString();
>
> You need to use
>
> song.lastPlayed.SetFromDBDateTime(parameterObject["lastplayed"].asString());
>
> here. Does this even compile right now?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/xbmc/xbmc/pull/5906/files#r21589727>.
>