Duplicates that won't disappear after cleaning library
#1
Hello,
I have a Synology NAS where recently, I've swapped my old 1TB drives to new and shiny 3TB. I had two locations for my anime series on two different volumes named Anime and Anime2. After swapping the drives, I got rid of the second path and put everything into volume4/Anime. I've also changed sources and deleted non existing ones. The problem is, that some shows have duplicates episodes in it. Every episode of a show is listed twice, but after checking file info, it looks like one is on a path volume4/Anime and the other on volume4/Anime2. As I don't have volume4/Anime2 anymore I did "clean library" but that didn't do anything. My duplicates are still present. The best part is that, I can play both files. This looks like XBMC mistakes Anime and Anime2 into the same source. I don't know how this is possible.

My setup:
all files on Synology NAS
library is kept on SQL database on the same NAS
I'm using XBMC on my PC and RaspberryPi

What can I do to get rid of those duplicates?
Reply
#2
There's probable a few ways.. But the one I use is..
Use phpmyadmin and manually delete the duplicate entries in the MySQL video database.
This Fix's it quick smart..

You can sort the database with source then do a Wipe of all those entries referenced to the old source...
Reply
#3
Ok. I did like you said. I've located old paths in "path" table. After launching xbmc duplicates disappeared. Thanks. Should I worry about any other table where those old entries might be?
Reply
#4
Just check your sources file if you have it on multiple devices..also I found that by turning of auto scan library on other devices saves me from having to do it again as that seems to be where I run into problems.
Reply
#5
I have the same sources on both devices. I have manually edited them and got rid of old paths. Auto scan is disabled all the time as Pi takes a lot of time to scan so I manually scan library on my PC. I have found some more entries in other tables and deleted them. So far it's ok. Thank you for your help!
Reply
#6
I had a similar problem a couple of days ago (lastest Raspbmc) where I changed my SMB source from hostname to IP address by going into the source and editing the path, eg from:

smb://mac-mini/VIDEO1/Video/Movies

to

smb://192.168.0.6/VIDEO1/Video/Movies

It's the same server with the exact same files on it, just accessing it by IP address instead of hostname. After editing the source (still only one source present) and scanning the Library everything is duplicated, and there is no easy way to get rid of the duplicate entries that were part of the original source path. (Clean library doesn't remove them)

It seems to be a bug such that when a source is EDITED instead of DELETED, all of the library entries for the "OLD" source are orphaned and retained and at the same time the edited source is treated as a "NEW" source which will scan for new "unique" entries which are actually duplicates of the old one. Although I haven't tested it, I suspect that DELETING the old source then adding the modified path as a new source (instead of editing the existing source) would avoid this problem, and that's what I'll do next time.

In the end I just deleted the MyVideos75.db database file and ran a fresh library scan as I didn't have time to delve into what went wrong. I've run into this problem a couple of times before when I was first starting out with XBMC and didn't really understand how the Library worked, now I'm more familiar with XBMC its clear its a bug so hopefully it's fixed in Gotham! (Haven't had a chance to check)
Kodi 18.3 - Mid 2007 Mac Mini, 4GB, 2TB HD, Windows 7 SP1
Kodi 18.3 - Vero4k, Raspberry Pi 2. OSMC.
Reply
#7
That makes perfect sense. Looks like that the way to go is to do everything from xbmc instead of doing it manually in XML files. If I ever swap more disks in my synology I will try and confirm that. Well it doesn't look like it would happen in the near future but I'll try and remember that. One never know when the space on the rest of the disks will finish Smile

Thanks for sharing your case.
Reply
#8
(2014-02-27, 16:09)JeDaj Wrote: That makes perfect sense. Looks like that the way to go is to do everything from xbmc instead of doing it manually in XML files. If I ever swap more disks in my synology I will try and confirm that. Well it doesn't look like it would happen in the near future but I'll try and remember that. One never know when the space on the rest of the disks will finish Smile

Thanks for sharing your case.

To be clear when I say I edited the source - I did so through the GUI not directly editing XML files, but I think the effect is probably the same - a "new" source is seen but without entries belonging to the "old" source being removed properly from the database. If you are manually editing XML files to edit sources its probably best to first delete the source using the GUI and say yes to removing files from the Library that belonged to that source. Then add the modified version of the source back into your XML file or through the GUI.

Either way it seems that only when a source is deleted (not edited) through the GUI is the database properly cleaned up to remove old entries.
Kodi 18.3 - Mid 2007 Mac Mini, 4GB, 2TB HD, Windows 7 SP1
Kodi 18.3 - Vero4k, Raspberry Pi 2. OSMC.
Reply
#9
When you "set content" on a source then that source path is added to the database, and the file source is not really looked at anymore. There are some triggers that will update the database path, such as deleting a source and saying "yes" to the dialog box that pops up, but it's very easy for orphaned sources to exist in the DB that don't show in the GUI. I hope one day that this can be changed, because it's a very clunky way to manage the database paths. There's a separation between file sources and library sources.
Reply
#10
My duplicates seem to come about by that naming convention to..
IP address verses the NAS network name.
Thus the duplicates appear.
I haven't had the ATV1200 hooked up to the bedroom network as yet to test it since I have upgraded to the Gotham builds..but will have a play over the coming weeks and see what happens.
But as said...by turning off auto lib updates on the "Save Clients" seems to cut it down for me..(on 12.0 builds)..
Reply
#11
i had the same problem
started off with a path containing an ip-- single entry
edited to network name---dupe entries
removed network name source-- single entry (edited path with ip assumed to be a ghost )

so i now have invisible sources that get scanned

recreated net name source and "exclude(d) path from library updates" ---- ghost ip path still updated- single entry

recreated ip path source and "removed"----- zero entries
recreated net name path----single entry

not gotham

all is well
the rift repaired
the universe is whole once again
Reply

Logout Mark Read Team Forum Stats Members Help
Duplicates that won't disappear after cleaning library0