From 760ff919f580262956d7de5fcc567723b772df11 Mon Sep 17 00:00:00 2001 From: Michael Lehenauer Date: Wed, 18 Jan 2023 18:43:54 +0100 Subject: [PATCH] add ability to get rating via the wsapi to get the rating, use the existing "rating" action with no rating specified --- src/renderer/main/wsapi_interop.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/renderer/main/wsapi_interop.js b/src/renderer/main/wsapi_interop.js index d3241fab..6662131e 100644 --- a/src/renderer/main/wsapi_interop.js +++ b/src/renderer/main/wsapi_interop.js @@ -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(