jkexbx 1 Posted June 20, 2024 Posted June 20, 2024 This is now happening to me. A large amount of TV shows are randomly duplicated. I only have the 2 libraries, no plugins that are known to cause this, and the file paths are identical. I did notice that the metadata is different between the versions.
Luke 42078 Posted June 20, 2024 Posted June 20, 2024 5 hours ago, jkexbx said: This is now happening to me. A large amount of TV shows are randomly duplicated. I only have the 2 libraries, no plugins that are known to cause this, and the file paths are identical. I did notice that the metadata is different between the versions. OK you may want to try removing the tv library altogether and then adding it back.
jkexbx 1 Posted June 22, 2024 Posted June 22, 2024 On 6/21/2024 at 2:05 AM, Luke said: OK you may want to try removing the tv library altogether and then adding it back. Is there any logs that would help troubleshoot? I don't doubt that wiping the library could resolve the duplicates, but I wouldn't really say starting from scratch is fixing it. Is there any way to remove duplicates? Seems odd that this can happen.
Happy2Play 9780 Posted June 22, 2024 Posted June 22, 2024 49 minutes ago, jkexbx said: Is there any logs that would help troubleshoot? I don't doubt that wiping the library could resolve the duplicates, but I wouldn't really say starting from scratch is fixing it. Is there any way to remove duplicates? Seems odd that this can happen. Minus knowing databases and running queries to remove the duplicates you will have to remove the library allow scan to purge the db, and readd.
jkexbx 1 Posted June 24, 2024 Posted June 24, 2024 (edited) On 9/19/2023 at 8:37 PM, blap said: update : I delete two plugins ( Movie Theme Videos and Movie Theme Songs ) cause it's seem to me that the problem had begun at this moment ) i've try to : Stop emby backup my library.db Open the db, with DB Browser for SQLite Select the MediaItems Table find and delete all the duplicate entry restart emby Seem to work But, there is at least 1400 duplicate entry, i can't do it manuelly Any help to have a sql request to delete all duplicate entry ? See the instructions above, and the SQL statement I created to fix this. I can't believe how many other people ran into the same problem, and nobody had a fix for it. select * FROM MediaItems WHERE id NOT IN ( SELECT min(id) FROM MediaItems GROUP BY UserDataKeyId ) AND UserDataKeyId is not NULL 19,277 duplicate rows. PRAGMA foreign_keys = 0; DELETE FROM MediaItems WHERE id NOT IN ( SELECT min(id) FROM MediaItems GROUP BY UserDataKeyId ) AND UserDataKeyId is not NULL; PRAGMA foreign_keys = 1; Please note that there's a foreign key reference I didn't bother to join. A better fix would also clean up this orphan data. Everything looks right, and no apparent issues. Edited June 24, 2024 by jkexbx 1
Luke 42078 Posted June 26, 2024 Posted June 26, 2024 @jkexbxthanks for the investigation. This is likely due to defects in older server versions. I don't think you'd be able to create this situation from scratch on the latest version.
jkexbx 1 Posted June 27, 2024 Posted June 27, 2024 I'm not so sure about that. I'm running 4.8.8.0 and am seeing duplicate database entries still being added. Since Monday, there have been 111 duplicate records. Some only 1 episode, some part of a season. Both movies and TV. These are also not new items I don't remember exactly when I setup this Library, but I would say it's less than 8 months old. Any interest in running the query on your database? It's strange that it's continuing to do it.
Luke 42078 Posted June 27, 2024 Posted June 27, 2024 It's because the parent folders are duplicated, so new content will still get added underneath. But on a new install I don't think that would be possible to happen to begin with.
jkexbx 1 Posted June 27, 2024 Posted June 27, 2024 By parent folder, do you mean the TV show folder? I'll keep watching the report over the next weeks to see how it changes. Some may also be due to improper matches or other anomalies. I'll have to spend some time looking at each duplicate.
Happy2Play 9780 Posted June 27, 2024 Posted June 27, 2024 I can say the query is not necessarily finding duplicate records as all the results it finds in my database are not duplicates. Only looked at a handful of the 2775 records but none of them were duplicated.
Luke 42078 Posted June 27, 2024 Posted June 27, 2024 15 minutes ago, jkexbx said: By parent folder, do you mean the TV show folder? Yes.
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