Official eMule-Board: Merging Search Results Lists - Official eMule-Board

Jump to content


  • (2 Pages)
  • +
  • 1
  • 2

Merging Search Results Lists

#1 User is offline   Nordstorm 

  • Member
  • PipPip
  • Group: Members
  • Posts: 29
  • Joined: 10-September 10

Posted 24 April 2011 - 12:51 PM

I want to implement a feature for eMule, but I don't know where to start.
I want to be able to merge search results lists from various(older or newer) searches that used the same search string.
What would be the easiest way to achieve this?
Could it be implemented without touching the sourcecode?(by scripts or hooks)

This post has been edited by Nordstorm: 24 April 2011 - 01:45 PM

0

#2 User is offline   Nordstorm 

  • Member
  • PipPip
  • Group: Members
  • Posts: 29
  • Joined: 10-September 10

Posted 26 April 2011 - 11:04 AM

Where can I find the format specification for StoredSearches.met?
0

#3 User is offline   Some Support 

  • Last eMule
  • PipPipPipPipPipPipPip
  • Group: Yes
  • Posts: 3667
  • Joined: 27-June 03

Posted 26 April 2011 - 02:04 PM

Quote

What would be the easiest way to achieve this?

There is no "easy" way other than coding it to implement it and its not entirely trivial, because a search string is only a small part of what defines a search and its results.

Quote

Could it be implemented without touching the sourcecode?(by scripts or hooks)

No

Quote

Where can I find the format specification for StoredSearches.met?

None of eMules intern files have written documentations.

#4 User is offline   Nordstorm 

  • Member
  • PipPip
  • Group: Members
  • Posts: 29
  • Joined: 10-September 10

Posted 26 April 2011 - 04:21 PM

I'm sure that, the StoredSearches.met file can be manipulated offline while emule is shut down. It should be easy to merge the search results if you know the format for StoredSearches.met.
0

#5 User is offline   Stulle 

  • [Enter Mod] Dev
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5804
  • Joined: 07-April 04

Posted 26 April 2011 - 04:40 PM

You would still have to modify some code. So check the code. You know what the file is called so all it takes is a bit of searching keywords in the code.
I am an emule-web.de member and fan!

[Imagine there was a sarcasm meter right here!]

No, there will not be a new version of my mods. No, I do not want your PM. No, I am certain, use the board and quit sending PMs. No, I am not kidding, there will not be a new version of my mods just because of YOU asking for it!
0

#6 User is offline   Nordstorm 

  • Member
  • PipPip
  • Group: Members
  • Posts: 29
  • Joined: 10-September 10

Posted 26 April 2011 - 05:12 PM

I've checked the code. The functions that work with this file are stored in SearchList.cpp. The problem is that I find it hard to figure out the format of the file only by investigating those functions.
0

#7 User is offline   Stulle 

  • [Enter Mod] Dev
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5804
  • Joined: 07-April 04

Posted 26 April 2011 - 09:27 PM

Actually, that is the easiest way to determine what format the file has. It's all there. If you expect XML or some other fancy clear text format you will not find anything to your liking. You will have to read the file, extract the necessary information and rearrange it in a different fashion before writing the file with merged searches. This obviously suggests that you are basically just hacking into the "StoredSearches.met" file which is utterly pointless considering you will have to close eMule in order to merge searches.
I am an emule-web.de member and fan!

[Imagine there was a sarcasm meter right here!]

No, there will not be a new version of my mods. No, I do not want your PM. No, I am certain, use the board and quit sending PMs. No, I am not kidding, there will not be a new version of my mods just because of YOU asking for it!
0

#8 User is offline   Nordstorm 

  • Member
  • PipPip
  • Group: Members
  • Posts: 29
  • Joined: 10-September 10

Posted 26 April 2011 - 09:47 PM

Indeed, turning emule off would be a big drawback, but still, it would be better than nothing.
0

#9 User is offline   tHeWiZaRdOfDoS 

  • Man, what a bunch of jokers...
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5630
  • Joined: 28-December 02

Posted 27 April 2011 - 06:51 AM

I wonder what the whole sense of that "feature" is?
But if you're stuck with the file format, just check the source code for storedsearches.met and check out where it's loaded/saved.
0

#10 User is offline   Nordstorm 

  • Member
  • PipPip
  • Group: Members
  • Posts: 29
  • Joined: 10-September 10

Posted 27 April 2011 - 03:36 PM

If you do lots of searches, the feature is useful, especially if you like to keep track of search results for a while, or to wait a while before you enqueue them.
0

#11 User is offline   tHeWiZaRdOfDoS 

  • Man, what a bunch of jokers...
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5630
  • Joined: 28-December 02

Posted 27 April 2011 - 03:59 PM

I do a lot of searches but I just keep the search tabs open... I see no use in merging those, though I'm sure it shouldn't be too hard to code :flowers:
0

#12 User is offline   Nordstorm 

  • Member
  • PipPip
  • Group: Members
  • Posts: 29
  • Joined: 10-September 10

Posted 27 April 2011 - 04:41 PM

It makes sense to merge the tabs, if they have the same search string.(assuming that you really want to keep all the results)


