Well, I am glad I can now say I found what was causing the duplicate movies in XBMC for me. There were plenty of Google search results on the topic, but none of them seemed to apply to my situation. In the end it, of course, turned out to be much simpler than all those issues shown to me in Google. So simple as well as specific that I might just as well be the only one ever experiencing this. A you ready for it?
In my case, the duplicate movies in XBMC were caused by the infamous hidden ._ files OS X loves to generate every now and then. As said my XBMC runs on OpenELEC on my htpc, and every now and then I need to copy a movie or show from my Mac to the htpc. I’m still not entirely sure when it does and when it does not happen, but that copy will at times come with a free extra “._” duplicate of the file which is around 4K in size. The reason is something about different file systems and certain meta information (resource forks called AppleDouble) OS X thinks it absolutely has to copy along, but since the other file system does not support that meta information, it creates the extra file… Blabla… Just as annoying as the .DS_Store files if you ask me.
There are plenty of ways to be found on how to prevent these ._ files from being created, I will leave it to you to pick a method you like. I will only show you how you can fix it once you start noticing duplicate movies in XBMC.
Basically the actions are just to remove the ._ files and then clean your library so XBMC will remove all references to non-existing files.
If you have a keyboard attached to your XBMC than it is probably easiest to just use the file manager and delete the files. But if, like me, you only access your XBMC using a remote app like Constellation it is more convenient to just remove them using the Mac terminal.
Just open up a terminal and navigate to your xbmc share. You can list hidden files using the -a parameter like so:
Next just remove all ._ files in that directory:
Or if you are lazy / confident you can just delete all ._ files on the remote folder recursively:
find . -name '._*' -type f -delete