diff --git a/package.json b/package.json index 2bd112fe..ea66b679 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "dist:macarm": "yarn build && electron-builder --mac --arm64", "dist:universalNotWorking": "yarn build && electron-builder --mac --universal", "dist:all": "yarn build && electron-builder -mwl", + "testdist": "yarn build && electron-builder --dir", "winget": "yarn build && electron-builder --win -c winget.json", "msft": "yarn build && electron-builder -c msft-package.json", "mstest": "yarn build && electron-builder -c msft-test.json", diff --git a/src/i18n/README.md b/src/i18n/README.md index 23419532..14616ed5 100644 --- a/src/i18n/README.md +++ b/src/i18n/README.md @@ -299,7 +299,6 @@ Update 28/04/2022 21:45 UTC * `term.dynamic`: Added for `en_US` Update 29/04/2022 00:00 UTC - * `menubar.options.about`: Added for `en_US` * `menubar.options.settings`: Added for `en_US` * `menubar.options.quit`: Added for `en_US` @@ -393,7 +392,6 @@ Update 18/05/2022 14:20 UTC * `action.tray.previous`: Added for `en_US`, Update 22/05/2022 03:53 UTC - * `settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.diffused`: Added for `en_US` Update 22/05/2022 14:32 UTC diff --git a/src/i18n/en_US.json b/src/i18n/en_US.json index 8e48fbed..db9a03f7 100644 --- a/src/i18n/en_US.json +++ b/src/i18n/en_US.json @@ -131,6 +131,8 @@ "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 0ffd7f06..645309e9 100644 --- a/src/i18n/source/en_US.json +++ b/src/i18n/source/en_US.json @@ -131,6 +131,8 @@ "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 5df0fe99..8649ce97 100644 --- a/src/main/base/browserwindow.ts +++ b/src/main/base/browserwindow.ts @@ -59,6 +59,7 @@ export class BrowserWindow { "pages/settings", "pages/installed-themes", "pages/listen_now", + "pages/radio", "pages/home", "pages/artist-feed", "pages/cider-playlist", @@ -192,6 +193,11 @@ 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 7a5f109b..0c61a79c 100644 --- a/src/renderer/main/vueapp.js +++ b/src/renderer/main/vueapp.js @@ -43,7 +43,9 @@ const app = new Vue({ listennow: [], madeforyou: [], radio: { - personal: [] + personal: {}, + recent: {}, + amlive: {}, }, mklang: 'en', webview: { @@ -326,6 +328,7 @@ const app = new Vue({ try { this.listennow.timestamp = 0; this.browsepage.timestamp = 0; + this.radio.timestamp = 0; } catch (e) { } }, /** @@ -2648,21 +2651,6 @@ const app = new Vue({ this.getBrowsePage(attempt + 1) } }, - async getRadioStations(attempt = 0) { - if (attempt > 3) { - return - } - try { - this.radio.personal = (await app.mk.api.v3.music(`/v1/me/recent/radio-stations`, { - "platform": "web", - "art[url]": "f", - l: this.mklang - })).data.data; - } catch (e) { - console.log(e) - this.getRadioStations(attempt + 1) - } - }, async getMadeForYou(attempt = 0) { if (attempt > 3) { return diff --git a/src/renderer/views/app/app-content.ejs b/src/renderer/views/app/app-content.ejs index 96e6b348..c0e1046f 100644 --- a/src/renderer/views/app/app-content.ejs +++ b/src/renderer/views/app/app-content.ejs @@ -25,15 +25,6 @@ <% } %> - - - - {{$root.getLz('term.radio')}} - {{$root.getLz('term.recentStations')}} - - - - <%- include('../pages/library-recentlyadded') %>'); diff --git a/src/renderer/views/app/sidebar.ejs b/src/renderer/views/app/sidebar.ejs index bb76868b..2f7d013d 100644 --- a/src/renderer/views/app/sidebar.ejs +++ b/src/renderer/views/app/sidebar.ejs @@ -43,8 +43,8 @@ - - + + + {{ app.getLz('term.radio') }} + + + {{ app.getLz('term.personalStations') }} + + + + + + + + + + {{ app.getLz('term.recentStations') }} + + + + + + {{ app.getLz('term.amLive') }} + + + + + + + \ No newline at end of file