.nomeda, exclude from scan, all ignored.
#1
This seems like a very odd issue to me.
I have kodi 17, brand new install on ubuntu 16.04.04. Brand new install of both.

For some reason, Kodi.. is not respecting .nomedia files at all. My normal pattern is to create a folder named DONOTSCAN and in those directories I put different versions of a file. For instance I might want a 1080 version picked up by the library, but keep an older 480 version because I like the translation better -- I just only want to show one version in the library/

I have an itty bitty shell script that then adds a .nomedia file to that dir and any subdirectories under it.
Do not scan creator script

So here is a listing of a folder
drwxrwxrwx 1 nobody users 4096 Feb 23 08:12 .
drwxrwxrwx 1 nobody users 25 Feb 23 08:11 ..
-rw-rw-rw- 1 nobody users 0 Feb 23 08:12 .nomedia
-rw-rw-rw- 1 nobody users 237854720 Aug 11 2006 Turn A Gundam - 1x01 - Howling to the Moon..avi
-rw-rw-rw- 1 nobody users 237873152 Aug 11 2006 Turn A Gundam - 1x02 - The Coming Of Age Ceremony.avi
-rw-rw-rw- 1 nobody users 236761088 Aug 11 2006 Turn A Gundam - 1x03 - After The Ceremony.avi

To kodi, that path is : smb://TOWER/UNRAID/Anime/TV Shows/Gundam Collection/Correct Century/Turn A Gundam/DONOTSCAN/Turn A Gundam - 1x01 - Howling to the Moon..avi

However, it does not obey the ".nomedia file"
kodi.log

It clearly shows it do this..
19:21:17.879 T:139737649142144 DEBUG: VideoInfoScanner: Found episode match smb://TOWER/UNRAID/Anime/TV Shows/Gundam Collection/Correct Century/Turn A Gundam/DONOTSCAN/Turn A Gundam - 1x01 - Howling to the Moon..avi (s1e1) [[\\/\._ \[\(-]([0-9]+)x([0-9]+(?Sad?:[a
-i]|\.[1-9])(?![0-9]))?)([^\\/]*)$]

In the past.. I would get a message in the log that it found a .nomedia file so it was skipping this directory.

Oddly to me.. if I set the folder to none, tell it to delete the items... then open the context menu and set the folder to "Exclude from updates" the items come back if I scan. So it doesn't seem to be obeying _any iota_ of the code in itself to ... skip this directory.

I have even created the advancedsettings.xml and inserted this into it, and tested it.. absolutely nothing.

<video>
<excludetvshowsfromscan>
<regexp>[!-._ \\/]DONOTSCAN[-._ \\/]</regexp>
<regexp>[!-._ \\/]sample[-._ \\/]</regexp>
</excludetvshowsfromscan>
<excludefromscan>
<regexp>-trailer</regexp>
<regexp>[!-._ \\/]DONOTSCAN[-._ \\/]</regexp>
<regexp>[!-._ \\/]sample[-._ \\/]</regexp>
</excludefromscan>
</video>

The folders in question have 50 items in there that should scan in, with 50 in the DONOTSCAN areas that should be ignored. Yet upon scan completion I have all 100 items.

I'm kinda baffled.
Any guesses on what I can do here?

Addenum:
After testing some, I was able to delete all these and start over, and see it recognizing nomedia files...

But while it says this:
22:30:32.752 T:139736672990976 WARNING: Skipping item 'smb://TOWER/UNRAID/Anime/TV Shows/Gundam Collection/Correct Century/Turn A Gundam/DONOTSCAN/' with '.nomedia' file in parent directory, it won't be added to the library.

