Playback Notifications Now Configurable and available on all systems

DiscordRPC swapped to bool for clear activity
Updated store file to bools and added playback notification
Updated en_GB to fun language, as from what I've seen none of the US English words are different in GB English
This commit is contained in:
Core 2022-01-29 12:37:36 +00:00
parent 3a9bce5f26
commit 499659469e
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6
7 changed files with 625 additions and 579 deletions

View file

@ -1,10 +1,10 @@
{
// i18n Info
"i18n.languageName": "English (UK)", // name of language in native language
"i18n.languageName": "English (UK) (Roadman)", // name of language in native language
"i18n.languageNameEnglish": "English (UK)", // name of language in English
"i18n.category": "main", // main = real language, fun = fun community languages
"i18n.authors": "", // Authors, if you contribute to this file feel free to add your name seperated with a space
"i18n.category": "fun", // main = real language, fun = fun community languages
"i18n.authors": "Core", // Authors, if you contribute to this file feel free to add your name seperated with a space
"date.format": "${d} ${m}, ${y}",
"home.friendsListeningTo": "Bruv's Listening To"
"home.friendsListeningTo": "Mandems Listening To"
}

View file

@ -244,6 +244,7 @@
"settings.header.connectivity": "Connectivity",
"settings.header.connectivity.description": "Adjust the connectivity settings for Cider.",
"settings.option.connectivity.discordRPC": "Discord Rich Presence", // Dropdown
"settings.option.connectivity.playbackNotifications": "Playback Notifications", // Toggle
// Refer to term.disabled for the disabled option
"settings.header.connectivity.discordRPC.cider": "Display as 'Cider'",
"settings.header.connectivity.discordRPC.appleMusic": "Display as 'Apple Music'",
@ -261,8 +262,8 @@
"settings.option.experimental.compactUI": "Compact UI", // Toggle
"settings.option.experimental.closeButtonBehaviour": "Close Button Behavior",
"settings.option.experimental.closeButtonBehaviour.quit": "Quit Cider",
"settings.option.experimental.closeButtonBehaviour.minimizeTaskbar": "Minimize to taskbar",
"settings.option.experimental.closeButtonBehaviour.minimizeTray": "Minimize to system tray",
"settings.option.experimental.closeButtonBehaviour.minimizeTaskbar": "Minimize to Taskbar",
"settings.option.experimental.closeButtonBehaviour.minimizeTray": "Minimize to Tray",
// Refer to term.disabled & term.enabled
// Spatialization Menu

View file

@ -7,10 +7,11 @@ export class ConfigStore {
private defaults: any = {
"general": {
"close_behavior": 0, // 0 = close, 1 = minimize, 2 = minimize to tray
"startup_behavior": 0, // 0 = nothing, 1 = open on startup
"open_on_startup": false,
"discord_rpc": 1, // 0 = disabled, 1 = enabled as Cider, 2 = enabled as Apple Music
"discordClearActivityOnPause": 1, // 0 = disabled, 1 = enabled
"language" : "en_US"
"discord_rpc_clear_on_pause": true,
"language": "en_US", // electron.app.getLocale().replace('-', '_') this can be used in future
"playbackNotifications": true
},
"home": {
"followedArtists": [],

View file

@ -125,7 +125,7 @@ export default class DiscordRichPresence {
// Check if its pausing (false) or playing (true)
if (!attributes.status) {
if (DiscordRichPresence._store.general.discordClearActivityOnPause == 1) {
if (DiscordRichPresence._store.general.discord_rpc_clear_on_pause) {
this._client.clearActivity()
.catch((e: any) => console.error(`[DiscordRichPresence][clearActivity] ${e}`));
} else {
@ -138,7 +138,7 @@ export default class DiscordRichPresence {
}
} else if (this._activity && this._activityCache !== this._activity && this._activity.details) {
if (DiscordRichPresence._store.general.discordClearActivityOnPause != 1) {
if (!DiscordRichPresence._store.general.discord_rpc_clear_on_pause) {
this._activity.smallImageKey = 'play';
this._activity.smallImageText = 'Playing';
}

View file

@ -124,9 +124,6 @@ export default class MinimizeToTray {
this._win.hide();
this.SetContextMenu(false);
});
electron.ipcMain.handle("update-store-mtt", (event, value) => {
this._store.general["close_behavior"] = value;
})
this._win.on("close", (e :any) => {
if (this._forceQuit || this._store.general["close_behavior"] == '0' ) {
this._app.quit();

View file

@ -751,7 +751,7 @@ const app = new Vue({
app.loadLyrics();
// Playback Notifications
if ((app.platform === "darwin" || app.platform === "linux") && !document.hasFocus() && a.artistName && a.artwork && a.name) {
if (this.cfg.general.playbackNotifications && !document.hasFocus() && a.artistName && a.artwork && a.name) {
if (this.notification) {
this.notification.close()
}

File diff suppressed because it is too large Load diff