Page 1 of 1

Reset 'Times Played' counter

PostPosted: Fri Sep 28, 2012 8:27 am
by Hekkie
I'm looking for a way to reset the 'times played' counter on my albums. I've used a xbmc app to play music from my collection but it resulted in an huge count on the albums I've played. So I got a few that have 300.000 times played on them. (wrongly of course). I like the statistic but now it isn't correct anymore so I wonder how I can start with a clean sheet. I like to keep other things like users and preferences. Is this possible?

Thanks!

Re: Reset 'Times Played' counter

PostPosted: Fri Sep 28, 2012 8:06 pm
by BKKKPewsey
Hekkie wrote:I'm looking for a way to reset the 'times played' counter on my albums. I've used a xbmc app to play music from my collection but it resulted in an huge count on the albums I've played.

I assume you are referring to the playcount within SS - if so what what's your SS version?

But as the playcounts are stored in the SS DataBase
I cannot see how playing your media in another player will change that value :?

:mrgreen:

Re: Reset 'Times Played' counter

PostPosted: Fri Sep 28, 2012 9:03 pm
by Hekkie
I'm sorry if I'm not providing enough info. I was using SS 4.6 Linux, I just upgraded to 4.7. But the problem is on both versions. When I select 'most played' I have a few albums with the comment like '315373 times played'. Thats of course not correct. This happened because I tried a subsonic client for XBMC. It played the albums I selected from my SS server. But when I opened SS through a web browser I noticed that the album I just played on my XBMC system wasn't stated as '1 time played' but '100000 times played'. I don't know why, but now I want to reset this counter back to zero. I just don't know how to do that.

Re: Reset 'Times Played' counter

PostPosted: Fri Sep 28, 2012 10:19 pm
by BKKKPewsey
Ok you can use db.view to correct this - however the db seems to have changed with 4.7 final so I am not sure which table to edit.
If any modders out there who knows the 4.7 final db tables if they could advise :?

With 4.6 it used to be music_file_info but now I seem to have play counts in a number of locations :(
(My music_file_info table appears to be empty :shock: )
My best guess is media_file :|

:mrgreen:

Re: Reset 'Times Played' counter

PostPosted: Mon Oct 01, 2012 2:03 pm
by bushman4
in db.view, the following code will clear all play counts:

Code: Select all
Update Media_File set Play_Count=0


You can limit that command if you'd like to... for example, to handle everything that XBMC touched and screwed up:

Code: Select all
Update Media_File set Play_Count=0 where play_count>=100000


HTH,

Glenn

Re: Reset 'Times Played' counter

PostPosted: Mon Oct 01, 2012 2:06 pm
by Hekkie
That's Great! Thanks for this useful info. Solves my problem!

Re: Reset 'Times Played' counter

PostPosted: Mon Oct 01, 2012 2:54 pm
by BKKKPewsey
Cheers Glenn :D
So my guess was correct :wink: