Match Queue Change

Archived discussion about features (predating the use of Bugzilla as a bug and feature tracker)

Moderator: Moderators

Locked
Cyborg
Posts: 41
Joined: 2004-01-23 18:15

Match Queue Change

Post by Cyborg » 2004-09-04 19:52

This is kind of hard to explain, but I'll do my best.
If I have several rar files in my quere (which are often divided into several files named .rar, .r00, .r01, .r02 etc and with the exact same size) and try to match someones queue to mine, it doesnt add the alternate user because it doesnt know which file is the same as which... You should change so that it checks the TTH for a match instead.

PseudonympH
Forum Moderator
Posts: 366
Joined: 2004-03-06 02:46

Post by PseudonympH » 2004-09-04 22:35

I see this as more of a bugfix than a feature request myself. :)

Todi
Forum Moderator
Posts: 699
Joined: 2003-03-04 12:16
Contact:

Post by Todi » 2004-09-05 03:16

DC++ doesn't already do this? I thought it did all matching by TTH if available, but perhaps that's just searches so far.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-09-06 17:13

If I'm reading QueueManager::matchFiles() correctly, that is already what DC++ does: match queue by TTH.

Code: Select all

int QueueManager::matchFiles(DirectoryListing::Directory* dir) throw() {
	int matches = 0;
	for(DirectoryListing::Directory::Iter j = dir->directories.begin(); j != dir->directories.end(); ++j) {
		if(!(*j)->getAdls())
			matches += matchFiles(*j);
	}

	for(DirectoryListing::File::Iter i = dir->files.begin(); i != dir->files.end(); ++i) {
		DirectoryListing::File* df = *i;

		SizePair files = sizeMap.equal_range(adjustSize((u_int32_t)df->getSize(), df->getName()));
		for(SizeIter j = files.first; j != files.second; ++j) {
			QueueItem* qi = j->second;
			bool equal = false;
			if(qi->getTTH() != NULL && df->getTTH() != NULL) {
				equal = (*qi->getTTH() == *df->getTTH());
			} else {
				if(Util::stricmp(utfEscaper(df->getName()), qi->getTargetFileName()) == 0) {

Cyborg
Posts: 41
Joined: 2004-01-23 18:15

Post by Cyborg » 2004-09-07 23:08

Hmmm... That's strange.... Are you sure?

I did an alternate search for a file, right clicked on it and selected match queue (because that was one of many files) and it downloaded his file list, but it didn't add the files to my queue, so I had to do every file (~40) manually.

I'm not that good at c++ so I didn't understand all of that code.... But all of the files I wanted to match had the exact same size and file extension as many other files in my queue... Does that maybe change anything?

Maybe I just did something wrong... I'm not sure right now as you've checked the code and all.... I'll just wait and see if the problem occurs again.

Thanks.

PseudonympH
Forum Moderator
Posts: 366
Joined: 2004-03-06 02:46

Post by PseudonympH » 2004-09-08 17:31

Cyborg wrote:But all of the files I wanted to match had the exact same size and file extension as many other files in my queue
Yes, but did the TTH's match? Extension and size are irrelevant.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-09-09 22:45

Cyborg wrote:But all of the files I wanted to match had the exact same size and file extension as many other files in my queue... Does that maybe change anything?
Well, it confuses me, since you said the following initially:
Cyborg wrote:You should change so that it checks the TTH for a match instead.
Do you understand what TTHes are?

(Sorry for making the same point again, PH.)

df6CPWhA2ma7r/0+oh03Lg==

Post by df6CPWhA2ma7r/0+oh03Lg== » 2004-09-10 08:24

"Do you understand what TTHes are? "
Yes, I do.

The thing is that I first thought that it only matched by size and file extension, but after you showed me that code and told me that it did match by TTH, I was uncertain whether it added the alternate sources or not. Now I think it did.

Btw, you should make it possible to activate the user account on the forums directly without having to get the activation mail (or if it already exists, you should have a link to it).
When I just changed my mail on this forum it sent me an activation mail and my ISP thought it was spam/junk and erased it without asking me.
Then I created a hotmail account and created this "TEMP_Cyborg" user and hotmail also moved the activation mail to the junk mail folder. Fortunately I could access the mail.
Please help me get my old account back.
Sorry 'bout this being really off-topic, but I didnt know where else to post it.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-09-10 11:03

TEMP_Cyborg wrote:"Do you understand what TTHes are? "
Yes, I do.

The thing is that I first thought that it only matched by size and file extension, but after you showed me that code and told me that it did match by TTH, I was uncertain whether it added the alternate sources or not. Now I think it did.

Btw, you should make it possible to activate the user account on the forums directly without having to get the activation mail (or if it already exists, you should have a link to it).
When I just changed my mail on this forum it sent me an activation mail and my ISP thought it was spam/junk and erased it without asking me.
Then I created a hotmail account and created this "TEMP_Cyborg" user and hotmail also moved the activation mail to the junk mail folder. Fortunately I could access the mail.
Please help me get my old account back.
Sorry 'bout this being really off-topic, but I didnt know where else to post it.
No changes to the forum are needed - this is stock phpBB, there's no need to customize it.

I've deleted your _TEMP account and put that email address in your main account, plus reactivated your account. If your passwords were different, you can get the forum to mail you a reminder or change it.

Locked