disphenoid / tapes.fm

Webapp tapes.fm
http://tapes.fm
0 stars 0 forks source link

Tapedeck plays/views #33

Open knarz opened 11 years ago

knarz commented 11 years ago

As far as I can see the plays/views of a tapedeck are currently not tracked.

Keeping track of the total views should be as easy as adding a field to the Tapedeck model and increasing the counter whenever the show route of the tapedeck controller is hit. i.e.

def show
  @tapedeck = Tapedeck.find(params[:id])
  unless @tapedeck.nil?
    @tapedeck.inc(:views, 1) # maybe catch errors
    # and maybe also increase the counter in the stats table
  end
  @tapedeck
end

Counting the plays has to be via the UI/Backbone, checking if the play button has actually been used, no?

disphenoid commented 11 years ago

Right now there is no method to track views or plays.

And we should definitely track plays with backbone. Question is how? Should we build a little .js lib which simply talks to an API Endpoint? But this would depend on UI hooks(bad design?).

knarz commented 11 years ago

Tracking views and plays could be interesting.

Do the actual files get loaded whenever the page is load or just whenever you actually play it? If it were the latter then you could probably just crunch the log files of the servers but the files are stored on s3 anyway, aren't they?

Having some point which receives some data whenever a song is played would be best, I suppose, if there'll be an embedding feature in the future.

disphenoid commented 11 years ago

Late response, sorry... Right now all files are preloaded on visit. But like you said: Its on s3 anyway.

Right now I got no solution other than an ugly way through an API hook?

Tracking Downloads should be possible through the web app#download method?

Could you briefly teach me how the Stats feature is supposed to work? Is there already a web-frontend?

Thanks!