Jump to content

Duplicate entry in DB


blap
Go to solution Solved by Luke,

Recommended Posts

Hi !

I encountering a problem in emby.

In a search, Actor page ( or genre, or any detail ) even in resume section i have a lot of duplicate entry. 

I haven't any duplicate movie 

i send many exemple with Harry potter saga, but it's the same with a lot of another movie.

Is there any solution ?

i've try DB cleanup unsuccesfully.

My serveur is on windows 10, up to date ( 4.7.14.0 )
The movie Library had 2 distinct folder.
Each movie file has its own folder.

crB8ysMOac.png

fOyqWUDx5P.png

hWRPfnYUnE.png

Po8eYzshTD.png

UOFMrJaQQx.png

Link to comment
Share on other sites

Hi, what you could try is moving all harry potter content out of your library, then run a scan of all libraries, wait for it to finish, and then add it back. Please let us know if this helps. Thanks.

Link to comment
Share on other sites

i'll try, and i'm sure this will work. I have lots of other examples.

I can't do this for all the media. I'me very attached to the "added date" of my movie library.

My test

I've moved the folder that contain the film and refresh the database. One of the entry disappeared, but 3 stay. I can't play any of this entry.

When i add the folder back and refresh the db, i have 4 entry again

yJQXEzeRDn.png

Link to comment
Share on other sites

What is the path shown for those? Is the same identical path shown for every one?

You can find the path under the "Media Info" at the bottom of each items detail page. Can you show us what those paths are? Have you nested libraries?

Link to comment
Share on other sites

It's the same path for all t he four entry.

A difference, however, after the moving / re-add action, the 3 extra entry only contain the path and no audio / video / subtittle information 

K3TGm8eltL.png

15lfZRDRGL.png

Edited by blap
Link to comment
Share on other sites

\\HP_BLAP\Raid5\Films\Film HD ok\ appears to be a nested directory. Now how you add this to Emby will matter. How did you add this to your library?

1) You added the path \\HP_BLAP\Raid5\Films\ to your library by itself.

2) You added all the directories from your films as in below:
\\HP_BLAP\Raid5\Films\Film HD ok\ and \\HP_BLAP\Raid5\Films\Film SD ok\ and all the rest of the directories inside \films\ themselves. But did not add the \films\ directory itself since it is the parent directory and no movies are contained inside that directory at that level.

3) Some form of both 1 and 2. Since the \films\ directory also has loose files in it and isn't quite a parent directory but a nested one.

Which number above matches how you built your movie library?

Edited by speechles
Link to comment
Share on other sites

There isn't any nested directory, the path is

"\\HP_BLAP\Raid5\Films\Film HD ok\" and "Z:\films\" was another mounted folder

 

edit: this library exist from near 4 years now

8ecTeqOkgj.png

Edited by blap
Link to comment
Share on other sites

After a search with the "Reports" plugin, i found all of the duplicate entry ( different ID)

( i have 2485 entry for 1483 entry without duplicate )

gIV26quflZ.png

Edited by blap
Link to comment
Share on other sites

Hmm.. Is it just your movies giving you grief with multiple entries?

You can try using this plugin. It will group the movies by version. Scan your library and afterwards this plugin will group your movies by ID and then create a single entry for each. It will combine the entries into the version drop down. This can help. But I do not see a root cause for these multiple entries. I personally use this plugin as it makes it dead simple to find a movie. Then find the version you want. Then go. At least until we find the cause this could be a remedy until then.

Maybe those without media information will not show on the version menu picker? Cross your fingers.

Edited by speechles
Link to comment
Share on other sites

Yes, it's only for movies.

In the navigation "folder" , there isn't any duplicate. It's only with a search or another detailed view.

I already use the grouping function, but manually. Here, i don't want multiple version ( see attach exemple ).

Is there any sql manual request that i can execute to delete all duplicate entry ( base on named  column ) ?

timZDhmci7.png

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Solution

Try removing the watch history plugin. Then restart the server, run the refresh internet channels scheduled task, and then see how things compare.

  • Agree 1
Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...
ophirf15

Sorry to revive an old topic. I have a fresh install of Emby without the mentioned plugin. I am having the same issue.

It seems that it is creating an entry for each folder and then for the movie file separately. Any help will be super appreciated.

Screenshots are below as well as my log.

Thank you!!

 

Screenshot 2024-02-27 172610.png

Screenshot 2024-02-27 172652.png

embyserver.txt

Link to comment
Share on other sites

3 minutes ago, ophirf15 said:

Sorry to revive an old topic. I have a fresh install of Emby without the mentioned plugin. I am having the same issue.

It seems that it is creating an entry for each folder and then for the movie file separately. Any help will be super appreciated.

Screenshots are below as well as my log.

Thank you!!

 

Screenshot 2024-02-27 172610.png

Screenshot 2024-02-27 172652.png

embyserver.txt 57.63 kB · 0 downloads

Hi, the folder entry being created is normal, but what's not normal is the screen above showing both next to each other. What screen is that?

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...
ophirf15

Hi Luke. The screen showing both was just to main movies library page. I found  the cause and a little workaround for this issue although I don't think it's a permanent fix. My library location is set to D:/Emby/movies/movie_name.

When movies are added, they are first temporarily saved to the root of D:/ and then copied over to the correct Emby folder. So while I didn't at first mind having the file duplicates on my drive.. it was confusing that Emby picked it up when it should only be indexing the Emby library folder and not the entire drive.

The fix was to manually go through and delete the temp files in the root of D:/ and refresh the index.

Thanks!

Link to comment
Share on other sites

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