curtwagner1984 / YAPO

Yapo - Yet Another Porn Organizer
GNU General Public License v3.0
48 stars 10 forks source link

[Feature Request] A way to disable individual scene tags from being auto-tagged. #33

Closed sjclayton closed 8 years ago

sjclayton commented 8 years ago

I just thought of the potential for this issue when contemplating adding certain Scene Tags to my database that I normally use for the fear that they will be auto-tagged on scene they aren't actually applicable to...

Example: If I have the tag 'No.Sex' then I do a mass folder import, it's going to tag every file it finds with "sex" anywhere in the file name with the 'No.Sex' tag.

or another very good example would be a tag such as 'Cum.On.Tits', being that "cum" is also likely to pop-up quite a bit in a filename.

curtwagner1984 commented 8 years ago

I'm a bit confused, why would it tag 'No.Sex' on files that have only the word 'sex' in it ?

The way tagging works now is it's searching the filename for occurrence of a specific tag,actor, alias or website. It's sorting them by length and searches for the longest words first, if it finds something, it removes the tag from the searched string.

It treats '.' as a single or empty character (like in regex) so 'No.Sex' will only match 'no[any single character]sex'. So it will match no2sex, no?sex, nosex but it will not match 'nobodysex'. It will also not match 'no' or 'sex' by themselves. Also, It won't match 'no one was home but then there was sex.'

This is a bit confusing, here is an example: filename: twistys546546548ISISLOVE[no!sex] .mp4

So it begins with searching websites because their names are usually the longest and can contain other tags. So it finds twistys, it tags the scene with the website and changes the search string to

546546548ISISLOVE[no!sex] .mp4

Then it tires to find actors. Let's say you have 'isis love' and just 'isis' in your database. Also let's say just 'isis' can be tagged even though it's only one word. So because 'isis love' is longer than 'isis' it searches isis first, it finds it and removes it from the search string :

546546548[no!sex] .mp4

Now it tries to search for just 'isis' but can't find anything.

Now it tires to find the tags , if finds 'no.sex' and removes it from the search string:

546546548.mp4

At this point if you have shorter tags that are substrings of the tags already found, for example just 'sex' it won't be found.

also as far as I remember it should remove all occurences of the found name for example if the file name is "isis love isis love isis love 5454" then after it finds 'isis love' it should be "5454".

sjclayton commented 8 years ago

Thank you for explaining that, that clears things up quite a bit... I will go ahead with all the tags I was going to add to the database and run 'Tag All Scenes' and see if I have any issues.

sjclayton commented 8 years ago

Appears all good! Thank you for helping me to understand the way that works a bit better. =D

curtwagner1984 commented 8 years ago

@sjclayton There is still some merit to excluding some tags from specific scenes. for example if the filename is "Akeno sex" it will be tagged as 'no.sex', this is a mistake. We want to exclude no.sex from this specific scene.

sjclayton commented 8 years ago

Well maybe the option could be added later on at some point then.... like a simple toggle for tags that you don't want the auto-tagging parser to search for.... or even just refining the way the parser looks for tags.