Duplicate movies in XBMC

      2 Comments on Duplicate movies in XBMC

Duplicate movies in XBMC

Example showing duplicate movies in XBMC

Recently I started noticing that every now and then I had duplicate movies in XBMC. Just like that, after downloading a movie or a new episode of a TV show it would be listed twice, and with (almost) exactly the same details. The first couple of times I noticed the duplicate movies in XBMC I ignored them, who cares, I am just going to watch the show and that’s it. But unfortunately my mind does not work that way… It started to annoy me more and more, so today I started searching the web.

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:

ls -a

Next just remove all ._ files in that directory:

rm ./._*

Or if you are lazy / confident you can just delete all ._ files on the remote folder recursively:

find . -name '._*' -type f -delete

After all the files are gone just navigate to System/Video and tap “Clean library…” on your XBMC and you should be clean of all duplicates again.
Hidden ._ file on your XBMCRemoving the hidden ._ files from your XBMC

2 thoughts on “Duplicate movies in XBMC

Comments are closed.