add ability to get rating via the wsapi

to get the rating, use the existing "rating" action with no rating specified
This commit is contained in:
Michael Lehenauer 2023-01-18 18:43:54 +01:00
parent cb3a3053ba
commit 760ff919f5

View file

@ -171,6 +171,10 @@ const wsapi = {
.then(function () {
ipcRenderer.send("wsapi-rate", kind, id, rating);
});
} else if (rating === undefined) {
app.getRating({ type: truekind, id: id }).then((rating) => {
ipcRenderer.send("wsapi-rate", kind, id, rating);
});
} else {
app.mk.api.v3
.music(