ditto
This commit is contained in:
parent
e8142f0271
commit
6e033e90aa
1 changed files with 4 additions and 1 deletions
|
@ -2591,8 +2591,11 @@ const app = new Vue({
|
||||||
},
|
},
|
||||||
async getRating(item) {
|
async getRating(item) {
|
||||||
let type = item.type.slice(-1) === "s" ? item.type : item.type + "s"
|
let type = item.type.slice(-1) === "s" ? item.type : item.type + "s"
|
||||||
|
// if item.id starts with "i." put "library-" in front of the type if type does not already have that
|
||||||
if (item.id.startsWith("i.")) {
|
if (item.id.startsWith("i.")) {
|
||||||
type = "library-" + type
|
if(!type.startsWith("library-")) {
|
||||||
|
type = "library-" + type
|
||||||
|
}
|
||||||
}
|
}
|
||||||
let response = await this.mk.api.v3.music(`/v1/me/ratings/${type}?platform=web&ids=${item.id}`)
|
let response = await this.mk.api.v3.music(`/v1/me/ratings/${type}?platform=web&ids=${item.id}`)
|
||||||
if(response.data.data.length != 0) {
|
if(response.data.data.length != 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue