jlficken 3 Posted May 25, 2023 Posted May 25, 2023 Is this possible? I see lots of records that I no longer have the media for and I'm having issues with the Statistics plugin and I'm trying to narrow it down.
Luke 42083 Posted May 25, 2023 Posted May 25, 2023 Hi, normally the server will clean this up for you automatically during library scans, but if you've had this database for a while, then there's always the chance you may have stuff dangling if there were defects in older versions of the server causing it. Before you can delete from mediaitems you'll need to delete from other tables due to foreign keys. Just try to delete and you'll see what I mean in the error message.
jlficken 3 Posted May 25, 2023 Author Posted May 25, 2023 Just now, Luke said: Hi, normally the server will clean this up for you automatically during library scans, but if you've had this database for a while, then there's always the chance you may have stuff dangling if there were defects in older versions of the server causing it. Before you can delete from mediaitems you'll need to delete from other tables due to foreign keys. Just try to delete and you'll see what I mean in the error message. Yeah I see the foreign key constraint errors when I tried to delete certain records. In looking through the tables in Library.db it apperas that it doesn't actually keep track of what's been played, correct? That appears to be in playback_reporting.db unless that's specifically for the plugin of the same name? If the above is true could I just delete the Library.db file and have it be recreated?
Luke 42083 Posted May 25, 2023 Posted May 25, 2023 That's in the userdatas table. playback_reporting is a from a plugin and not part of the emby server core. Quote If the above is true could I just delete the Library.db file and have it be recreated? No, it's all together. 1
jlficken 3 Posted May 25, 2023 Author Posted May 25, 2023 7 minutes ago, Luke said: That's in the userdatas table. playback_reporting is a from a plugin and not part of the emby server core. No, it's all together. I wondered about that. I gave it a go anyway and deleted Library.db, however, the Emby Statistics plugin task still fails so I just restored the backup of Library.db and will continue to see if I can figure out the issue. Thanks for your help! 1
jlficken 3 Posted May 26, 2023 Author Posted May 26, 2023 I have been able to confirm that deleting media from a share and performing a Library scan doesn't remove the item from MediaItems. Any thoughts as to why that might be?
Luke 42083 Posted May 26, 2023 Posted May 26, 2023 1 minute ago, jlficken said: I have been able to confirm that deleting media from a share and performing a Library scan doesn't remove the item from MediaItems. Any thoughts as to why that might be? We'd have to look at a specific example: How to Report a Problem Thanks.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now