[add] btn - exact_only option to omit second search#1787
[add] btn - exact_only option to omit second search#1787tubedogg wants to merge 1 commit intoFlexget:developfrom
Conversation
If the title to be searched ends in a parenthesis, and there are no results on the first search, btn automatically runs a second search omitting the text in parenthesis. This can cause unwanted results to be accepted. This change adds a second config type, a dict with api_key and exact_only. When exact_only is set to yes, the second search will never be run.
| results = set() | ||
| for search in searches: | ||
| data = json.dumps({'method': 'getTorrents', 'params': [api_key, search], 'id': 1}) | ||
| data = json.dumps({'method': 'getTorrents', 'params': [config.get('api_key'), search], 'id': 1}) |
There was a problem hiding this comment.
Minor detail, api_key is always present, so there's no need to use config.get('api_key') over config['api_key']. I prefer to use the latter in that scenario.
|
Maybe that value can be exposed by the |
|
(Looking at next_series_episodes though it should be very similar in next_series_seasons) Okay, what about if we inserted this at line 67: And then add series_config to the entry that's created immediately thereafter? Any plugin receiving the entry could utilize any series settings it wanted to. |
|
Sounds incredibly hacky. |
|
From the looks of it, there's no way to know outside of the series plugin if exact was used (this can be manual via config or exact). Maybe the soltuion is just to set an attribute to True and then return in the entry under |
|
While we're talking about it, |
|
Thus is irrelevant now with the new series metainfo changes, right? |
|
Yeah it should be. |
Motivation for changes:
If the title to be searched ends in a parenthesis, and there are no results on the first search, btn automatically runs a second search omitting the text in parenthesis. This can cause unwanted results to be accepted. This change adds a second config type, a dict with
api_keyandexact_only. When exact_only is set to yes, the second search will never be run.Detailed changes:
Config usage if relevant (new plugin or updated schema):
Original style:
Optional new style: