mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-12 02:55:18 -04:00
- added NETWORK_WIDE flag to remote dir model download
- added file priority strategy based on which files are requested first. This provides: - equal file speed for files with equal (source,priority) - effective priority speed for file of same source but different priority - removed state variable load/save from turtle, as it's not needed anymore (FileRequest re-opens tunnels as needed) - manage availability per peer instead of per file type: direct peer ids always assume file availability, while turtle tunnels don't I still need to make the download queue work, and code this gui for it. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2133 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
0266420798
commit
a70b106005
15 changed files with 352 additions and 209 deletions
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include "RemoteDirModel.h"
|
||||
#include "rsiface/rsfiles.h"
|
||||
#include "rsiface/rstypes.h"
|
||||
|
||||
#include <QtGui>
|
||||
#include <QIcon>
|
||||
|
@ -867,7 +868,7 @@ void RemoteDirModel::downloadSelected(QModelIndexList list)
|
|||
std::list<std::string> srcIds;
|
||||
srcIds.push_back(details.id);
|
||||
rsFiles -> FileRequest(details.name, details.hash,
|
||||
details.count, "", 0, srcIds);
|
||||
details.count, "", RS_FILE_HINTS_NETWORK_WIDE, srcIds);
|
||||
}
|
||||
/* if it is a dir, copy all files included*/
|
||||
else if (details.type == DIR_TYPE_DIR)
|
||||
|
@ -888,7 +889,7 @@ void RemoteDirModel::downloadDirectory(const DirDetails & dirDetails, int prefix
|
|||
QString cleanPath = QDir::cleanPath((rsFiles->getDownloadDirectory() + "/" + dirDetails.path.substr(prefixLen)).c_str());
|
||||
|
||||
srcIds.push_back(dirDetails.id);
|
||||
rsFiles->FileRequest(dirDetails.name, dirDetails.hash, dirDetails.count, cleanPath.toStdString(), 0, srcIds);
|
||||
rsFiles->FileRequest(dirDetails.name, dirDetails.hash, dirDetails.count, cleanPath.toStdString(), RS_FILE_HINTS_NETWORK_WIDE, srcIds);
|
||||
}
|
||||
else if (dirDetails.type & DIR_TYPE_DIR)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue