From 6914b7a45dd9b7577513f2f691666bce73ad31bc Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Mon, 13 Apr 2015 05:08:49 +0200 Subject: [PATCH] Update local collection after successful download. --- src/libtomahawk/DownloadManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libtomahawk/DownloadManager.cpp b/src/libtomahawk/DownloadManager.cpp index 0ac573dcb..93af57604 100644 --- a/src/libtomahawk/DownloadManager.cpp +++ b/src/libtomahawk/DownloadManager.cpp @@ -20,6 +20,7 @@ #include +#include "filemetadata/ScanManager.h" #include "TomahawkSettings.h" #include "infosystem/InfoSystem.h" #include "utils/Logger.h" @@ -255,6 +256,10 @@ DownloadManager::onJobFinished() { DownloadJob* job = qobject_cast( sender() ); + QStringList files; + files << job->localFile(); + ScanManager::instance()->runFileScan( files, true ); + Tomahawk::InfoSystem::InfoPushData pushData( "DownloadManager", Tomahawk::InfoSystem::InfoNotifyUser, tr( "Tomahawk finished downloading %1 by %2." ).arg( job->track()->track() ).arg( job->track()->artist() ), Tomahawk::InfoSystem::PushNoFlag );