mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-03 20:57:52 +02:00
DownloadJob: make sure resolvedBy() is not null
This commit is contained in:
@@ -209,9 +209,13 @@ DownloadJob::download()
|
|||||||
|
|
||||||
setState( Running );
|
setState( Running );
|
||||||
|
|
||||||
|
if (m_result->resolvedBy() != nullptr) {
|
||||||
Tomahawk::ScriptJob *job = m_result->resolvedBy()->getDownloadUrl( m_result, m_format );
|
Tomahawk::ScriptJob *job = m_result->resolvedBy()->getDownloadUrl( m_result, m_format );
|
||||||
connect( job, SIGNAL( done(QVariantMap) ), SLOT( onUrlRetrieved(QVariantMap) ) );
|
connect( job, SIGNAL( done(QVariantMap) ), SLOT( onUrlRetrieved(QVariantMap) ) );
|
||||||
job->start();
|
job->start();
|
||||||
|
} else {
|
||||||
|
onUrlRetrieved({{"url", m_format.url}});
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user