Page 1 of 1

Wrong dates on Recently Played

PostPosted: Sat Jun 16, 2012 1:47 pm
by Rico
I accidentally reset the calendar on the computer I use as my Subsonic server to a date 2 months from now. Subsonic registered the wrong dates for 3 days before I noticed the problem. So now my Recently Played screen lists those albums on top, and I have to scroll down to see my actual Recently Played albums.

Is there any way I can clear Recently Played albums, or fix the dates on the ones that got messed up?

Obviously this is not a huge problem, but some users really do like looking at the Recently Played screen. As it is now, it's confusing to people, and it looks like I don't know what I'm doing (which I don't, clearly).

Re: Wrong dates on Recently Played

PostPosted: Sat Jun 16, 2012 3:11 pm
by BKKKPewsey
You could use db.view to correct the mishap

Find the albums which have the erroneous dates
Code: Select all
Select * from music_file_info where last_played>'2012-06-16'


To change just the wrong ones
Code: Select all
Update music_file_info set last_played='new date' where id=(wrong album id)
eg update music_file_info set last_played='2012-06-16 09:00:00' where ID=5 (or what ever id you need to change)


Note I am not a sql guru so there is a probably a quicker way of batch processing all the affected albums

Re: Wrong dates on Recently Played

PostPosted: Mon Jun 18, 2012 6:48 pm
by bushman4
Combine the two...

Let's say you mistakenly set the date to 8/1/2012, so you want to "remove" all records of anything that was played after 7/31/2012...

First, verify that this list the list that you want to reset:

Code: Select all
Select * from music_file_info where last_played>'2012-07-31'


Then update the "Last Played" date for that list to something 5 years ago or so (essentially the bottom of the last played list):

Code: Select all
Update music_file_info set last_played='2006-01-01 00:00:00' where last_played>'2012-07-31'


I always do the first step to test out my "where" statement before I do the second step and update based upon that where function.

HTH,

Glenn

Re: Wrong dates on Recently Played

PostPosted: Mon Jun 18, 2012 9:18 pm
by BKKKPewsey
Cheers for that Glenn - I suspected as much but I didn't want to screw up me database in testing :lol:

Re: Wrong dates on Recently Played

PostPosted: Thu Jun 28, 2012 2:48 pm
by Rico
Thanks, guys! Glenn, your solution worked like a charm, once I figured out what 'db.view' is. (Sorry, I'm a newb.) But this has really opened up a new world for me.

Re: Wrong dates on Recently Played

PostPosted: Thu Jun 28, 2012 3:33 pm
by BKKKPewsey
I deliberately didn't give any further info, cause within db.view lies demons :twisted:
So if you can understand what's involved its all good but if you don't you can really screw up SS :lol:

:mrgreen: