[mythtv] Setting lastplay value after a give time/percentage of playback (last.fm script)

Ashley Bostock abostock at gmail.com
Fri Dec 21 20:38:23 UTC 2007


Awesome, thanks for the quick "fix".

The last.fm submittion docs (
http://www.audioscrobbler.net/development/protocol/) say that a track should
only be submitted if...

"The track must have been played for a duration of at least 240
seconds *or*half the track's total length, whichever comes first."

... would it be possible to set it up like that as the default behavior?
Seems like a sensible idea, no?
If you think not then that's fine, I think I can follow your changes enough
to implement that on my personal version.

Thanks again,
Ash

On 21/12/2007, Paul Harrison <mythtv at dsl.pipex.com> wrote:
>
> Ashley Bostock wrote:
> > I've written a quick perl script to get the recently played music
> > tracks out of the database and submit them to my last.fm
> > <http://last.fm> profile.
> > The only problem is that the lastplay value (in the music_songs table)
> > gets set even if the song has only played for 1 second, e.g. played
> > song by mistake.
> >
> > How much work would it be to make it so that the lastplay value
> > doesn't get set until a certain number of seconds or percentage has
> > been played?
> > My c++ skills are pretty minimal but if someone would point me in the
> > right direction of where to start I'd at least have a go.
> >
> > Thanks,
> > Ash
> >
>
> It will now wait until at least 15 seconds have been played before
> updating the both the lastplay and playcount values.
>
> Paul H.
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-dev/attachments/20071221/ee9eccb2/attachment.htm 


More information about the mythtv-dev mailing list