Browse Source

- Removed a useless function

- Stop resfreshing trackers errors in torrent properties because this is annoying when you're trying to read them
adaptive-webui-19844
Christophe Dumez 17 years ago
parent
commit
99a58b9208
  1. 16
      src/bittorrent.cpp
  2. 1
      src/bittorrent.h
  3. 1
      src/properties_imp.cpp

16
src/bittorrent.cpp

@ -771,7 +771,8 @@ void bittorrent::setUploadRateLimit(int rate){
// This function will apply to same ratio to all torrents // This function will apply to same ratio to all torrents
void bittorrent::setGlobalRatio(float ratio){ void bittorrent::setGlobalRatio(float ratio){
std::vector<torrent_handle> handles = s->get_torrents(); std::vector<torrent_handle> handles = s->get_torrents();
for(unsigned int i=0; i<handles.size(); ++i){ unsigned int nbHandles = handles.size();
for(unsigned int i=0; i<nbHandles; ++i){
torrent_handle h = handles[i]; torrent_handle h = handles[i];
if(!h.is_valid()){ if(!h.is_valid()){
qDebug("/!\\ Error: Invalid handle"); qDebug("/!\\ Error: Invalid handle");
@ -1085,19 +1086,6 @@ std::vector<torrent_handle> bittorrent::getTorrentHandles() const{
return s->get_torrents(); return s->get_torrents();
} }
// Return a vector with all finished torrent handles in it
QList<torrent_handle> bittorrent::getFinishedTorrentHandles() const{
QList<torrent_handle> finished;
std::vector<torrent_handle> handles;
for(unsigned int i=0; i<handles.size(); ++i){
torrent_handle h = handles[i];
if(h.is_seed()){
finished << h;
}
}
return finished;
}
QStringList bittorrent::getUncheckedTorrentsList() const{ QStringList bittorrent::getUncheckedTorrentsList() const{
return torrentsUnchecked; return torrentsUnchecked;
} }

1
src/bittorrent.h

@ -72,7 +72,6 @@ class bittorrent : public QObject{
bool isDHTEnabled() const; bool isDHTEnabled() const;
float getPayloadDownloadRate() const; float getPayloadDownloadRate() const;
float getPayloadUploadRate() const; float getPayloadUploadRate() const;
QList<torrent_handle> getFinishedTorrentHandles() const;
session_status getSessionStatus() const; session_status getSessionStatus() const;
int getListenPort() const; int getListenPort() const;
QStringList getTorrentsToPauseAfterChecking() const; QStringList getTorrentsToPauseAfterChecking() const;

1
src/properties_imp.cpp

@ -466,7 +466,6 @@ void properties::updateInfos(){
// torrent was removed, closing properties // torrent was removed, closing properties
close(); close();
} }
loadTrackersErrors();
// Update current tracker // Update current tracker
torrent_status torrentStatus = h.status(); torrent_status torrentStatus = h.status();
QString tracker = QString(torrentStatus.current_tracker.c_str()).trimmed(); QString tracker = QString(torrentStatus.current_tracker.c_str()).trimmed();

Loading…
Cancel
Save