Comparing version 1.1.7 to 1.1.8
{ | ||
"name": "poru", | ||
"version": "1.1.7", | ||
"version": "1.1.8", | ||
"description": "A stable and powefull lavalink client with so many features", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -25,4 +25,9 @@ const axios = require("axios") | ||
async decodeUrl(url){ | ||
let [,id] = await this.baseURL.exec(url) | ||
return id; | ||
} | ||
async resolve(url) { | ||
const urlType = this.linkType(url); | ||
const urlType = await this.decodeUrl(url); | ||
const page = await axios | ||
@@ -76,20 +81,3 @@ .get(url) | ||
linkType(url) { | ||
if ( | ||
RegExp( | ||
/https?:\/\/music\.apple\.com\/.+?\/album\/.+?\/.+?\?i=([0-9]+)/ | ||
).test(url) | ||
) { | ||
return "song"; | ||
} else if ( | ||
RegExp(/https?:\/\/music\.apple\.com\/.+?\/playlist\//).test(url) | ||
) { | ||
return "playlist"; | ||
} else if (RegExp(/https?:\/\/music\.apple\.com\/.+?\/album\//).test(url)) { | ||
return "album"; | ||
} else { | ||
throw Error("Apple Music link is invalid"); | ||
} | ||
} | ||
getRawPlaylist(document) { | ||
@@ -96,0 +84,0 @@ const $ = cheerio.load(document); |
@@ -220,3 +220,3 @@ const { EventEmitter } = require("events"); | ||
if (!this.previousTrack) return this.stop(); | ||
let data = `https://www.youtube.com/watch?v=${this.previousTrack.identifier}&list=RD${this.previousTrack.identifier}`; | ||
let data = `https://www.youtube.com/watch?v=${this.previousTrack.info.identifier}&list=RD${this.previousTrack.info.identifier}`; | ||
@@ -223,0 +223,0 @@ let response = await this.manager.resolve(data); |
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
51314
1315