Browse Source

Update torrent progress when its content changed (filtered files)

adaptive-webui-19844
Christophe Dumez 17 years ago
parent
commit
99530728c5
  1. 1
      Changelog
  2. 1
      TODO
  3. 7
      src/GUI.cpp
  4. 2
      src/GUI.h

1
Changelog

@ -44,6 +44,7 @@
- BUGFIX: search plugin update - do not display only last version changelog - BUGFIX: search plugin update - do not display only last version changelog
- BUGFIX: Search plugin update - fixed missing new lines in changelog - BUGFIX: Search plugin update - fixed missing new lines in changelog
- BUGFIX: The number of search results was not reset when clicking on 'Clear' button - BUGFIX: The number of search results was not reset when clicking on 'Clear' button
- BUGFIX: Update torrent progress when its content changed (filtered files)
- COSMETIC: Redesigned torrent properties a little - COSMETIC: Redesigned torrent properties a little
- COSMETIC: Redesigned options a little - COSMETIC: Redesigned options a little
- COSMETIC: Display more logs messages concerning features - COSMETIC: Display more logs messages concerning features

1
TODO

@ -47,7 +47,6 @@
- Translations update (IN PROGESS) - Translations update (IN PROGESS)
- Optimize and cleanup code - Optimize and cleanup code
- add asserts to squash remaining bugs - add asserts to squash remaining bugs
- Update progress (as well as size) when a torrent's content hash changed (filtered files)
- Check that there is no problem with right click menu in torrent content (all files filtered for example) - Check that there is no problem with right click menu in torrent content (all files filtered for example)
- Wait for some bug fixes in libtorrent : - Wait for some bug fixes in libtorrent :
- upload/download limit per torrent - upload/download limit per torrent

7
src/GUI.cpp

@ -1243,14 +1243,17 @@ void GUI::showProperties(const QModelIndex &index){
torrent_handle h = BTSession->getTorrentHandle(fileHash); torrent_handle h = BTSession->getTorrentHandle(fileHash);
properties *prop = new properties(this, BTSession, h); properties *prop = new properties(this, BTSession, h);
connect(prop, SIGNAL(mustHaveFullAllocationMode(torrent_handle)), BTSession, SLOT(reloadTorrent(torrent_handle))); connect(prop, SIGNAL(mustHaveFullAllocationMode(torrent_handle)), BTSession, SLOT(reloadTorrent(torrent_handle)));
connect(prop, SIGNAL(filteredFilesChanged(QString)), this, SLOT(updateFileSize(QString))); connect(prop, SIGNAL(filteredFilesChanged(QString)), this, SLOT(updateFileSizeAndProgress(QString)));
prop->show(); prop->show();
} }
void GUI::updateFileSize(QString hash){ void GUI::updateFileSizeAndProgress(QString hash){
int row = getRowFromHash(hash); int row = getRowFromHash(hash);
Q_ASSERT(row != -1); Q_ASSERT(row != -1);
DLListModel->setData(DLListModel->index(row, SIZE), QVariant((qlonglong)BTSession->torrentEffectiveSize(hash))); DLListModel->setData(DLListModel->index(row, SIZE), QVariant((qlonglong)BTSession->torrentEffectiveSize(hash)));
torrent_handle h = BTSession->getTorrentHandle(hash);
torrent_status torrentStatus = h.status();
DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)torrentStatus.progress));
} }
// Set BT session configuration // Set BT session configuration

2
src/GUI.h

@ -171,7 +171,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{
void portListeningFailure(); void portListeningFailure();
void trackerAuthenticationRequired(torrent_handle& h); void trackerAuthenticationRequired(torrent_handle& h);
void setTabText(int index, QString text); void setTabText(int index, QString text);
void updateFileSize(QString hash); void updateFileSizeAndProgress(QString hash);
void sortProgressColumnDelayed(); void sortProgressColumnDelayed();
void addUrlSeedError(QString url, QString msg); void addUrlSeedError(QString url, QString msg);

Loading…
Cancel
Save