Duplicate files for TV shows
I have been running XBMC on my Raspberry Pi since Eden. I have all my media on a NAS (12TB QNAP) and nothing has been changed on how I store or access my media. I recently upgraded to Kodi 14.0 Helix and now I see duplicate names in my TV Shows library only, not my Movies. It's not every show that I have this problem. I don't even have this problem with every season within a show. For example, Game of Thrones season 1 shows all ten episodes and their names as it should. Season 2, however, shows duplicates of each episode. There is only one copy of it on my NAS.

Only one of the copies plays. When I look at the file path of each I get the following:

Not working: smb://192.168.1.X:445/Multimedia/TV Shows/Game of Thrones/Season 2/._Game of Thrones - 2x01 - The North Remembers.mkv
Works: smb://192.168.1.X:445/Multimedia/TV Shows/Game of Thrones/Season 2/Game of Thrones - 2x01 - The North Remembers.mkv

As a work around, I've tried wiping both my TV Shows and Movies sources and adding them via different protocols. I used NFS and Samba just for giggles before I reverted back to using Server Message Block which I always have used. I've also used the "Clean Library" option with no results.

Since the only thing that changed was my upgrade from Gotham to the latest and greatest, I was curious as to why it's adding these duplicate files. I've examined the forums here and I saw some solutions to previous versions, but nothing for Kodi.

Any ideas?
Files starting with a "." are considered hidden. Not sure if that's causing your issue, but it's certainly inadvisable to start a file with a ".".
Perhaps report your behaviour here and a dev may be able to explain what's happening.
Do you have a Mac? This looks like OSX which stores info in hidden files.
There are ways to stop OSX to write info files to network shares, but for me it keeps enabling it after every OS update which is frustrating.

To fix this in Kodi you should disable the setting "Show hidden files..." (in Appearance-File Lists) and only enable it when you really need to.
This have always worked for me, however if you already have it disabled there is something else going on.
Miappa - I have always had the hidden files in my settings disabled. I enabled it then disabled it just to see if it was jar anything loose, but no luck. I do have a Mac, but I'm not running Kodi on my Mac, it is running on a Raspberry Pi.

Popcornmix, I will report the behavior to the link you have provided. Thank you both for your input.
Just to make sure; It is not Kodi that are making those hidden info files, it is OSX, so it doesn´t matter if you run Kodi on your Mac or not.
And if you have "Show hidden files..." enabled when scanning, Kodi might pick those up as movies.
Once done there will be duplicates in your library and they will not go away just because you set it to disabled again... you need to do it all again without "Hidden..." enabled.

However, if you are sure that you had it disabled when scanning your library there might be an issue and you should probably do it again with debug mode enabled and provide logs.
I have this same problem and have never enabled "Show hidden files..." It looks like for some reason, Kodi Helix 14.0 has decided to start scanning all the .AppleDouble directories on my system. Now my library is cluttered with garbage entries.
So I enabled debugging and added the Log Uploader and enabled it from Settings>Add-ons>Get Add-ons>Kodi Add-on repository>Program Add-ons>Kodi Log Uploader. From there I went to Programs>Kodi Log Uploader and entered my email. I run the script, but after a second I get the error "Script Failed! : Kodi Log Uploader". I followed the instructions from this video here.

I'll keep banging my head against this for a bit. I'll report back if I find anything new.

Edit: I was able to ssh into the Pi, generate a debug.log, and get a link with the following:
sudo apt-get install pastebinit -y
cat $HOME/.kodi/temp/kodi.log | pastebinit

Here is the link to the log.
(2015-01-05, 01:23)iron.max Wrote: I run the script, but after a second I get the error "Script Failed! : Kodi Log Uploader".

xbmclogs.com is offline.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Same here. Duplicated episode entries. Movies do NOT do this.

-Kodi 14.1 on both OSX and RPi 2.
-completely clean install with fresh Sources.xml
-"Show hidden files" is disabled in Kodi.
-No hidden .files in shows folders (on NAS connected via SMB).

What to do?

EDIT: I'm sorry, there are indeed hidden .files, my file manager just didn't display them even with "Show invisible files" turned on. Anyway, there should be setting in scrapers to just ignore hidden files.
I have a work around. Kodi sees two files. for example:

smb://192.168.1.X:445/Multimedia/TV Shows/Game of Thrones/Season 2/._Game of Thrones - 2x01 - The North Remembers.mkv - Duplicate file
smb://192.168.1.X:445/Multimedia/TV Shows/Game of Thrones/Season 2/Game of Thrones - 2x01 - The North Remembers.mkv - Actual working file

These "._" will NOT show up in your NAS, but they are there. Open up a Terminal window and type the following command:

find /Volumes/<YOUR FILE PATH> -name "._*"

In the example above, I would type find /Volumes/Multimedia -name "._*" for my file location. You will see many ._ files and that is why Kodi sees them as well. In order to get ride of them all in one swoop, all you have to do is run the command:

find /Volumes/<YOUR FILE PATH> -name "._*" -delete

Again, in my case, it would be find /Volumes/Multimedia -name "._*" -delete. If you run the find /Volumes/<YOUR FILE PATH> -name "._*" command once more, you will find all of those pesky ._ files are no longer present.

To also remove them from Kodi, just got to Settings>Videos>Library>Clean Library and you should be good to go.


You MUST run the find /Volumes/<YOUR FILE PATH> -name "._*" -delete command for EVERY time you add something to your NAS. Apple will continue to make these ._ files. Programs like TinkerTool do not stop the creation of the ._ files, only .DS_Store files. It's a bit of a pain in the ass, but thankfully Terminal remembers the cleanup command and so you don't have to remember it. All you have to do is press the "up" arrow on your keyboard when you open a Terminal window and it will appear.

I agree, Kodi should ignore these files, but so far it has not. Maybe an update will fix this.
While the logic of the above few posts are sound (cause of the duplicates being the .AppleDouble files and how to get rid of them), has anyone got to the bottom of why this problem has recent turned up? I too have the problem and I know for a fact the same .AppleDouble files have been gathering for several years.

Definitely seems to be a Kodi 'feature'!

Is this confirmed a bug that will presumably get fixed shortly?

In the meantime we can run scheduled jobs to delete the files etc.
Ticket #15814 has been submitted for this issue.
(2015-02-23, 19:10)iron.max Wrote: Ticket #15814 has been submitted for this issue.

Indeed, with a fix proposed earlier today in fact Smile
Are you referring to that the ticket was made today or that there is an actual fix to the problem? Can you point me to the fix?
http://forum.kodi.tv/showthread.php?tid=204307 has an answer, just tell Kodi not to scan those files.

Also check out the wiki page at Mac_FAQ#Appledouble (wiki)

Logout Mark Read Team Forum Stats Members Help
Duplicate files for TV shows0
This forum uses Lukasz Tkacz MyBB addons.