fix for ratings for library songs
This commit is contained in:
parent
091dc32fbd
commit
e8142f0271
1 changed files with 3 additions and 0 deletions
|
@ -2591,6 +2591,9 @@ 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.startsWith("i.")) {
|
||||||
|
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) {
|
||||||
let value = response.data.data[0].attributes.value
|
let value = response.data.data[0].attributes.value
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue