mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-10 16:14:40 +02:00
* LastFmInfoPlugin logs which covers it fails to load.
This commit is contained in:
@@ -801,13 +801,17 @@ LastFmInfoPlugin::coverArtReturned()
|
|||||||
QUrl redir = reply->attribute( QNetworkRequest::RedirectionTargetAttribute ).toUrl();
|
QUrl redir = reply->attribute( QNetworkRequest::RedirectionTargetAttribute ).toUrl();
|
||||||
if ( redir.isEmpty() )
|
if ( redir.isEmpty() )
|
||||||
{
|
{
|
||||||
|
Tomahawk::InfoSystem::InfoRequestData requestData = reply->property( "requestData" ).value< Tomahawk::InfoSystem::InfoRequestData >();
|
||||||
|
Tomahawk::InfoSystem::InfoStringHash origData = requestData.input.value< Tomahawk::InfoSystem::InfoStringHash>();
|
||||||
|
|
||||||
QByteArray ba = reply->readAll();
|
QByteArray ba = reply->readAll();
|
||||||
if ( ba.isNull() || !ba.length() )
|
if ( ba.isNull() || !ba.length() )
|
||||||
{
|
{
|
||||||
tLog() << Q_FUNC_INFO << "Uh oh, null byte array";
|
tLog() << Q_FUNC_INFO << "Null byte array for cover of" << origData["artist"] << origData["album"];
|
||||||
emit info( reply->property( "requestData" ).value< Tomahawk::InfoSystem::InfoRequestData >(), QVariant() );
|
emit info( requestData, QVariant() );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ( const QUrl& url, m_badUrls )
|
foreach ( const QUrl& url, m_badUrls )
|
||||||
{
|
{
|
||||||
if ( reply->url().toString().startsWith( url.toString() ) )
|
if ( reply->url().toString().startsWith( url.toString() ) )
|
||||||
@@ -818,11 +822,8 @@ LastFmInfoPlugin::coverArtReturned()
|
|||||||
returnedData["imgbytes"] = ba;
|
returnedData["imgbytes"] = ba;
|
||||||
returnedData["url"] = reply->url().toString();
|
returnedData["url"] = reply->url().toString();
|
||||||
|
|
||||||
Tomahawk::InfoSystem::InfoRequestData requestData = reply->property( "requestData" ).value< Tomahawk::InfoSystem::InfoRequestData >();
|
|
||||||
|
|
||||||
emit info( requestData, returnedData );
|
emit info( requestData, returnedData );
|
||||||
|
|
||||||
Tomahawk::InfoSystem::InfoStringHash origData = requestData.input.value< Tomahawk::InfoSystem::InfoStringHash>();
|
|
||||||
Tomahawk::InfoSystem::InfoStringHash criteria;
|
Tomahawk::InfoSystem::InfoStringHash criteria;
|
||||||
criteria["artist"] = origData["artist"];
|
criteria["artist"] = origData["artist"];
|
||||||
criteria["album"] = origData["album"];
|
criteria["album"] = origData["album"];
|
||||||
|
Reference in New Issue
Block a user