Jump to content

Home Page's Continue Watching displays dupes


Recommended Posts

Posted

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.

image.thumb.png.969196ae030b8fa68b1e823d991a5e82.png

image.thumb.png.a4e28b4bbbef07f130500ca3879c265d.png

image.thumb.png.630ae5e424b1dd2972eeb470a7d70605.png

image.thumb.png.9a0759753a2bfb88085fdab7fb6f1cbe.png

Posted
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.

image.thumb.png.969196ae030b8fa68b1e823d991a5e82.png

image.thumb.png.a4e28b4bbbef07f130500ca3879c265d.png

image.thumb.png.630ae5e424b1dd2972eeb470a7d70605.png

image.thumb.png.9a0759753a2bfb88085fdab7fb6f1cbe.png

OK you may want to try removing the tv library altogether and then adding it back.

Posted
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
Posted
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.

Posted (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 :

  1. Stop emby
  2. backup my library.db
  3. Open the db, with DB Browser for SQLite
  4. Select the MediaItems Table
  5. find and delete all the duplicate entry
  6. restart emby
  7. 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 ?

lhXVOsOOKI.png

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.

image.thumb.png.a0d09d464c02cf15eab458b742be97c3.png

 

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.

image.thumb.png.ecd523a5e06d3d0846bcfc397c57a03c.png

Edited by jkexbx
  • Like 1
Posted

@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.

Posted

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.

image.thumb.png.414cd997c1a468789e68ee9fe06dae5d.pngimage.thumb.png.62f55fe639ad5ae36a1e8b536989eb30.png

Posted

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.

Posted

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
Posted

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.

Posted
15 minutes ago, jkexbx said:

By parent folder, do you mean the TV show folder?

 

Yes.

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...