Kodi Community Forum

Full Version: Moving file causes duplicate in library
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
I have several folders that contain files which I have added to my movie library in XBMC. These folders are in a constant state of flux as movies are added, deleted, or moved. When I move a file from one folder to another and instruct XBMC to "Scan for new content" in each folder I end up with duplicates in my library (one at the old path and one at the new path - even though the old path is no longer valid). It seems that XBMC does not detect when a file is removed during "Scan for new content".
Because it's only 'scanning for new content' and not 'cleaning the library'.
What's the difference? It seems that "Scan for new content" should be able to detect missing files as easily as new files. How do you "clean the library"? I don't see that in the context menu.
Settings > Video > Clean Library.
System - Settings - Video - Library - Clean Library. That should remove dupes.

Bonus points for adding the following to your advancedsettings.xml

Code:
<videolibrary>
    <cleanonupdate>true</cleanonupdate>
</videolibrary>

After XBMC updates your library,it will automatically clean it of any invalid entries that don't exist anymore.
This doesn't work for me anymore. RC3 with latest Aeon Nox.

Any idea if the advancedsettings.xml setting changed?
(2013-01-06, 20:01)helta Wrote: [ -> ]System - Settings - Video - Library - Clean Library. That should remove dupes.

Bonus points for adding the following to your advancedsettings.xml

Code:
<videolibrary>
    <cleanonupdate>true</cleanonupdate>
</videolibrary>

After XBMC updates your library,it will automatically clean it of any invalid entries that don't exist anymore.

I may have to try adding that.

I'm finally to the point where I'm mostly just adding to the library and don't really need to change or move files. Smile


I'm on RC2 and it works just fine. You sure your XML is correct?
(2013-01-06, 20:01)helta Wrote: [ -> ]System - Settings - Video - Library - Clean Library. That should remove dupes.

Bonus points for adding the following to your advancedsettings.xml

Code:
<videolibrary>
    <cleanonupdate>true</cleanonupdate>
</videolibrary>

After XBMC updates your library,it will automatically clean it of any invalid entries that don't exist anymore.

<cleanonupdate>true</cleanonupdate> <!-- default set to false to prevent xbmc from removing items from the database while updating. -->

If its broken on RC3 pls confirm.

uNi
My advancedsettings.xml is located in c:\Users\MYACCOUNT\AppData\Roaming\XBMC\userdata and contains just this:

<advancedsettings>
<videolibrary>
<cleanonupdate>true</cleanonupdate>
</videolibrary>
</advancedsettings>

Movies that are no longer physically present on the disk don't get removed. When I play them I get the expected error message that it's gone and if I want to remove it. Movies are located on an nfs share with each movie in its own folder if that matters. New movies and other library changes are picked up just fine.

I'm running on a fresh install of RC3 and a clean install of Aeon Nox. Also had the problem in RC2. Not sure about 1.
try default skin...

uNi
any chance you delete the movie file, but leave the folder?
Wasn't this removed to stop the library cleaning entire drives if they weren't connected at the time?
@helta: Entire folder is gone.
@Hitcher: It's off by default to stop exactly that as far as I know. That's why one turns it on manually via advancedsettings, unless it was removed completely in Frodo?
@uNi: I'll try but I don't see how the skin could interfere in basic XBMC functions.
I'm running Frodo RC3 (default skin) and I tried adding anahka2309's advancedsettings.xml and it seemed to work for me. Files were correctly added *and* removed when I did either of the following:

1) Go to Videos->Files, select my folder, press "c", and select "Scan for new content"
2) Go to Movies, select the thumbnail for any file, press "c", and select "Update library"

I still think it's a bit confusing to have multiple ways to perform the same action. Also, each method requires pulling up the context menu which requires the "c" key (and no such key exists on an MCE remote). Regarding the reasoning behind disabling the "cleanonupdate" feature by default: wouldn't it be better to just check if the folder is present before cleaning all the files from it?
Pages: 1 2 3