mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-14 00:49:41 -05:00
Merge pull request #1120 from sehraf/pr_fixForumDownloadAll
Fix 'download all' button for forum.
This commit is contained in:
commit
621ed71eeb
@ -1220,6 +1220,11 @@ static void processList(const QStringList &list, const QString &textSingular, co
|
|||||||
errorList << &fileExist << &personExist << &personFailed << &personNotFound << &forumUnknown << &forumMsgUnknown << &channelUnknown << &channelMsgUnknown << &postedUnknown << &postedMsgUnknown << &messageReceipientNotAccepted << &messageReceipientUnknown;
|
errorList << &fileExist << &personExist << &personFailed << &personNotFound << &forumUnknown << &forumMsgUnknown << &channelUnknown << &channelMsgUnknown << &postedUnknown << &postedMsgUnknown << &messageReceipientNotAccepted << &messageReceipientUnknown;
|
||||||
// not needed: forumFound, channelFound, messageStarted
|
// not needed: forumFound, channelFound, messageStarted
|
||||||
|
|
||||||
|
// we want to merge all single file links into one collection
|
||||||
|
// if a collection tree link is found it is processed independen for the other file links
|
||||||
|
RsCollection col;
|
||||||
|
bool fileLinkFound = false;
|
||||||
|
|
||||||
for (linkIt = links.begin(); linkIt != links.end(); ++linkIt) {
|
for (linkIt = links.begin(); linkIt != links.end(); ++linkIt) {
|
||||||
const RetroShareLink &link = *linkIt;
|
const RetroShareLink &link = *linkIt;
|
||||||
|
|
||||||
@ -1364,12 +1369,9 @@ static void processList(const QStringList &list, const QString &textSingular, co
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TYPE_FILE:
|
case TYPE_FILE:
|
||||||
{
|
col.merge_in(link.name(),link.size(),RsFileHash(link.hash().toStdString())) ;
|
||||||
RsCollection col ;
|
fileLinkFound = true;
|
||||||
col.merge_in(link.name(),link.size(),RsFileHash(link.hash().toStdString())) ;
|
|
||||||
col.downloadFiles();
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
@ -1557,6 +1559,10 @@ static void processList(const QStringList &list, const QString &textSingular, co
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// were single file links found?
|
||||||
|
if (fileLinkFound)
|
||||||
|
col.downloadFiles();
|
||||||
|
|
||||||
int countProcessed = 0;
|
int countProcessed = 0;
|
||||||
int countError = 0;
|
int countError = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user