LinuxDC++ search filter issue.

Asked by shubham

I am trying to search files through LinuxDC++ with specifying that File type should be "Video". After search finishes in result I am getting all type of files (PDF,EXE,directoris ...etc;) .
when I clicked on search within local results I got only specified file type but number of results got drastically reduced than expected. Can anyone give me explaination on what si the work of (search within local results) checkbox.

Question information

English Edit question
LinuxDC++ Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Razzloss (razzloss) said :

It's been a while, but (so not sure if any of this is true)...

At least with nmdc hubs it's pretty much up to the receiving client to decide if the file is "video" or not. So it can send pretty much any results it wants. So the file type selection is quite useless.

Local results just filters the current result list with given parameters, as far as I remember. I guess it was mainly intended for combination of lots of results + hub with insanely long delays between searches. Can't remember if with local filter it did the file type filtering locally or just ignored it.


Revision history for this message
Uppinder Chugh (uppinderchugh) said :

Hi Razzloss,

  I wanted to implement a wildcard search feature (searches for strings like file.*, *.ext, *.*). I've read the source code mainly related to the search module, but haven't been able to figure out how. Could you please help me in this regard?


Revision history for this message
Razzloss (razzloss) said :

I believe the best you can do is send the common parts of your search strings as simple text separated with spaces to searchManager (see linux/ around line 483). For example if you want to search for *.ext you'll just send 'ext' as the text. As you can't really rely (to my outdated knowledge of the protocol) what you'd get as a response to a search for *.ext.

After that you'd either filter the responses already in (linux/ Search::on(SearchManager:SR...) function before passing it to the gui part or with the help of searchFilterModel (Search::searchFilterFunc_gui decides if the result in the model should be shown in the view or not, if the filter is in use).

(disclaimer, all of this might be complete bs. It has been about 6 years since I last touched the code).


Can you help with this problem?

Provide an answer of your own, or ask shubham for more information if necessary.

To post a message you must log in.