@jjdenhertog/plex-music-search 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +4 -2
- package/package.json +1 -1
package/index.js
CHANGED
@@ -271,11 +271,12 @@ var PlexMusicSearch = /** @class */ (function () {
|
|
271
271
|
};
|
272
272
|
PlexMusicSearch.prototype._newTrackSearch = function (approaches, searchTrack, includeMatching) {
|
273
273
|
return __awaiter(this, void 0, void 0, function () {
|
274
|
-
var id, artists, title, album, j, artist, result, _e_2;
|
274
|
+
var id, artists, title, album, queries, j, artist, result, _e_2;
|
275
275
|
return __generator(this, function (_a) {
|
276
276
|
switch (_a.label) {
|
277
277
|
case 0:
|
278
278
|
id = searchTrack.id, artists = searchTrack.artists, title = searchTrack.title, album = searchTrack.album;
|
279
|
+
queries = [];
|
279
280
|
j = 0;
|
280
281
|
_a.label = 1;
|
281
282
|
case 1:
|
@@ -287,6 +288,7 @@ var PlexMusicSearch = /** @class */ (function () {
|
|
287
288
|
return [4 /*yield*/, this._findTrack(approaches, { id: id, artist: artist, title: title, album: album }, includeMatching)];
|
288
289
|
case 3:
|
289
290
|
result = _a.sent();
|
291
|
+
queries = queries.concat(result.queries);
|
290
292
|
if (result && result.result.length > 0)
|
291
293
|
return [2 /*return*/, result];
|
292
294
|
return [3 /*break*/, 5];
|
@@ -296,7 +298,7 @@ var PlexMusicSearch = /** @class */ (function () {
|
|
296
298
|
case 5:
|
297
299
|
j++;
|
298
300
|
return [3 /*break*/, 1];
|
299
|
-
case 6: return [2 /*return*/, { id: id, artist: artists[0], title: title, album: album || "", result: [] }];
|
301
|
+
case 6: return [2 /*return*/, { id: id, artist: artists[0], title: title, album: album || "", queries: queries, result: [] }];
|
300
302
|
}
|
301
303
|
});
|
302
304
|
});
|