ChuckPa / PlexDBRepair

Database repair utility for Plex Media Server databases
Other
885 stars 43 forks source link

Feature Request: Clear Watch States #169

Closed brettpetch closed 4 months ago

brettpetch commented 4 months ago

As an additional function to pair with watch state importing, watch state clearing could also be beneficial if someone wanted to give the db a good cleaning. Bash below. Can follow-up later with a PR.

"Plex SQLite" com.plexapp.plugins.library.db "DELETE FROM statistics_resources"
"Plex SQLite" com.plexapp.plugins.library.db "DELETE FROM statistics_media"
"Plex SQLite" com.plexapp.plugins.library.db "DELETE FROM statistics_bandwidth"
"Plex SQLite" com.plexapp.plugins.library.db "DELETE FROM metadata_item_views"
"Plex SQLite" com.plexapp.plugins.library.db "DELETE FROM metadata_item_accounts"
"Plex SQLite" com.plexapp.plugins.library.db "DELETE FROM accounts"
ChuckPa commented 4 months ago

why not delete the DB and start over ?

Also, this won't address what's in the cloud (Plex.tv)

ChuckPa commented 4 months ago

Will consider how to implement less destructively. Closing this issue.