mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 06:07:37 +02:00
Pass filter to [artist]Albums() in script collection
This commit is contained in:
committed by
Christian Muehlhaeuser
parent
e519637546
commit
df1d071922
@@ -71,18 +71,25 @@ ScriptCommand_AllAlbums::exec()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptJob* job;
|
QString methodName;
|
||||||
|
QVariantMap arguments;
|
||||||
|
|
||||||
if ( m_artist )
|
if ( m_artist )
|
||||||
{
|
{
|
||||||
QVariantMap arguments;
|
methodName = "artistAlbums";
|
||||||
arguments[ "artist" ] = m_artist->name();
|
arguments[ "artist" ] = m_artist->name();
|
||||||
job = collection->scriptObject()->invoke( "artistAlbums", arguments );
|
|
||||||
}
|
}
|
||||||
else
|
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 );
|
connect( job, SIGNAL( done( QVariantMap ) ), SLOT( onAlbumsJobDone( QVariantMap ) ), Qt::QueuedConnection );
|
||||||
job->start();
|
job->start();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user