Browse Source

- Save less trackers errors to save memory

adaptive-webui-19844
Christophe Dumez 17 years ago
parent
commit
495d6f2bab
  1. 3
      TODO
  2. 3
      src/bittorrent.cpp

3
TODO

@ -38,6 +38,7 @@
- Allow to automatically delete torrents when they reach a given ratio (in options) : easy - Allow to automatically delete torrents when they reach a given ratio (in options) : easy
- Allow to limit the number of downloading torrents simultaneously (other are paused until a download finishes) - Allow to limit the number of downloading torrents simultaneously (other are paused until a download finishes)
- Add "Mark all as read" feature for RSS - Add "Mark all as read" feature for RSS
- Allow to customize lists refreshing interval (in options)
// in v1.0.0 (partial) - WIP // in v1.0.0 (partial) - WIP
- Check storage st creation + hasher in torrent creation - Check storage st creation + hasher in torrent creation
@ -47,7 +48,7 @@
- Windows port (Chris - Peerkoel) - Windows port (Chris - Peerkoel)
- write a patch for file_priority(int index), actual_size(); - write a patch for file_priority(int index), actual_size();
- valgrind --tool=memcheck --leak-check=full src/qbittorrent (Looks ok) - valgrind --tool=memcheck --leak-check=full src/qbittorrent (Looks ok)
- 134m 35m 16m S 0.3 3.5 4:04.77 qbittorrent - 129m 30m 16m S 5.8 3.0 0:04.36 qbittorrent
* beta 6 * beta 6
- Translations update (IN PROGRESS) - Translations update (IN PROGRESS)
- Wait for some bug fixes in libtorrent : - Wait for some bug fixes in libtorrent :

3
src/bittorrent.cpp

@ -40,6 +40,7 @@
#include "deleteThread.h" #include "deleteThread.h"
#define ETAS_MAX_VALUES 8 #define ETAS_MAX_VALUES 8
#define MAX_TRACKER_ERRORS 2
// Main constructor // Main constructor
bittorrent::bittorrent() : timerScan(0), DHTEnabled(false){ bittorrent::bittorrent() : timerScan(0), DHTEnabled(false){
@ -989,7 +990,7 @@ void bittorrent::readAlerts() {
if(h.is_valid()){ if(h.is_valid()){
QString hash = h.hash(); QString hash = h.hash();
QList<QPair<QString, QString> > errors = trackersErrors.value(hash, QList<QPair<QString, QString> >()); QList<QPair<QString, QString> > errors = trackersErrors.value(hash, QList<QPair<QString, QString> >());
if(errors.size() > 5) if(errors.size() > MAX_TRACKER_ERRORS)
errors.removeAt(0); errors.removeAt(0);
errors << QPair<QString,QString>(QTime::currentTime().toString("hh:mm:ss"), QString::fromUtf8(a->msg().c_str())); errors << QPair<QString,QString>(QTime::currentTime().toString("hh:mm:ss"), QString::fromUtf8(a->msg().c_str()));
trackersErrors[hash] = errors; trackersErrors[hash] = errors;

Loading…
Cancel
Save