← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2972: Don't block addition of permanent items if a temporary one exists; Rise some defaults to keep up ...

 

------------------------------------------------------------
revno: 2972
committer: eMTee <emtee11@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Sun 2012-07-01 17:54:38 +0200
message:
  Don't block addition of permanent items if a temporary one exists; Rise some defaults to keep up with the times
modified:
  dcpp/QueueManager.cpp
  dcpp/SettingsManager.cpp
  help/settings_queue.html


--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk

Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dcpp/QueueManager.cpp'
--- dcpp/QueueManager.cpp	2012-06-23 20:38:05 +0000
+++ dcpp/QueueManager.cpp	2012-07-01 15:54:38 +0000
@@ -568,7 +568,9 @@
 			auto ql = fileQueue.find(root);
 			if (!ql.empty()) {
 				// Found one or more existing queue items, lets see if we can add the source to them
-				bool sourceAdded = false;
+				// Check if any of the existing queue items are for permanent downloads; if so then no addition
+				// If all existing queue items are for pending temporary downloads then add a new queue item or the source
+				bool sourceAdded = false, permanentExists = false;
 				for(auto& i: ql) {
 					if(!i->isSource(aUser)) {
 						try {
@@ -576,12 +578,15 @@
 							sourceAdded = true;
 						} catch(...) { }
 					}
+					if (!i->isSet(QueueItem::FLAG_CLIENT_VIEW)) {
+						permanentExists = true;
+					}
 				}
 
-				if(!sourceAdded) {
+				if(!sourceAdded && permanentExists) {
 					throw QueueException(_("This file is already queued"));
 				}
-				goto connect;
+				if (permanentExists) goto connect;
 			}
 		}
 

=== modified file 'dcpp/SettingsManager.cpp'
--- dcpp/SettingsManager.cpp	2012-06-21 18:52:47 +0000
+++ dcpp/SettingsManager.cpp	2012-07-01 15:54:38 +0000
@@ -246,8 +246,8 @@
 	setDefault(PM_LAST_LOG_LINES, 10);
 	setDefault(TOGGLE_ACTIVE_WINDOW, false);
 	setDefault(SEARCH_HISTORY, 10);
-	setDefault(SET_MINISLOT_SIZE, 64);
-	setDefault(MAX_FILELIST_SIZE, 256);
+	setDefault(SET_MINISLOT_SIZE, 512);
+	setDefault(MAX_FILELIST_SIZE, 512);
 	setDefault(PRIO_HIGHEST_SIZE, 64);
 	setDefault(PRIO_HIGH_SIZE, 0);
 	setDefault(PRIO_NORMAL_SIZE, 0);
@@ -478,8 +478,8 @@
 			}
 		}
 
-		if(SETTING(SET_MINISLOT_SIZE) < 64)
-			set(SET_MINISLOT_SIZE, 64);
+		if(SETTING(SET_MINISLOT_SIZE) < 512)
+			set(SET_MINISLOT_SIZE, 512);
 		if(SETTING(AUTODROP_INTERVAL) < 1)
 			set(AUTODROP_INTERVAL, 1);
 		if(SETTING(AUTODROP_ELAPSED) < 1)

=== modified file 'help/settings_queue.html'
--- help/settings_queue.html	2010-01-21 20:20:28 +0000
+++ help/settings_queue.html	2012-07-01 15:54:38 +0000
@@ -114,7 +114,10 @@
 exist in one of your shared directories.</dd>
   <dt>Don't download files already in the queue</dt>
   <dd cshelp="IDH_SETTINGS_QUEUE_DONT_DL_ALREADY_QUEUED">This option will stop you from downloading files which already
-exist in your queue.</dd>
+exist in your queue by blocking the addition of the same file to a different place in the queue. The comparsion is made
+by TTH and not by the name or the size of the file. Even though the addition is blocked the possible new sources will still 
+be aquired and added to the existing file in the queue. If the file already exists in the queue and no new sources found either
+then a &quot;File is already in the queue&quot; message will be shown.</dd>
   <dt id="keepfinished">Keep finished files in the queue</dt>
   <dd cshelp="IDH_SETTINGS_QUEUE_KEEP_FINISHED_FILES">Enable this option if you want to keep downloaded files and folders
 in the download queue after they have been finished. After downloaded the queue items will have 'Finished' status and you