[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
Re: How best to collect stats for xplrionet play top 10 20 etc
- Subject: Re: How best to collect stats for xplrionet play
top 10 20 etc
- From: "UKHA" <ukha@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 03 Mar 2005 11:08:47 +0100
- References:
<MDAEMON-F200503030845.AA455921md50000214249@beagles-den.demon.co.uk>
Hi Tony,
On 03/03/2005 at 07:50 Tony Tofts wrote:
>Hi all,
>
>I want to modify xplrionet to collect statistics of tracks played to
allow
>the selection of tracks by things like top 10/20/50 etc
>
>To do this it will mean having to have a new table holding:
>
>Date/time played, player used, track id
Personally I'd think about :
Top 10/20/50 tracks played
Top 10/20/50 albums (not whole albums, a track played from an album goes
towards the album score)
Plus a count of each time a track is played. So it may make sense to add a
column eg playcount for each track
eg
main-table = as it is but with checksum field added
play-table = date/time, counter, player-used,checksum
chart-table = track title, track album, checksum
note, no track id in the chart-table since the charts should live through a
purge, ie they should be a permanent chart unless specifically flushed by
the user..although since there's no security on the web pages this means
anyone can do it.
>
>This does have a problem though, e.g. if you purge - the stats are
>meaningless as the track id will almost certainly of changed.
Yup, see above :D
>We could hold the track path/name of course, but the stats table could
get
>horrendously big...
Do you need to hold the path? Since you have the track title and album
title you
could select using both from the db to get the path (regardless of it being
moved about).
This is where the checksum comes in. You calculate it based on the
trackname+albumname+filesize (or similar) this
should pretty much guarentee you are using the correct track from the
correct album (thinking md5sum)
>A way around it is for the purge to make a temporary copy of the tracks
>table, then cross-reference to fix up the stats.
>
>Of course this won't help where the tracks have been relocated, as it
won't
>be possible to match them off.
Which is why I think it'd make sense to ignore the path completely...
>Also, I think when a track is played as part of a top 10/20/50 query it
>probably shouldn't be added to the stats again, as this would top load
the
>most popular songs too much if you only listen to some of them?
Personally, I think any time a track is played it's playcount should be
increased and the chart info generated based on that
>
>Also, how many months stats should be kept?
indefinate... just increase the counter. If a purge takes place then the
chart table still exists and we don;t *add* an entry each time a track gets
played, we just increment it's play counter...
>Any thoughts/comments please?
Make sense? Just my thoughts :D
Andy
xPL Links: http://www.xplproject.org.uk http://www.xplhal.com http://www.xpl.myby.co.uk
To Post a Message: ukha_xpl@xxxxxxx
To Subscribe: ukha_xpl-subscribe@xxxxxxx
To Unsubscribe: ukha_xpl-unsubscribe@xxxxxxx
xPL Main Index |
xPL Thread Index |
xPL Home |
Archives Home
|