mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 06:07:37 +02:00
Set collectionId on results from Tomahawk.Collection
This commit is contained in:
@@ -1587,6 +1587,7 @@ 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;
|
||||||
}
|
}
|
||||||
@@ -1603,7 +1604,8 @@ 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++) {
|
||||||
@@ -1648,6 +1650,8 @@ 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') {
|
||||||
@@ -1667,7 +1671,8 @@ 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,
|
||||||
|
Reference in New Issue
Block a user