diff --git a/src/libtomahawk/resolvers/QtScriptResolver.cpp b/src/libtomahawk/resolvers/QtScriptResolver.cpp index 95b14c070..c0c631e71 100644 --- a/src/libtomahawk/resolvers/QtScriptResolver.cpp +++ b/src/libtomahawk/resolvers/QtScriptResolver.cpp @@ -342,6 +342,13 @@ QtScriptResolver::init() m_icon = ico.scaled( m_icon.size(), Qt::IgnoreAspectRatio ); success = true; } + // see if the resolver sent an icon path to not break the old (unofficial) api. + // TODO: remove this and publish a definitive api + if ( !success ) + { + QString iconPath = QFileInfo( filePath() ).path() + "/" + m.value( "icon" ).toString(); + success = m_icon.load( iconPath ); + } // load config widget and apply settings loadUi(); diff --git a/src/libtomahawk/resolvers/ScriptResolver.cpp b/src/libtomahawk/resolvers/ScriptResolver.cpp index 95fac1c3b..b254dde32 100644 --- a/src/libtomahawk/resolvers/ScriptResolver.cpp +++ b/src/libtomahawk/resolvers/ScriptResolver.cpp @@ -392,6 +392,13 @@ ScriptResolver::doSetup( const QVariantMap& m ) m_icon = ico.scaled( m_icon.size(), Qt::IgnoreAspectRatio ); success = true; } + // see if the resolver sent an icon path to not break the old (unofficial) api. + // TODO: remove this and publish a definitive api + if ( !success ) + { + QString iconPath = QFileInfo( filePath() ).path() + "/" + m.value( "icon" ).toString(); + success = m_icon.load( iconPath ); + } qDebug() << "SCRIPT" << filePath() << "READY," << "name" << m_name << "weight" << m_weight << "timeout" << m_timeout << "icon received" << success;