ChuckPa / PlexDBRepair

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

Feature Request: Clear Watch States #169

Closed brettpetch closed 2 months ago

brettpetch commented 3 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 2 months ago

why not delete the DB and start over ?

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

ChuckPa commented 2 months ago

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