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

Paul Harrison mythtv at dsl.pipex.com
Fri Dec 21 20:19:55 UTC 2007


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.


More information about the mythtv-dev mailing list