zlatinb / muwire

MuWire file sharing client for I2P
GNU General Public License v3.0
191 stars 27 forks source link

Automatic recurring/repeated search - Muwire much more effective in finding files in long term #172

Open slrslr opened 1 year ago

slrslr commented 1 year ago

Hello,

i have numerous search tabs open without results and thanks to handy "refresh" button i can repeat the search easily (thank you)

Issue: Some searched phrases not return any result usually and continue to be empty, so from time to time I am clicking refresh button and then with some delay browsing all tabs to see if it found something (usually no) = clicking monkey and need to keep it in memory. Then sometimes i do not recover recent searches on MW start loosing track of what i wanted to find.

Solution: it would be helpful if MuWire would automate the search for user.

Proposal:

  1. For example 30 minutes after start and then every 6 hours of runtime, MuWire would send single search query that would consist of all searched phrases that user have open on Search tab.
  1. FOUND NEW RESULTS: new search results may append/merge to current results shown on particular search queries tabs so i do not loose old results if i do not attend to MuWire on-time.

    • possibly the search query tab should not list more than lets say 100 users, since there is no filtering field that would allow further narrowing the search result, user would not likely browse files of more than 100 users.
  2. NOTIFICATION: If MuWire automated search query finds some new search matches, it can be handy to report this, for example in bottom-right corner - ideally click able so it switch to search tab or if new results are in only one search query tab, then it would switch to that particular search query tab. Btw. the status area in bottom-right corner may be more handy if the active notification is flashing or in red color.

    • search tabs with new unseen results may be entitled in bold text or with colored background

Thank you

zlatinb commented 1 year ago

Most of the things you're asking for can be done, but this needs to be analyzed very carefully.

First thoughts:

I do not want this to be enabled by default. I can add a "configure" button on the search tab where the user can set how often to repeat the search. Or maybe make the "repeat search" button a drop-down menu which allows the user to select from "repeat now" and "schedule repeat search".

Regarding 1a) what you called firewall, there is a limit of 5 search queries per user per seocnd (2 if regex). That limit is on the receiving side and has to be avoided carefully. It theoretically possible to remember which nodes the query has been sent to, but it's a lot of work for no benefit because the queries get routed so they will reach the same nodes anyway.

Regarding 1b) this has to do with messages not qith queries? If so please open a separate issue about it.

Regarding 2) yes the new results can be merged and it is easy to do if the new query is at least 5 minutes after the first one. I think I will make the minimum retry interval 1 hour so it should be ok.

Regarding 3, yes system notification can be added but it would be disabled by default. It would be configurable in the same place as the repeat search interval. Making the tab bold with unseen results is more difficult, I want to do it but I haven't figured out how yet.