solved Increment the audio file stream count

Nmaster88
Nmaster88
@nmaster88
8 years ago
94 posts
I don't know if this is a good practise but i'm using jPlayer on the site i'm developing to play the musics, and i add them to the player with some code like this:
<a href="" id="addmusictolistprofile" data-id-music="{$item._item_id}" data-title="{$item.audio_title}" data-artist="{$item.audio_file_artist}" data-mp3="{$jamroom_url}/audio/stream/audio_file/{$item._item_id}/key=9RoungsoKcon/file.mp3" data-poster="{$jamroom_url}/audio/image/audio_image/{$item._item_id}/large" class="thumb-sm pull-left m-r-sm" style="flex: 1">
{jrCore_module_function function="jrImage_display" module="jrAudio" type="audio_image" item_id=$item._item_id size="medium" crop="auto" alt=$item.audio_title class="img-audio-list"}

</a>
The music plays on the player but the problem is that it doesn't increment the stream count, how can i do that manually? thanks.
updated by @nmaster88: 09/18/16 04:32:02PM
Nmaster88
Nmaster88
@nmaster88
8 years ago
94 posts
It seems it's only counting for each music only one stream for each user? I want it to count all the time. How can i do that? Thanks
paul
@paul
8 years ago
4,326 posts
Nmaster88:
It seems it's only counting for each music only one stream for each user? I want it to count all the time. How can i do that? Thanks
Unfortunately that is the way Jamroom is designed to work so as to prevent 'gaming' by users. Something custom would be needed to 'listen' for plays and to increment counters separately to the JR play counters.


--
Paul Asher - JR Developer and System Import Specialist
Nmaster88
Nmaster88
@nmaster88
8 years ago
94 posts
I see, like bryan said on another post:
Quote:
That is the correct URL, and it will count the plays, but if you are just refreshing it expecting the play count to go up, it won't - the core keeps track of IP addresses and will only count 1 play for a user even if they keep refreshing the audio (this is done to prevent "gaming" of the play charts).

For testing, you can empty (truncate) the jr_jrcore_count_ip table between plays and it will log a new play.

Hope this helps!
It means i will have to empty that table of database, right?
paul
@paul
8 years ago
4,326 posts
That table holds all module stream and view counts so you would need to just delete the rows pertaining to 'audio_file_stream_count'.


--
Paul Asher - JR Developer and System Import Specialist
Nmaster88
Nmaster88
@nmaster88
8 years ago
94 posts
Ok thanks! I'll leave it as it is, for now xD...

Tags