From ea695779e94bb34a31633b2e3d18886a3be6bd64 Mon Sep 17 00:00:00 2001 From: lappelhans Date: Sat, 5 Jan 2008 21:58:39 +0000 Subject: [PATCH] Make the seeding-status really work git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/KDE/kdenetwork@757783 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kget/transfer-plugins/bittorrent/bttransfer.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kget/transfer-plugins/bittorrent/bttransfer.cpp b/kget/transfer-plugins/bittorrent/bttransfer.cpp index 142a091cd..6ca1d3f5d 100644 --- a/kget/transfer-plugins/bittorrent/bttransfer.cpp +++ b/kget/transfer-plugins/bittorrent/bttransfer.cpp @@ -105,8 +105,6 @@ void BTTransfer::stop() void BTTransfer::update() { - kDebug(5001); - if (torrent) { QStringList files; @@ -245,11 +243,12 @@ void BTTransfer::stopTorrent() void BTTransfer::updateTorrent() { kDebug(5001) << "Update torrent"; + if (chunksTotal() == chunksDownloaded()) + slotDownloadFinished(torrent); + bt::UpdateCurrentTime(); bt::AuthenticationMonitor::instance().update(); - kDebug(5001) << "Ignore this ;)"; torrent->update(); - kDebug(5001) << "Done"; m_speed = dlRate(); m_percent = percent(); m_processedSize = processedSize(); @@ -333,11 +332,12 @@ void BTTransfer::slotStoppedByError(const bt::TorrentInterface* &error, const QS void BTTransfer::slotDownloadFinished(bt::TorrentInterface* ti) { + kDebug(5001) << "Start seeding *********************************************************************"; Q_UNUSED(ti); kDebug(5001); m_downloadFinished = true; timer.stop(); - setStatus(Job::Running, i18n("Seeding"), SmallIcon("media-playback-start")); + setStatus(Job::Running, i18nc("Transfer status: seeding", "Seeding.."), SmallIcon("media-playback-start")); setTransferChange(Tc_Status, true); } -- 2.11.4.GIT