Wrong dates on Recently Played

Need help? Post your questions here.

Moderator: moderators

Wrong dates on Recently Played

Postby Rico » Sat Jun 16, 2012 1:47 pm

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).
Rico
 
Posts: 12
Joined: Fri Oct 28, 2011 1:31 am

Re: Wrong dates on Recently Played

Postby BKKKPewsey » Sat Jun 16, 2012 3:11 pm

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
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: Wrong dates on Recently Played

Postby bushman4 » Mon Jun 18, 2012 6:48 pm

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
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: Wrong dates on Recently Played

Postby BKKKPewsey » Mon Jun 18, 2012 9:18 pm

Cheers for that Glenn - I suspected as much but I didn't want to screw up me database in testing :lol:
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: Wrong dates on Recently Played

Postby Rico » Thu Jun 28, 2012 2:48 pm

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.
Rico
 
Posts: 12
Joined: Fri Oct 28, 2011 1:31 am

Re: Wrong dates on Recently Played

Postby BKKKPewsey » Thu Jun 28, 2012 3:33 pm

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:
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 28 guests