mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 09:04:33 +02:00
* Fixed bad url detection in last.fm plugin.
This commit is contained in:
@@ -82,8 +82,7 @@ LastFmPlugin::LastFmPlugin( QObject* parent )
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
m_badUrls << QUrl( "http://cdn.last.fm/flatness/catalogue/noimage" )
|
m_badUrls << QUrl( "http://cdn.last.fm/flatness/catalogue/noimage" );
|
||||||
<< QUrl( "http://cdn.last.fm/flatness/catalogue/noimage/2/default_artist_medium.png" );
|
|
||||||
|
|
||||||
connect( TomahawkSettings::instance(), SIGNAL( changed() ),
|
connect( TomahawkSettings::instance(), SIGNAL( changed() ),
|
||||||
SLOT( settingsChanged() ), Qt::QueuedConnection );
|
SLOT( settingsChanged() ), Qt::QueuedConnection );
|
||||||
@@ -283,8 +282,11 @@ LastFmPlugin::coverArtReturned()
|
|||||||
if ( redir.isEmpty() )
|
if ( redir.isEmpty() )
|
||||||
{
|
{
|
||||||
QByteArray ba = reply->readAll();
|
QByteArray ba = reply->readAll();
|
||||||
if ( m_badUrls.contains( reply->url() ) )
|
foreach ( const QUrl& url, m_badUrls )
|
||||||
ba = QByteArray();
|
{
|
||||||
|
if ( reply->url().toString().startsWith( url.toString() ) )
|
||||||
|
ba = QByteArray();
|
||||||
|
}
|
||||||
|
|
||||||
InfoCustomData returnedData;
|
InfoCustomData returnedData;
|
||||||
returnedData["imgbytes"] = ba;
|
returnedData["imgbytes"] = ba;
|
||||||
|
Reference in New Issue
Block a user