From 90d6f0d4e5ef0922d419a282bf28f37edc7110ab Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Thu, 19 Nov 2015 01:24:07 +0100 Subject: [PATCH] Set collectionId on results from Tomahawk.Collection --- data/js/tomahawk.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/data/js/tomahawk.js b/data/js/tomahawk.js index 369f7633f..e6eb59ea0 100644 --- a/data/js/tomahawk.js +++ b/data/js/tomahawk.js @@ -1587,6 +1587,7 @@ Tomahawk.Collection = { }, _fuzzyIndexIdsToTracks: function (resultIds, id) { + var collection = this; if (typeof id === 'undefined') { id = this.settings.id; } @@ -1603,7 +1604,8 @@ Tomahawk.Collection = { linkUrl: row.linkUrl, releaseyear: row.releaseyear, bitrate: row.bitrate, - albumpos: row.albumPos + albumpos: row.albumPos, + collectionId: collection.id }; }; for (var idx = 0; resultIds && idx < resultIds.length; idx++) { @@ -1648,6 +1650,8 @@ Tomahawk.Collection = { }, tracks: function (params, where) { + var collection = this; + //TODO filter/where support var id = params.id; if (typeof id === 'undefined') { @@ -1667,7 +1671,8 @@ Tomahawk.Collection = { linkUrl: row.linkUrl, releaseyear: row.releaseyear, bitrate: row.bitrate, - albumpos: row.albumPos + albumpos: row.albumPos, + collectionId: collection.id }; }; t.sqlSelect("tracks", mapFn,