From b19b0d4e39a82b7e37127bd8379a31f7e95ed260 Mon Sep 17 00:00:00 2001 From: GamingLiamStudios Date: Mon, 7 Feb 2022 21:20:49 +1100 Subject: [PATCH] Add Update Cider Branch selection --- src/i18n/en_US.jsonc | 6 ++++- src/main/base/store.ts | 11 ++++---- src/renderer/views/pages/settings.ejs | 39 ++++++++++++++++++++------- 3 files changed, 40 insertions(+), 16 deletions(-) diff --git a/src/i18n/en_US.jsonc b/src/i18n/en_US.jsonc index 997dc576..73f6add3 100644 --- a/src/i18n/en_US.jsonc +++ b/src/i18n/en_US.jsonc @@ -122,7 +122,6 @@ "term.menu": "Menu", "term.check": "Check", "term.aboutArtist": "About {{artistName}}", // e.g. 'About Doja Cat' - "term.updateCider": "Update Cider", "term.topResult": "Top Result", // Search Results "term.sharedPlaylists": "Shared Playlists", // Search Results "term.people": "People", // Search Results @@ -299,6 +298,11 @@ "settings.option.experimental.close_button_hide": "Close Button Should Hide the Application", "settings.option.experimental.copy_log": "Copy logs to clipboard", "settings.option.experimental.inline_playlists": "Inline Playlists and Albums", + "settings.option.experimental.updateCider": "Update Cider", // Button. Refer to term.check for the check button + "settings.option.experimental.updateCider.branch": "Cider Update Branch", // Dropdown + "settings.option.experimental.updateCider.branch.description": "Select the branch to update Cider to", + "settings.option.experimental.updateCider.branch.main": "Stable", + "settings.option.experimental.updateCider.branch.develop": "Development", // Refer to term.disabled & term.enabled // Spatialization Menu "spatial.notTurnedOn": "Audio Spatialization is disabled. To use, please enable it first.", diff --git a/src/main/base/store.ts b/src/main/base/store.ts index eeac1e9c..53a0d8d2 100644 --- a/src/main/base/store.ts +++ b/src/main/base/store.ts @@ -11,7 +11,8 @@ export class Store { "discord_rpc": 1, // 0 = disabled, 1 = enabled as Cider, 2 = enabled as Apple Music "discord_rpc_clear_on_pause": true, "language": "en_US", // electron.app.getLocale().replace('-', '_') this can be used in future - "playbackNotifications": true + "playbackNotifications": true, + "update_branch": "main" }, "home": { "followedArtists": [], @@ -60,10 +61,10 @@ export class Store { "equalizer": { 'preset': "default", 'frequencies': [32, 63, 125, 250, 500, 1000, 2000, 4000, 8000, 16000], - 'gain': [0,0,0,0,0,0,0,0,0,0], - 'Q' : [1,1,1,1,1,1,1,1,1,1], - 'mix' : 1, - 'vibrantBass' : 0, + 'gain': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + 'Q': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], + 'mix': 1, + 'vibrantBass': 0, 'presets': [], 'userGenerated': false }, diff --git a/src/renderer/views/pages/settings.ejs b/src/renderer/views/pages/settings.ejs index 7e86bfb3..e86d4390 100644 --- a/src/renderer/views/pages/settings.ejs +++ b/src/renderer/views/pages/settings.ejs @@ -655,7 +655,7 @@
- {{$root.getLz('term.updateCider')}} + {{$root.getLz('settings.option.experimental.updateCider')}}
+
+
+ {{$root.getLz('settings.option.experimental.updateCider.branch')}}
+ ({{$root.getLz('settings.option.experimental.updateCider.branch.description')}}) +
+
+ +
+
{{$root.getLz('settings.option.experimental.copy_log')}} @@ -807,15 +823,17 @@ ciderPPE: function () { if (app.cfg.advanced.ciderPPE) { if (app.cfg.audio.spatial) { - app.cfg.advanced.ciderPPE = false; - notyf.error("CAP is not compatible with Spatialization. Please disable Spatialization to continue.") - } - }}, + app.cfg.advanced.ciderPPE = false; + notyf.error("CAP is not compatible with Spatialization. Please disable Spatialization to continue.") + } + } + }, toggleSpatial: function () { if (app.cfg.audio.spatial) { if (!app.cfg.advanced.ciderPPE) { - CiderAudio.spatialOn()} - else { + CiderAudio.spatialOn() + } + else { CiderAudio.spatialOff() app.cfg.audio.spatial = false; notyf.error("Spatialization is not compatible with CAP. Please disable CAP to continue.") @@ -823,10 +841,11 @@ } else { CiderAudio.spatialOff() } - + }, - changeAudioQuality: function () {1 - app.mk.bitrate = MusicKit.PlaybackBitrate[app.cfg.audio.quality]; + changeAudioQuality: function () { + 1 + app.mk.bitrate = MusicKit.PlaybackBitrate[app.cfg.audio.quality]; }, toggleUserInfo: function () { app.chrome.hideUserInfo = !app.cfg.visual.showuserinfo