Bug 133506 - Status torrent in uploading after hitting "stop"
Summary: Status torrent in uploading after hitting "stop"
Status: RESOLVED FIXED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-03 15:14 UTC by Martijn van Vliet
Modified: 2006-10-03 20:32 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martijn van Vliet 2006-09-03 15:14:37 UTC
Version:           svn and 2.0.2 (using KDE KDE 3.5.4)
Installed from:    Ubuntu Packages
OS:                Linux

Let's assume a torrent is in seeding state and has not yet fullfilled it's configured ratio limit. When we now stop the torrent, the status goes to "completed", which is the same status a torrent will get when it automaticly get stopped when it hits sharing limit.

To me this is almost like there is a state "stopped" missing here. 

It might also get people more confused with the new systray message
"
<b>%1</b> has reached it's maximum share ratio of %2 and has been stopped.
<br>Uploaded %3 at an average speed of %4.
"

It is possible there are other things planned for next version that i am not aware of yet, but anyway, i thought lets share this one.
Comment 1 Joris Guisson 2006-09-03 20:03:05 UTC
So this message gets shown if the torrent hasn't reached it's max share ratio ?

Crap, I forgot to test this.
Comment 2 Joris Guisson 2006-09-03 20:58:35 UTC
Ignore my previous comment.

Anyway we could split the completed state to :
Seeding Completed
Download Completed

Or something similar. 
Comment 3 Martijn van Vliet 2006-09-04 02:50:22 UTC
No the message on itself works fine is good to have too. The thing why i mentioned it is: the message says that a torrent is now stopped because it has the correct ratio. While doing so, the status on the torrent goes to to "completed". Nothing wrong here i think.
 
But people might learn from the popup and link the status completed to completed AND ratio completed, where in case you stop a seed which isn't ratio completed, it gets the same status. This is where i think a status the same as when stopping a download by hand, stopped, would be better.
Comment 4 Martijn van Vliet 2006-09-06 14:52:34 UTC
Hmm, after thinking about it, i finally understand your post. Sorry about that ;)
I like your idea more than mine.

So instead of
Not started <-> downloading <-> stalled <-> stopped
Not started <-> seeding <-> completed (which is manually stopped now)

It would be?
Not started <-> downloading <-> stalled <-> stopped
Not started <-> seeding <-> Download completed or Seeding completed (after manually stopped)

Yeah i like that, i think it would make it easier to read. :)
Thanks for being so pragmatic.
Comment 5 Martijn van Vliet 2006-09-06 19:14:43 UTC
Off course
Download completed or Seeding completed (after manually stopped) 
should be
Download completed (after manually stopped) or Seeding completed

Hmm, should we make a poll on the forum between this proposed system and what we now?
Comment 6 Joris Guisson 2006-09-06 20:17:15 UTC
I open for suggestions
Comment 7 Martijn van Vliet 2006-09-09 23:52:09 UTC
Of course, i understand. :)
  
Comment 8 Joris Guisson 2006-10-03 20:31:59 UTC
SVN commit 592062 by guisson:

Added distinction in Completed status, there is now a seeding completed and a downloading completed. Seeding completed means that the torrent has reached it's max share ratio.

BUG: 133506 



 M  +2 -1      apps/ktorrent/ktorrentviewitem.cpp  
 M  +2 -1      apps/ktorrent/queuedialog.cpp  
 M  +2 -1      libktorrent/interfaces/torrentinterface.h  
 M  +7 -3      libktorrent/torrent/torrentcontrol.cpp  


--- trunk/extragear/network/ktorrent/apps/ktorrent/ktorrentviewitem.cpp #592061:592062
@@ -62,7 +62,8 @@
 	{
 		case kt::SEEDING :
 		case kt::DOWNLOADING:
-		case kt::COMPLETE :
+		case kt::DOWNLOAD_COMPLETE :
+		case kt::SEEDING_COMPLETE :
 		case kt::ALLOCATING_DISKSPACE :
 			return green;
 		case kt::STALLED:
--- trunk/extragear/network/ktorrent/apps/ktorrent/queuedialog.cpp #592061:592062
@@ -125,7 +125,8 @@
 		TorrentInterface* tc = *it;
 		TorrentStatus ts = tc->getStats().status;
 		
-		if(ts == kt::SEEDING || ts == kt::COMPLETE || tc->getStats().completed)
+		if(ts == kt::SEEDING || ts == kt::DOWNLOAD_COMPLETE || 
+			ts == kt::SEEDING_COMPLETE || tc->getStats().completed)
 		{
 			QueueItem* item = new QueueItem(tc, seedList);
 			seedList->insertItem(item);
--- trunk/extragear/network/ktorrent/libktorrent/interfaces/torrentinterface.h #592061:592062
@@ -45,7 +45,8 @@
 	enum TorrentStatus
 	{
 		NOT_STARTED,
-		COMPLETE,
+		SEEDING_COMPLETE,
+		DOWNLOAD_COMPLETE,
 		SEEDING,
 		DOWNLOADING,
 		STALLED,
--- trunk/extragear/network/ktorrent/libktorrent/torrent/torrentcontrol.cpp #592061:592062
@@ -795,8 +795,10 @@
 			stats.status = kt::NOT_STARTED;
 		else if(!stats.running && !stats.user_controlled)
 			stats.status = kt::QUEUED;
+		else if (!stats.running && stats.completed && overMaxRatio())
+			stats.status = kt::SEEDING_COMPLETE;
 		else if (!stats.running && stats.completed)
-			stats.status = kt::COMPLETE;
+			stats.status = kt::DOWNLOAD_COMPLETE;
 		else if (!stats.running)
 			stats.status = kt::STOPPED;
 		else if (stats.running && stats.completed)
@@ -1131,8 +1133,10 @@
 		{
 			case kt::NOT_STARTED :
 				return i18n("Not started");
-			case kt::COMPLETE :
-				return i18n("Completed");
+			case kt::DOWNLOAD_COMPLETE :
+				return i18n("Download Completed");
+			case kt::SEEDING_COMPLETE :
+				return i18n("Seeding Completed");
 			case kt::SEEDING :
 				return i18n("Seeding");
 			case kt::DOWNLOADING: