mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-17 19:37:09 +02:00
Don't use QVariantHash instead of QVariantMap for artist biographies
This commit is contained in:
@@ -182,7 +182,7 @@ EchonestPlugin::getArtistBiographySlot()
|
|||||||
QVariantMap biographyMap;
|
QVariantMap biographyMap;
|
||||||
Q_FOREACH( const Echonest::Biography& biography, biographies )
|
Q_FOREACH( const Echonest::Biography& biography, biographies )
|
||||||
{
|
{
|
||||||
QVariantHash siteData;
|
QVariantMap siteData;
|
||||||
siteData[ "site" ] = biography.site();
|
siteData[ "site" ] = biography.site();
|
||||||
siteData[ "url" ] = biography.url().toString();
|
siteData[ "url" ] = biography.url().toString();
|
||||||
siteData[ "text" ] = biography.text();
|
siteData[ "text" ] = biography.text();
|
||||||
|
@@ -547,7 +547,7 @@ Artist::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVari
|
|||||||
foreach ( const QString& source, bmap.keys() )
|
foreach ( const QString& source, bmap.keys() )
|
||||||
{
|
{
|
||||||
if ( source == "last.fm" )
|
if ( source == "last.fm" )
|
||||||
m_biography = bmap[ source ].toHash()[ "text" ].toString();
|
m_biography = bmap[ source ].toMap()[ "text" ].toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_biographyLoaded = true;
|
m_biographyLoaded = true;
|
||||||
|
@@ -736,7 +736,7 @@ LastFmInfoPlugin::artistInfoReturned()
|
|||||||
.replace( trackRegExp, "<a href=\"tomahawk://view/track?artist=\\2&album=\\3&name=\\4\">" )
|
.replace( trackRegExp, "<a href=\"tomahawk://view/track?artist=\\2&album=\\3&name=\\4\">" )
|
||||||
.replace( "&album=_", "" );
|
.replace( "&album=_", "" );
|
||||||
|
|
||||||
QVariantHash siteData;
|
QVariantMap siteData;
|
||||||
siteData[ "site" ] = "last.fm";
|
siteData[ "site" ] = "last.fm";
|
||||||
siteData[ "text" ] = biography.replace( "\r", "\n" ).replace( "\n\n", "\n" );
|
siteData[ "text" ] = biography.replace( "\r", "\n" ).replace( "\n\n", "\n" );
|
||||||
siteData[ "summary" ] = lfm["artist"]["bio"]["summary"].text().trimmed().replace( "\r", "\n" ).replace( "\n\n", "\n" );
|
siteData[ "summary" ] = lfm["artist"]["bio"]["summary"].text().trimmed().replace( "\r", "\n" ).replace( "\n\n", "\n" );
|
||||||
|
Reference in New Issue
Block a user