1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 15:59:42 +01:00

Pass filter to [artist]Albums() in script collection

This commit is contained in:
Dominik Schmidt 2015-04-07 00:51:30 +02:00 committed by Christian Muehlhaeuser
parent e519637546
commit df1d071922

View File

@ -71,18 +71,25 @@ ScriptCommand_AllAlbums::exec()
return;
}
ScriptJob* job;
QString methodName;
QVariantMap arguments;
if ( m_artist )
{
QVariantMap arguments;
methodName = "artistAlbums";
arguments[ "artist" ] = m_artist->name();
job = collection->scriptObject()->invoke( "artistAlbums", arguments );
}
else
{
job = collection->scriptObject()->invoke( "albums" );
methodName = "albums";
}
if ( !m_filter.isEmpty() )
{
arguments[ "filter" ] = m_filter;
}
ScriptJob* job = collection->scriptObject()->invoke( methodName, arguments );
connect( job, SIGNAL( done( QVariantMap ) ), SLOT( onAlbumsJobDone( QVariantMap ) ), Qt::QueuedConnection );
job->start();
}