Let's say that you have like 20 search tabs for an "Ubuntu" search. Some with results over 2GB, some for results for less than 2GB.
It makes sense to merge all these 20 tabs in a single tab, and to consolidate a single tab, while removing the duplicates(in 20 tabs, some files might be duplicated) at the same time.
0

#13 User is offline   Stulle 

  • [Enter Mod] Dev
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5804
  • Joined: 07-April 04

Posted 27 April 2011 - 08:07 PM

I have not looked into it at all but I imagine it should be fairly easy to just add new search results to an existing search. That would not actually be merging searches but it would also prevent more searches from being opened. You'll have to find out how a search item is added to the list and trace it back to the point where a search performed via KAD or Server brings up results and adds them to the GUI.

Still, this requires you to change code!
I am an emule-web.de member and fan!

[Imagine there was a sarcasm meter right here!]

No, there will not be a new version of my mods. No, I do not want your PM. No, I am certain, use the board and quit sending PMs. No, I am not kidding, there will not be a new version of my mods just because of YOU asking for it!
0

#14 User is offline   Nordstorm 

  • Member
  • PipPip
  • Group: Members
  • Posts: 29
  • Joined: 10-September 10

Posted 29 April 2011 - 11:48 AM

I'd go with changing the sourcecode, but I haven't seen an official guideline, only user discovered stuff, that still generate hundreds of warnings.
I don't feel comfortable this way. How would I know that these warnings won't generate other complications?
0

#15 User is offline   Stulle 

  • [Enter Mod] Dev
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5804
  • Joined: 07-April 04

Posted 29 April 2011 - 05:55 PM

how would we know what you are talking about?
I am an emule-web.de member and fan!

[Imagine there was a sarcasm meter right here!]

No, there will not be a new version of my mods. No, I do not want your PM. No, I am certain, use the board and quit sending PMs. No, I am not kidding, there will not be a new version of my mods just because of YOU asking for it!
0

#16 User is offline   Nordstorm 

  • Member
  • PipPip
  • Group: Members
  • Posts: 29
  • Joined: 10-September 10

Posted 01 May 2011 - 02:58 PM

I've tried to build MorphXT but it failed.
I used Win7 x64 and VS2010 Ultimate.

Here's the build log:
http://pastebin.com/5EBACKCw

LE:Solved. MorphXT builds flawlessly.

This post has been edited by Nordstorm: 01 May 2011 - 03:41 PM

0

#17 User is offline   Stulle 

  • [Enter Mod] Dev
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5804
  • Joined: 07-April 04

Posted 01 May 2011 - 03:42 PM

when using VS2010 you should actually use the proper provided solution file. the package includes a text file that tells you exactly what to do. so just download the entire package (the one that includes the libs, obviously), open the emule100.sln and compile it. like i said, it's all in the "How-To-Compile_VS10.txt" you find in the root folder of the package... really not too difficult.
I am an emule-web.de member and fan!

[Imagine there was a sarcasm meter right here!]

No, there will not be a new version of my mods. No, I do not want your PM. No, I am certain, use the board and quit sending PMs. No, I am not kidding, there will not be a new version of my mods just because of YOU asking for it!
0

#18 User is offline   Nordstorm 

  • Member
  • PipPip
  • Group: Members
  • Posts: 29
  • Joined: 10-September 10

Posted 01 May 2011 - 05:35 PM

Is this the part that I have to mod?
bool CSearchList::AddToList(CSearchFile* toadd, bool bClientResponse, uint32 dwFromUDPServerIP)
{
	if (!bClientResponse && !m_strResultFileType.IsEmpty() && _tcscmp(m_strResultFileType, toadd->GetFileType()) != 0)
	{
		delete toadd;
		return false;
	}
	[b]SearchList* list = GetSearchListForID(toadd->GetSearchID());[/b]

	// Spamfilter: Calculate the filename without any used keywords (and seperators) for later use
	CString strNameWithoutKeyword;
	CString strName = toadd->GetFileName();
	strName.MakeLower();
	int nPos = 0;
	CString strToken = strName.Tokenize(_T(".[]()!-'_ "), nPos);
	bool bFound;

0

#19 User is offline   Stulle 

  • [Enter Mod] Dev
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5804
  • Joined: 07-April 04

Posted 01 May 2011 - 06:32 PM

possibly. like i said, i never checked the code. you are on your own, you will have to find out yourself.
I am an emule-web.de member and fan!

[Imagine there was a sarcasm meter right here!]

No, there will not be a new version of my mods. No, I do not want your PM. No, I am certain, use the board and quit sending PMs. No, I am not kidding, there will not be a new version of my mods just because of YOU asking for it!
0

#20 User is offline   tHeWiZaRdOfDoS 

  • Man, what a bunch of jokers...
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5630
  • Joined: 28-December 02

Posted 02 May 2011 - 05:30 AM

Basically you have to grab all open searches, check for the ID you want to merge your searches into and then use that function to add them to the given ID. You will probably have to supply a "skip" parameter for the spam-check or otherwise the new results will be marked as spam as they don't match the given requirements of the old search.
0

  • Member Options

  • (2 Pages)
  • +
  • 1
  • 2

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users