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:
parent
e519637546
commit
df1d071922
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user