mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 20:00:13 +02:00
Don't use collectionId from resolvers anymore
This commit is contained in:
@@ -1497,7 +1497,6 @@ Tomahawk.Collection = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_fuzzyIndexIdsToTracks: function (resultIds, id) {
|
_fuzzyIndexIdsToTracks: function (resultIds, id) {
|
||||||
var collection = this;
|
|
||||||
if (typeof id === 'undefined') {
|
if (typeof id === 'undefined') {
|
||||||
id = this.settings.id;
|
id = this.settings.id;
|
||||||
}
|
}
|
||||||
@@ -1514,8 +1513,7 @@ Tomahawk.Collection = {
|
|||||||
linkUrl: row.linkUrl,
|
linkUrl: row.linkUrl,
|
||||||
releaseyear: row.releaseyear,
|
releaseyear: row.releaseyear,
|
||||||
bitrate: row.bitrate,
|
bitrate: row.bitrate,
|
||||||
albumpos: row.albumPos,
|
albumpos: row.albumPos
|
||||||
collectionId: collection.id
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
for (var idx = 0; resultIds && idx < resultIds.length; idx++) {
|
for (var idx = 0; resultIds && idx < resultIds.length; idx++) {
|
||||||
@@ -1573,8 +1571,6 @@ Tomahawk.Collection = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
tracks: function (params, where) {
|
tracks: function (params, where) {
|
||||||
var collection = this;
|
|
||||||
|
|
||||||
//TODO filter/where support
|
//TODO filter/where support
|
||||||
var id = params.id;
|
var id = params.id;
|
||||||
if (typeof id === 'undefined') {
|
if (typeof id === 'undefined') {
|
||||||
@@ -1594,8 +1590,7 @@ Tomahawk.Collection = {
|
|||||||
linkUrl: row.linkUrl,
|
linkUrl: row.linkUrl,
|
||||||
releaseyear: row.releaseyear,
|
releaseyear: row.releaseyear,
|
||||||
bitrate: row.bitrate,
|
bitrate: row.bitrate,
|
||||||
albumpos: row.albumPos,
|
albumpos: row.albumPos
|
||||||
collectionId: collection.id
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
t.sqlSelect("tracks", mapFn,
|
t.sqlSelect("tracks", mapFn,
|
||||||
|
@@ -326,21 +326,6 @@ ScriptAccount::parseResultVariantList( const QVariantList& reslist )
|
|||||||
}
|
}
|
||||||
rp->setDownloadFormats( fl );
|
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;
|
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*
|
ScriptJob*
|
||||||
ScriptAccount::resolve( const scriptobject_ptr& scriptObject, const query_ptr& query )
|
ScriptAccount::resolve( const scriptobject_ptr& scriptObject, const query_ptr& query )
|
||||||
{
|
{
|
||||||
|
@@ -76,9 +76,6 @@ public:
|
|||||||
|
|
||||||
virtual void scriptPluginFactory( const QString& type, const scriptobject_ptr& object );
|
virtual void scriptPluginFactory( const QString& type, const scriptobject_ptr& object );
|
||||||
|
|
||||||
QSharedPointer< ScriptCollection > scriptCollection( const QString& id ) const;
|
|
||||||
|
|
||||||
|
|
||||||
// helpers
|
// helpers
|
||||||
QList< Tomahawk::result_ptr > parseResultVariantList( const QVariantList& reslist );
|
QList< Tomahawk::result_ptr > parseResultVariantList( const QVariantList& reslist );
|
||||||
ScriptJob* resolve( const scriptobject_ptr& scriptObject, const query_ptr& query );
|
ScriptJob* resolve( const scriptobject_ptr& scriptObject, const query_ptr& query );
|
||||||
|
Reference in New Issue
Block a user