@jjdenhertog/plex-music-search 1.0.20 → 1.0.22
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/actions/hubSearch.js +1 -1
- package/index.js +3 -2
- package/package.json +1 -1
package/actions/hubSearch.js
CHANGED
@@ -14,7 +14,7 @@ function hubSearch(uri, token, query, limit) {
|
|
14
14
|
if (limit === void 0) { limit = 5; }
|
15
15
|
return new Promise(function (resolve, reject) {
|
16
16
|
// Fix forbidden characters
|
17
|
-
var forbiddenCharacters = ['
|
17
|
+
var forbiddenCharacters = ['(', ')'];
|
18
18
|
for (var i = 0; i < forbiddenCharacters.length; i++) {
|
19
19
|
var element = forbiddenCharacters[i];
|
20
20
|
query = query.split(element).join('');
|
package/index.js
CHANGED
@@ -319,7 +319,7 @@ var PlexMusicSearch = /** @class */ (function () {
|
|
319
319
|
args_1[_i - 4] = arguments[_i];
|
320
320
|
}
|
321
321
|
return __awaiter(_this, __spreadArray([approach_1, artist_1, title_1, album_2], args_1, true), void 0, function (approach, artist, title, album, searchAlbumTracks) {
|
322
|
-
var cacheId, foundCache, searchHandler, searchResults, musicSearchResult, plexTracks;
|
322
|
+
var cacheId, foundCache, searchHandler, searchResults, musicSearchResult, plexTracks, approachId;
|
323
323
|
if (searchAlbumTracks === void 0) { searchAlbumTracks = false; }
|
324
324
|
return __generator(this, function (_a) {
|
325
325
|
switch (_a.label) {
|
@@ -343,7 +343,8 @@ var PlexMusicSearch = /** @class */ (function () {
|
|
343
343
|
.filter(function (item) { return !!item; })
|
344
344
|
.map(function (item) { return (__assign(__assign({}, (0, hubSearchToPlexTrack_1.default)(item)), { matching: item.matching, reason: item.reason })); });
|
345
345
|
this._cache.push({ id: cacheId, result: plexTracks });
|
346
|
-
|
346
|
+
approachId = searchAlbumTracks ? "".concat(approach, "-album") : approach;
|
347
|
+
queries.push({ approach: approachId, artist: artist, title: title, album: album });
|
347
348
|
return [2 /*return*/, plexTracks];
|
348
349
|
}
|
349
350
|
});
|