From 1b5ae2177e54b96d0f8ca14fd6d29ac08c26c4db Mon Sep 17 00:00:00 2001 From: Core Date: Wed, 14 Sep 2022 01:00:29 +0100 Subject: [PATCH] radio page overhauled Signed-off-by: Core --- src/renderer/main/vueapp.js | 25 ++------- src/renderer/views/pages/radio.ejs | 88 +++++++++++++++++++++++++++--- 2 files changed, 86 insertions(+), 27 deletions(-) diff --git a/src/renderer/main/vueapp.js b/src/renderer/main/vueapp.js index 37ce1bbd..bffa034c 100644 --- a/src/renderer/main/vueapp.js +++ b/src/renderer/main/vueapp.js @@ -45,10 +45,7 @@ const app = new Vue({ browsepage: [], listennow: [], madeforyou: [], - radio: { - "editorial": [], - "recent": [], - }, + radio: [], mklang: "en", webview: { url: "", @@ -3017,29 +3014,17 @@ const app = new Vue({ name: "radio", "omit[resource:artists]": "relationships", "include[albums]": "artists", - "include[music-videos]": "artists", "include[songs]": "artists", - "include[stations]": "events", - extend: "artistUrl,editorialArtwork", + "include[music-videos]": "artists", + extend: "editorialArtwork,artistUrl", "fields[artists]": "name,url,artwork,editorialArtwork,genreNames,editorialNotes", - "format[resources]": "map", "art[url]": "f", - l: app.mklang + l: app.mklang, }).then((radio) => { - app.radio.editorial = radio.data.resources + app.radio = radio.data.data[0]; console.debug(app.radio); }) - - app.mk.api.v3.music(`/v1/me/recent/radio-stations`, { - "platform": "web", - "art[url]": "f", - "format[resources]": "map", - l: app.mklang - }).then((radio) => { - app.radio.recent = radio.data - console.debug(app.radio); - }) this.radio.timestamp = Date.now(); } catch (e) { console.log(e); diff --git a/src/renderer/views/pages/radio.ejs b/src/renderer/views/pages/radio.ejs index 6f1c3017..486a9964 100644 --- a/src/renderer/views/pages/radio.ejs +++ b/src/renderer/views/pages/radio.ejs @@ -1,16 +1,71 @@