Skip to content

Commit 2df8abd

Browse files
author
Zarlex
committed
Verify tracks returned by search are supported
1 parent 865ab33 commit 2df8abd

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# v5.3.4
2+
- Verify that tracks returned by search are supported
3+
14
# v5.3.4
25
- Fix broken search by defining providers that shall be returned to ignore providers that are not yet supported
36

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cloud-player",
3-
"version": "5.3.4",
3+
"version": "5.3.5",
44
"description": "Music/video player to play music from YouTube, SoundCloud and Mixcloud",
55
"scripts": {
66
"ng": "ng",

src/app/modules/api/tracks/tracks-auxapp.collection.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,16 @@ export class TracksAuxappCollection<TModel extends TrackAuxappModel>
2929
queryParams: {
3030
[key: string]: string | number | boolean
3131
} = {};
32+
33+
parse(items) {
34+
const supportedItems = [];
35+
items.forEach((item) => {
36+
if (item instanceof TrackSoundcloudModel ||
37+
item instanceof TrackYoutubeModel ||
38+
item instanceof TrackMixcloudModel) {
39+
supportedItems.push(item);
40+
}
41+
});
42+
return supportedItems;
43+
}
3244
}

0 commit comments

Comments
 (0)