- COSMETIC: Display "unpaused/total_torrent" in download/upload tabs

This commit is contained in:
Christophe Dumez 2008-05-18 09:26:02 +00:00
parent fc931d8c88
commit 711699e200
4 changed files with 47 additions and 6 deletions

View file

@ -203,6 +203,26 @@ bool bittorrent::isPaused(QString hash) const{
return h.is_paused();
}
unsigned int bittorrent::getFinishedPausedTorrentsNb() const {
unsigned int nbPaused = 0;
foreach(QString hash, finishedTorrents) {
if(isPaused(hash)) {
++nbPaused;
}
}
return nbPaused;
}
unsigned int bittorrent::getUnfinishedPausedTorrentsNb() const {
unsigned int nbPaused = 0;
foreach(QString hash, unfinishedTorrents) {
if(isPaused(hash)) {
++nbPaused;
}
}
return nbPaused;
}
// Delete a torrent from the session, given its hash
// permanent = true means that the torrent will be removed from the hard-drive too
void bittorrent::deleteTorrent(QString hash, bool permanent) {