poru-applemusic
Advanced tools
Comparing version 1.0.0 to 1.2.0
@@ -80,12 +80,9 @@ import { Poru, ResolveOptions, Track, Plugin } from "poru"; | ||
case "album": { | ||
this.getAlbum(query, requester); | ||
break; | ||
return this.getAlbum(query, requester); | ||
} | ||
case "playlist": { | ||
this.getPlaylist(query, requester); | ||
break; | ||
return this.getPlaylist(query, requester); | ||
} | ||
case "artist": { | ||
this.getArtist(query, requester); | ||
break; | ||
return this.getArtist(query, requester); | ||
} | ||
@@ -145,3 +142,6 @@ } | ||
const unresolvedTracks = this.buildUnresolved(album.data[0], requester); | ||
const tracks = await album.data[0].relationships.tracks.data; | ||
const unresolvedTracks = await Promise.all( | ||
await tracks.map((x) => this.buildUnresolved(x, requester)) | ||
); | ||
@@ -148,0 +148,0 @@ return this.buildResponse("PLAYLIST_LOADED", unresolvedTracks); |
@@ -57,12 +57,9 @@ "use strict"; | ||
case "album": { | ||
this.getAlbum(query, requester); | ||
break; | ||
return this.getAlbum(query, requester); | ||
} | ||
case "playlist": { | ||
this.getPlaylist(query, requester); | ||
break; | ||
return this.getPlaylist(query, requester); | ||
} | ||
case "artist": { | ||
this.getArtist(query, requester); | ||
break; | ||
return this.getArtist(query, requester); | ||
} | ||
@@ -104,3 +101,4 @@ } | ||
let album = await this.getData(`/albums/${id}`); | ||
const unresolvedTracks = this.buildUnresolved(album.data[0], requester); | ||
const tracks = await album.data[0].relationships.tracks.data; | ||
const unresolvedTracks = await Promise.all(await tracks.map((x) => this.buildUnresolved(x, requester))); | ||
return this.buildResponse("PLAYLIST_LOADED", unresolvedTracks); | ||
@@ -107,0 +105,0 @@ } |
{ | ||
"name": "poru-applemusic", | ||
"version": "1.0.0", | ||
"version": "1.2.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -21,3 +21,3 @@ # Apple Music Plugin for poru | ||
const appleMusic = newAppleMusic({ | ||
const appleMusic = new AppleMusic({ | ||
countryCode:"us", | ||
@@ -24,0 +24,0 @@ imageWidth:900, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26885
519