Changed path setting to not isPackaged only and updated sentry to match their ts docs

This commit is contained in:
Core 2022-02-04 03:58:48 +00:00
parent 1546bc3ea7
commit ae970f2c6b
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6

View file

@ -2,18 +2,27 @@ require('v8-compile-cache');
import {app, components, ipcMain} from 'electron';
import {join} from 'path';
app.setPath('userData', join(app.getPath('appData'), 'Cider'));
if (!app.isPackaged) {
app.setPath('userData', join(app.getPath('appData'), 'Cider'));
}
// Analytics for debugging fun yeah.
import {init as Sentry} from '@sentry/electron';
import {Store} from "./base/store";
import {AppEvents} from "./base/app";
import {Plugins} from "./base/plugins";
import {utils} from "./base/utils";
import {BrowserWindow} from "./base/browserwindow";
import {init as Sentry} from '@sentry/electron';
import {RewriteFrames} from "@sentry/integrations";
Sentry({dsn: "https://68c422bfaaf44dea880b86aad5a820d2@o954055.ingest.sentry.io/6112214"});
// Analytics for debugging fun yeah.
Sentry({
dsn: "https://68c422bfaaf44dea880b86aad5a820d2@o954055.ingest.sentry.io/6112214",
integrations: [
new RewriteFrames({
root: process.cwd(),
}),
],
});
new Store();
const Cider = new AppEvents();
@ -49,11 +58,11 @@ app.on('ready', () => {
* Renderer Event Handlers
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
ipcMain.on('playbackStateDidChange', (event, attributes) => {
ipcMain.on('playbackStateDidChange', (_event, attributes) => {
CiderPlug.callPlugins('onPlaybackStateDidChange', attributes);
});
ipcMain.on('nowPlayingItemDidChange', (event, attributes) => {
ipcMain.on('nowPlayingItemDidChange', (_event, attributes) => {
CiderPlug.callPlugins('onNowPlayingItemDidChange', attributes);
});