aMule Forum

English => Feature requests => Topic started by: Grunt on January 09, 2011, 07:55:30 PM

Title: More intuitive sort by remaining
Post by: Grunt on January 09, 2011, 07:55:30 PM
Hi,

I don't get why, when sorting files by remaining time, files that don't have a remaining time (= that are not downloaded yet) are sorted right after the ones that are going to be available.

Seems more logical to sort this way:
- first, files that are not downloaded at the moment,
- then files that take time,
- then files you will get so soon.

This way, we could see easily which file we will get sooner, just by clicking "sort by remaining time" and seeing immediatly the first of the list, instead of looking for them right after the (may be) long list of files waiting.

So.. here is the simple patch:

Code: [Select]
*** DownloadListCtrl.cpp~ 2010-12-29 15:26:04.000000000 +0100
--- DownloadListCtrl.cpp 2011-01-09 19:42:40.000000000 +0100
***************
*** 1188,1198 ****
  if (file2->getTimeRemaining() == -1) {
  result = 0;
  } else {
! result = -1;
  }
  } else {
  if (file2->getTimeRemaining() == -1) {
! result = 1;
  } else {
  result = CmpAny(
  file1->getTimeRemaining(),
--- 1188,1198 ----
  if (file2->getTimeRemaining() == -1) {
  result = 0;
  } else {
! result = 1;
  }
  } else {
  if (file2->getTimeRemaining() == -1) {
! result = -1;
  } else {
  result = CmpAny(
  file1->getTimeRemaining(),

Applies to amule/src/DownloadListCtrl.cpp

So long, and thanks for the fish this awesome multiplatform ed2k/Kad P2P software!  :)
Title: Re: More intuitive sort by remaining
Post by: Stu Redman on January 09, 2011, 09:00:58 PM
Makes sense to me. Anyone against it?
Title: Re: More intuitive sort by remaining
Post by: ^marcell^ on January 09, 2011, 09:30:28 PM
I don't understand the phrase "files that are not downloaded yet".
Title: Re: More intuitive sort by remaining
Post by: Stu Redman on January 09, 2011, 09:53:50 PM
In short: what do you want when sorting by remaining time? I'd say, get file first to be finished on top, then next to be finished and so on, and then all the files currently not downloading. That's what Grunt wants, and that's not what it does atm. Atm you get

2 h
16 min
5 min
not dl
not dl

when it should be

5 min
16 min
2 h
not dl
not dl
Title: Re: More intuitive sort by remaining
Post by: Grunt on January 10, 2011, 01:18:11 AM
I don't understand the phrase "files that are not downloaded yet".
Should have been "files that are not downloading yet", sorry.
Title: Re: More intuitive sort by remaining
Post by: ^marcell^ on January 10, 2011, 04:34:36 PM
In that case, I totally agree.
Title: Re: More intuitive sort by remaining
Post by: GonoszTopi on January 12, 2011, 08:04:06 PM
k
Title: Re: More intuitive sort by remaining
Post by: Stu Redman on January 12, 2011, 11:07:59 PM
Fixed in 10430

And good to have you back!  :D