Reset 'Times Played' counter

Need help? Post your questions here.

Moderator: moderators

Reset 'Times Played' counter

Postby Hekkie » Fri Sep 28, 2012 8:27 am

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!
Hekkie
 
Posts: 9
Joined: Thu Mar 10, 2011 12:04 pm

Re: Reset 'Times Played' counter

Postby BKKKPewsey » Fri Sep 28, 2012 8:06 pm

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:
Everyone is entitled to be stupid, Image but some abuse the privilege!

Due to the confusion from too many genres of music, we have decided to put both country music and rap music into the genre of Crap music.
User avatar
BKKKPewsey
 
Posts: 2080
Joined: Mon May 23, 2011 12:16 pm
Location: United Kingdom

Re: Reset 'Times Played' counter

Postby Hekkie » Fri Sep 28, 2012 9:03 pm

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.
Hekkie
 
Posts: 9
Joined: Thu Mar 10, 2011 12:04 pm

Re: Reset 'Times Played' counter

Postby BKKKPewsey » Fri Sep 28, 2012 10:19 pm

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:
Everyone is entitled to be stupid, Image but some abuse the privilege!

Due to the confusion from too many genres of music, we have decided to put both country music and rap music into the genre of Crap music.
User avatar
BKKKPewsey
 
Posts: 2080
Joined: Mon May 23, 2011 12:16 pm
Location: United Kingdom

Re: Reset 'Times Played' counter

Postby bushman4 » Mon Oct 01, 2012 2:03 pm

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
Glenn Sullivan
Subsonic 6.1.6 (Unraid Docker)
90 regular Subsonic Users

Library as of 2024-10-28:
4,527 artists
19,996 albums
282,151 songs
10201.40 GB
41,583 hours
User avatar
bushman4
 
Posts: 875
Joined: Thu Dec 02, 2010 1:47 pm
Location: Massachusetts, USA

Re: Reset 'Times Played' counter

Postby Hekkie » Mon Oct 01, 2012 2:06 pm

That's Great! Thanks for this useful info. Solves my problem!
Hekkie
 
Posts: 9
Joined: Thu Mar 10, 2011 12:04 pm

Re: Reset 'Times Played' counter

Postby BKKKPewsey » Mon Oct 01, 2012 2:54 pm

Cheers Glenn :D
So my guess was correct :wink:
Everyone is entitled to be stupid, Image but some abuse the privilege!

Due to the confusion from too many genres of music, we have decided to put both country music and rap music into the genre of Crap music.
User avatar
BKKKPewsey
 
Posts: 2080
Joined: Mon May 23, 2011 12:16 pm
Location: United Kingdom


Return to Help

Who is online

Users browsing this forum: No registered users and 30 guests