mediagoblin-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GMG-Devel] Plugin for page view counter


From: Tiberiu C. Turbureanu
Subject: Re: [GMG-Devel] Plugin for page view counter
Date: Sun, 13 Jan 2013 15:41:28 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 08.01.2013 01:35, Christopher Allan Webber wrote:
>I know that there can be data races when a media file is played by
>multiple users. I am happy to hear from you if Python has some atomic
>increment for its storage abstraction.
We're using SQLAlchemy, and through that you should be able to make use
of the underlying sql incrementing tools.  There's some useful data
here:

http://stackoverflow.com/questions/2334824/how-to-increase-a-counter-in-sqlalchemy


Thanks for the pointer, Chris!

I need a way to increment the view counter only when the media file is loaded. How can I achieve this?

Also, Sebastian Spaeth told me that at the moment there is no way for a plugin to alter the template of the media page, but a hook mechanism is being discussed. That why until the implementation is ready, I think I will go for a new page under a route like this /u/<string:user>/m/<string:media>/viewcount.

--
Tiberiu C. Turbureanu
Președinte, Fundația Ceata
Calea Călărași nr. 57, ap. 2, București
Secretariat: +40-761-810-100
Susții libertatea artelor și tehnologiilor?
Înscrie-te ca membru! (http://ceata.org/inscrieri)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]