Jump to content

Playback reporting plug-in: deleting data


Florian2000
Go to solution Solved by TeamB,

Recommended Posts

Florian2000

Hi,

I find this plug-in pretty useful and cool!
The only thing I'm missing if it is possible to delete some data from the database? e.g. specific dates or titles or users. I found it is possible to delete users if they are deleted by emby and therefore are non-existing anymore.
If yes, how can I do this?

@TeamB

Thank you!

Br, Florian

Edited by Florian2000
Link to comment
Share on other sites

  • Solution
TeamB
9 hours ago, Florian2000 said:


The only thing I'm missing if it is possible to delete some data from the database? e.g. specific dates or titles or users.

You can, you can edit the data in any way you want in the Query tab using SQL.

BE CAREFUL SQL DELETE IS DESTRUCTIVE. TAKE A BACKUP OF YOUR PLAYBACK REPORTING DATA FIRST.

You can SELECT | UPDATE | DELETE any data using SQL, in the following query insert the user ID and run the query:

DELETE
FROM PlaybackActivity
WHERE UserId = '<user ID here>'

a user id looks like this : 90cf0e7bd88d458ba3d4a15eafcd9b43

You can get all your user ID using the following query, make sure you check the box "Replace UserId with UserName" this will replace the first UserId with the actual user name for reference.

SELECT UserId, UserId
FROM PlaybackActivity
GROUP BY UserId

This is not reversible, It is recommended you take a backup of your data first.

Same goes for date or any other data you want to remove.

SELECT *
FROM PlaybackActivity
WHERE DateCreated >= '2021-10-26 00:00:00' AND DateCreated <= '2021-10-26 23:59:59'

once you have your WHERE correct and it is covering the data you need then to do the deleting use the DELETE action:

DELETE
FROM PlaybackActivity
WHERE DateCreated >= '2021-10-26 00:00:00' AND DateCreated <= '2021-10-26 23:59:59'

 

 

Edited by TeamB
  • Agree 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...