Clearly it is not obeying it:
22:30:30.741 T:139736672990976 DEBUG: GetEpisodeId (smb://TOWER/UNRAID/Anime/TV Shows/Gundam Collection/Correct Century/Turn A Gundam/DONOTSCAN/Turn A Gundam - 1x01 - Howling to the Moon..avi), query = select idEpisode from episode where idFile=5170
22:30:30.741 T:139736672990976 DEBUG: VideoInfoScanner: No NFO file found. Using title search for 'smb://TOWER/UNRAID/Anime/TV Shows/Gundam Collection/Correct Century/Turn A Gundam/DONOTSCAN/Turn A Gundam - 1x01 - Howling to the Moon..avi'
22:30:30.747 T:139736672990976 DEBUG: VideoInfoScanner: Adding new item to tvshowsConfusedmb://TOWER/UNRAID/Anime/TV Shows/Gundam Collection/Correct Century/Turn A Gundam/DONOTSCAN/Turn A Gundam - 1x01 - Howling to the Moon..avi

Thanks,
-kanth
Reply
#2
Well, I have not found any solutions. So I have gone the route of marking all the DONOTSCAN directories containing .nomedia files with a chmod 000 so that Kodi can not enter them and read the files. If someone else has the problem.. at least they will see this.

Note, this works fine on Kodi 16.
Reply
#3
I am experiencing this exact same problem. Here are my details:
Code:
]# cat /etc/redhat-release
Fedora release 25 (Twenty Five)
]# rpm -qa | grep -i kodi
kodi-17.1-1.fc25.x86_64

All I did was drop a .nomedia file into a test directory.

This is a fresh full install starting with Fedora 25 Live (via USB). I formatted during the installation and it's not 7 days old. I performed dnf updates. It reads the test directory even though there is a .nomedia file present.

I did follow the process 2 refresh the library (outlined at http://kodi.wiki/view/Updating_or_removing_videos ) Refresh by source/folder carefully executing each step.

Any suggestions would be appreciated, thanks!
Reply
#4
Try <excludefromscan action="append"> instead of <excludefromscan>

Same for the tv one.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#5
Hi nickr,

All I did was drop a .nomedia file (via touch) in the test directory (as covered in 7 Excluding directories/folders http://kodi.wiki/view/Set_content_and_scan) and then followed the process 2 refresh the library (outlined at Updating_or_removing_videos (wiki) ) Refresh by source/folder carefully executing each step.

They didn't mention the need to create an xml file--so I didn't. Do I need to create an xml file to get the .nomedia file to work (meaning stopping scanning of the directory in which it resides)?

Thanks!
Reply
#6
Sorry I was directing my comment to @kanth as he was using advancedsettings.xml.

I don't know why .nomedia isn't working for you, maybe it was somehow accidentally screwed up in a code change.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#7
@ThePowerTool

1. Had you scanned that folder BEFORE you added the .nomedia file? If so, scanning again will not remove the contents of the folder from the database, only cleaning the database will fix it.

2. I assume you are using linux since you mention the touch command. However if your scanning is done by Windows, I am not sure if you have to make the file name .nomedia. (ie with the trailing '.') as specified in the note to the wiki section you pointed to.

3. InfoScanner.cpp doesn't seem to have changed recently (according to github) so it doesn't look like some coding cockup, unless it is somewhere else.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#8
(2017-05-01, 10:22)nickr Wrote: 1. Had you scanned that folder BEFORE you added the .nomedia file? If so, scanning again will not remove the contents of the folder from the database, only cleaning the database will fix it.

Yes, I had scanned before adding the .nomedia file. I thought the process 2 refresh the library (outlined at Updating_or_removing_videos (wiki) ) Refresh by source/folder carefully executing each step would remove the scanned contents (remove content designation by setting to "none" then following instructions and resetting content and rescanning).

(2017-05-01, 10:22)nickr Wrote: 2. I assume you are using linux since you mention the touch command. However if your scanning is done by Windows, I am not sure if you have to make the file name .nomedia. (ie with the trailing '.') as specified in the note to the wiki section you pointed to.

Yes, Linux. This may be the issue as I didn't have the trailing '.'. I will test this next and report my results.

Thank you very much!
Reply
#9
Affixing the period resolved the issue.

Per the instructions, referenced above, removing the media type (setting it to "none") and selecting "yes" to delete the data removed the movies from the list of movies. Then setting the media type back to "movies" and selecting "yes" to scan caused KODI to scan everything except my test directory containing the .nomedia. file.

Thank you, again, for your help!
Reply

Logout Mark Read Team Forum Stats Members Help
.nomeda, exclude from scan, all ignored.0