ditto
This commit is contained in:
parent
e8142f0271
commit
6e033e90aa
1 changed files with 4 additions and 1 deletions
|
@ -2591,9 +2591,12 @@ const app = new Vue({
|
|||
},
|
||||
async getRating(item) {
|
||||
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(!type.startsWith("library-")) {
|
||||
type = "library-" + type
|
||||
}
|
||||
}
|
||||
let response = await this.mk.api.v3.music(`/v1/me/ratings/${type}?platform=web&ids=${item.id}`)
|
||||
if(response.data.data.length != 0) {
|
||||
let value = response.data.data[0].attributes.value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue