airdcpp-web/airdcpp-apisocket-js

Programatically search and download files

Opened this issue · 0 comments

Hello @maksis

I tangentially referred to this use-case on Discord, but outlining it here in detail for posterity:

Primarily:

  1. I want to call search programmatically, based on a list of files matching a certain criteria. The query is constructed dynamically, and passed to the search.
  2. Subsequently, I want to rank the search results.
  3. Finally, I want to download the highest ranked result programmatically.

So far, I have cobbled together:

  1. The service that runs the search
  2. The kafka producer and consumer that construct the search query, perform the search and orchestrate the results.

My challenges:

  1. When I conduct a "search" for a bunch of files, I have no control on the search instance and hence the results all get coalesced into a single object.
  2. I still have to de-dupe the results because of how the search_results_added and search_results_updated events affect the search results.

I saw that you linked to https://github.com/peps1/airdcpp-auto-downloader/tree/master, and I like it, however it adds another dependency to the mix, and the users of ThreeTwo will be expected to configure it as such.

I think that I am missing a few pieces from achieving my stated goal, just need your input.