pillone / usntssearch

NZB Metasearch engine
pillone.github.io/usntssearch
263 stars 79 forks source link

Selective API search #74

Closed Riz0 closed 10 years ago

Riz0 commented 10 years ago

So, I've been putting nzbm through its paces these last few days (upwards of 40 indices) and it doesn't look pretty. CP will constantly throw time out errors as I imagine it get's bored waiting for a response and moves on to the next search item. The errors are formatted like this (edited id and key):

[hpotato.core.plugins.base] Failed opening url in Newznab: https://localhost:8200/api?t=movie&imdbid=stuff&apikey=stuff=1 Traceback (most recent call last): File "C:\Program Files (x86)\CouchPotatoServer\couchpotato\core\plugins\base.py", line 183, in urlopen response = urllib2.urlopen(request, timeout = timeout) URLError:

So with this in mind, would it be possible to select certain indices to poll when searching through API and have all of them enabled for manual searches? This way you can have the best of both worlds (file whore searches vs automation).

Maybe just add an extra check-mark column next to the indices indicating inclusion with API search.

pillone commented 10 years ago

You can already configure extensive and normal searches from config (that's the waiting time). For automation, mega tries to use as many providers as possible to facilitate the already brittle filtering that automated script sometime do.

I will put a checkbox in the config to force using a short timeout for api calls.

Riz0 commented 10 years ago

Thanks, I didn't realize extensive/normal applied to API searched as well. Hopefully I'll get less timeouts. Closed for now.

Riz0 commented 10 years ago

Sorry to have to reopen this, I now realize I didn't fully grasp your answer. For whatever reason, I thought normal search was included in API query and extensive was not (must've been late for me heh).

Anyhow, I'd really like to be able to specify which indices are included in the API search as not all of them are suited for the task (NZB.cc, NZBClub, etc). I think the issue from here: https://github.com/pillone/usntssearch/issues/85 is pretty much as you explained, the search/API/etc module will fetch an exception of some sort from a poorly named nzb (indexer QC issue) and then when it's passed to SB, I'll get all of these errors until it tries again. As a side-note, I already tried .46 bugfix, and the messages still appear.

That issue aside, some of the indices will just throw too much junk at the search module that I don't want it to waste time on for automated searches. Obviously, for manual searches it's no issue as I can wade through the filth myself. I'd rather keep a mini list of trusted/fast indices for automated and the rest for when I'm feeling lucky and want to cast a wider net.

Let me know what you think and thanks for everything!

pillone commented 10 years ago
Riz0 commented 10 years ago

Doh! I was making changes in the main page .html so I just replaced the entire templates folder when switching builds. Fixed now.

Yay, selective API search works! But will you include the same option for "Other NZB engines" and "Specially supported NZB engines" as well? As it stands, they are included in automated query by default with no option to toggle it.

I will update that other ticket if more SB errors are thrown. Thanks again!

pillone commented 10 years ago

see https://github.com/pillone/usntssearch/issues/85