Branch/Commit: Master / 2d4e83adcf80d9e50125beaf8b64b6439f158916
OS: Ubuntu Server 16.04
What you did: added "5.1" to require words
What happened: it skipped search results with 5.1 in the name
What you expected: to only download results with 5.1 in the name
Logs:
INFO SEARCHQUEUE-BACKLOG-257655 :: [Rarbg] :: Release: Arrow.S06E13.The.Devils.Greatest.Trick.1080p.AMZN.WEBRip.DDP5.1.x264-CasStudio[rartv] doesn't contain any of 5.1, ignoring it
Had a look at the /sickbeard/show_name_helpers.py file, looks like the containsAtLeastOneWord method expects the name of the torrent to use spaces, but that hardly ever happens, they usually just use dots.
Now since, separating by dot isn't an option either, perhaps add a checkbox below the require words field where the user has the option to accept any occurrence in the string, rather then as a single word. That way it won't break existing setups, yet still allow new setups to work around the issue as described in my first post.
You could add DDP5.1 to the list also.... It doesnt match because we match whole words, since otherwise eventually you would get matches in episode names.
in this title it wouldn't match DDP5.1 either, since it isnt separated by spaces.
Either way, I fixed it for myself in the pull request and it works perfectly fine now.
\W matches any character that is not a word character, including spaces, dots, underscores, etc. Add DDP5.1
https://regexr.com/3mn1l
I can't accept your PR, it is the way it is for a reason.
Well, that's up to you really. Right now your logic is flawed and it prevents people from only downloading torrents that have 5.1 surround sound for example.
The only reason I created the PR is to give back to the community, it works for me so I honestly don't really mind whether you include it or not.
The method works if you add the full word. With your way if an episode name or show name happens to have 5.1 in the title (and not part of the meta info) it will accept any of those files. You arent understanding how the regex works
I stand corrected, my apologies.
Python 2.7.14 (default, Sep 23 2017, 22:06:14)
[GCC 7.2.0] on linux2
>>> from sickbeard.show_name_helpers import containsAtLeastOneWord
>>> name = 'Arrow.S06E13.The.Devils.Greatest.Trick.1080p.AMZN.WEBRip.DDP5.1.x264-CasStudio[rartv]'
>>> words = ['5.1']
>>> containsAtLeastOneWord(name, words)
False
>>> words = ['5.1', 'DDP5.1']
>>> containsAtLeastOneWord(name, words)
'DDP5.1'
Thanks for trying to make a PR to solve your issue though, at least you tried. More than I can say for a lot of people =P