From 80f408a7aa7f7837922e5d56d5c4edb3a22e2102 Mon Sep 17 00:00:00 2001 From: Jason Chen Date: Sat, 28 May 2022 17:07:15 -0700 Subject: [PATCH] add editPlayListDescription --- src/renderer/main/vueapp.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/renderer/main/vueapp.js b/src/renderer/main/vueapp.js index 2ac1e6cf..f0b3466c 100644 --- a/src/renderer/main/vueapp.js +++ b/src/renderer/main/vueapp.js @@ -1349,6 +1349,21 @@ const app = new Vue({ self.refreshPlaylists(false, false) }) }, + async editPlaylistDescription(id, name = app.getLz('term.newPlaylist')) { + let self = this + this.mk.api.v3.music( + `/v1/me/library/playlists/${id}`, {}, { + fetchOptions: { + method: "PATCH", + body: JSON.stringify({ + attributes: { description: name } + }) + } + } + ).then(res => { + self.refreshPlaylists(false, false) + }) + }, copyToClipboard(str) { // if (navigator.userAgent.includes('Darwin') || navigator.appVersion.indexOf("Mac") != -1) { // this.darwinShare(str)