1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-01-17 14:28:24 +01:00

Don't use collectionId from resolvers anymore

This commit is contained in:
Dominik Schmidt 2015-11-20 23:57:08 +01:00
parent 8679713dea
commit 88099eae0e
3 changed files with 2 additions and 32 deletions

View File

@ -1497,7 +1497,6 @@ Tomahawk.Collection = {
},
_fuzzyIndexIdsToTracks: function (resultIds, id) {
var collection = this;
if (typeof id === 'undefined') {
id = this.settings.id;
}
@ -1514,8 +1513,7 @@ Tomahawk.Collection = {
linkUrl: row.linkUrl,
releaseyear: row.releaseyear,
bitrate: row.bitrate,
albumpos: row.albumPos,
collectionId: collection.id
albumpos: row.albumPos
};
};
for (var idx = 0; resultIds && idx < resultIds.length; idx++) {
@ -1573,8 +1571,6 @@ Tomahawk.Collection = {
},
tracks: function (params, where) {
var collection = this;
//TODO filter/where support
var id = params.id;
if (typeof id === 'undefined') {
@ -1594,8 +1590,7 @@ Tomahawk.Collection = {
linkUrl: row.linkUrl,
releaseyear: row.releaseyear,
bitrate: row.bitrate,
albumpos: row.albumPos,
collectionId: collection.id
albumpos: row.albumPos
};
};
t.sqlSelect("tracks", mapFn,

View File

@ -326,21 +326,6 @@ ScriptAccount::parseResultVariantList( const QVariantList& reslist )
}
rp->setDownloadFormats( fl );
// find collection
const QString collectionId = m.value( "collectionId" ).toString();
if ( !collectionId.isEmpty() )
{
if ( scriptCollection( collectionId ).isNull() )
{
tLog() << "Resolver returned invalid collection id";
Q_ASSERT( false );
}
else
{
rp->setResolvedByCollection( scriptCollection( collectionId ) );
}
}
results << rp;
}
@ -348,13 +333,6 @@ ScriptAccount::parseResultVariantList( const QVariantList& reslist )
}
QSharedPointer< ScriptCollection >
ScriptAccount::scriptCollection( const QString& id ) const
{
return m_collectionFactory->scriptPlugins().value( id );
}
ScriptJob*
ScriptAccount::resolve( const scriptobject_ptr& scriptObject, const query_ptr& query )
{

View File

@ -76,9 +76,6 @@ public:
virtual void scriptPluginFactory( const QString& type, const scriptobject_ptr& object );
QSharedPointer< ScriptCollection > scriptCollection( const QString& id ) const;
// helpers
QList< Tomahawk::result_ptr > parseResultVariantList( const QVariantList& reslist );
ScriptJob* resolve( const scriptobject_ptr& scriptObject, const query_ptr& query );