diff --git a/src/i18n/README.md b/src/i18n/README.md index c43468ec..3422daa7 100644 --- a/src/i18n/README.md +++ b/src/i18n/README.md @@ -337,6 +337,4 @@ Update 29/04/2022 00:00 UTC * `menubar.options.license`: Added for `en_US` * `menubar.options.conf`: Added for `en_US` -Update 07/05/2022 04:00 UTC -* `term.personalStations`: Added for `en_US` - `term.amLive`: Added for `en_US` + diff --git a/src/i18n/en_US.json b/src/i18n/en_US.json index 9536fb79..8f1b77dc 100644 --- a/src/i18n/en_US.json +++ b/src/i18n/en_US.json @@ -121,8 +121,6 @@ "term.audioControls": "Volume Controls", "term.clearAll": "Clear All", "term.recentStations": "Recent Stations", - "term.personalStations": "Personal Stations", - "term.amLive": "Apple Music Live", "term.language": "Language", "term.funLanguages": "Fun", "term.noLyrics": "Loading... / Lyrics not found./ Instrumental.", diff --git a/src/i18n/source/en_US.json b/src/i18n/source/en_US.json index 5d91201c..c76a5c01 100644 --- a/src/i18n/source/en_US.json +++ b/src/i18n/source/en_US.json @@ -121,8 +121,6 @@ "term.audioControls": "Volume Controls", "term.clearAll": "Clear All", "term.recentStations": "Recent Stations", - "term.personalStations": "Personal Stations", - "term.amLive": "Apple Music Live", "term.language": "Language", "term.funLanguages": "Fun", "term.noLyrics": "Loading... / Lyrics not found./ Instrumental.", diff --git a/src/main/base/browserwindow.ts b/src/main/base/browserwindow.ts index 2374e25b..0c785691 100644 --- a/src/main/base/browserwindow.ts +++ b/src/main/base/browserwindow.ts @@ -59,7 +59,6 @@ export class BrowserWindow { "pages/settings", "pages/installed-themes", "pages/listen_now", - "pages/radio", "pages/home", "pages/artist-feed", "pages/cider-playlist", @@ -113,7 +112,6 @@ export class BrowserWindow { "components/artist-chip", "components/hello-world", "components/inline-collection-list", - "components/radio-child", ], appRoutes: [ { @@ -188,11 +186,6 @@ export class BrowserWindow { component: ``, condition: `page == 'listen_now'`, onEnter: `` - }, { - page: "radio", - component: ``, - condition: `page == 'radio'`, - onEnter: `` }, { page: "settings", component: ``, diff --git a/src/renderer/main/vueapp.js b/src/renderer/main/vueapp.js index f0e271bb..8218881d 100644 --- a/src/renderer/main/vueapp.js +++ b/src/renderer/main/vueapp.js @@ -42,9 +42,7 @@ const app = new Vue({ listennow: [], madeforyou: [], radio: { - personal: {}, - recent: {}, - amlive: {}, + personal: [] }, mklang: 'en', webview: { @@ -324,7 +322,6 @@ const app = new Vue({ try { this.listennow.timestamp = 0; this.browsepage.timestamp = 0; - this.radio.timestamp = 0; } catch (e) { } }, /** @@ -2535,39 +2532,15 @@ const app = new Vue({ } }, async getRadioStations(attempt = 0) { - if (this.radio.timestamp > Date.now() - 120000) { - return - } if (attempt > 3) { return } try { - this.radio.personal.title = app.getLz('term.personalStations') - this.radio.recent.title = app.getLz('term.recentStations') - this.radio.amlive.title = app.getLz('term.amLive') - - app.mk.api.v3.music(`/v1/catalog/${app.mk.api.v3.storefrontId}/stations`, { - "filter[identity]": "personal", - }).then(res => { - this.radio.personal.data = res.data.data - }) - - app.mk.api.v3.music(`/v1/me/recent/radio-stations`, { + this.radio.personal = (await app.mk.api.v3.music(`/v1/me/recent/radio-stations`, { "platform": "web", "art[url]": "f", l: this.mklang - }).then(res => { - this.radio.recent.data = res.data.data - }) - - app.mk.api.v3.music(`/v1/catalog/${app.mk.api.v3.storefrontId}/stations`, { - "filter[featured]": "apple-music-live-radio", - }).then(res => { - this.radio.amlive.data = res.data.data - }) - - this.radio.timestamp = Date.now() - console.debug(this.radio) + })).data.data; } catch (e) { console.log(e) this.getRadioStations(attempt + 1) diff --git a/src/renderer/views/app/app-content.ejs b/src/renderer/views/app/app-content.ejs index 1134fe9f..dfa1cb33 100644 --- a/src/renderer/views/app/app-content.ejs +++ b/src/renderer/views/app/app-content.ejs @@ -25,6 +25,15 @@ <% } %> + + + <%- include('../pages/library-recentlyadded') %>'); diff --git a/src/renderer/views/app/sidebar.ejs b/src/renderer/views/app/sidebar.ejs index ead0d4aa..979db2f5 100644 --- a/src/renderer/views/app/sidebar.ejs +++ b/src/renderer/views/app/sidebar.ejs @@ -39,8 +39,8 @@ - + +
-
-
-
-

{{ item.title }}

-
-
- - - - - -
- - \ No newline at end of file diff --git a/src/renderer/views/pages/radio.ejs b/src/renderer/views/pages/radio.ejs index f993f117..e69de29b 100644 --- a/src/renderer/views/pages/radio.ejs +++ b/src/renderer/views/pages/radio.ejs @@ -1,23 +0,0 @@ - - - \ No newline at end of file