add editPlayListDescription

This commit is contained in:
Jason Chen 2022-05-28 17:07:15 -07:00
parent bea817df2d
commit 80f408a7aa

View file

@ -1349,6 +1349,21 @@ const app = new Vue({
self.refreshPlaylists(false, false) 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) { copyToClipboard(str) {
// if (navigator.userAgent.includes('Darwin') || navigator.appVersion.indexOf("Mac") != -1) { // if (navigator.userAgent.includes('Darwin') || navigator.appVersion.indexOf("Mac") != -1) {
// this.darwinShare(str) // this.darwinShare(str)