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 haven't reviewed the code but given that he did the initial music library
I have a feeling he knows how to code it proper :)

So please make a PR and I'll try find some time to review it and if so pull
to I*

On Wed, Dec 10, 2014 at 10:26 AM, Tolriq <notifications@github.com> wrote:

> In xbmc/interfaces/json-rpc/AudioLibrary.cpp
> <https://github.com/xbmc/xbmc/pull/5906#discussion-diff-21591627>:
>
> > @@ -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();
>
> Thanks, if there's no clear objection about how spiff handled this I may
> try to do that later (I now this is a 100 times discussion but a principle
> validation before I loose time working on that would be great ;) )
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/xbmc/xbmc/pull/5906/files#r21591627>.
>