CHONKY BOY
This commit is contained in:
parent
31ed921a1a
commit
c15f55d0ee
213 changed files with 64188 additions and 55736 deletions
|
@ -1,27 +1,27 @@
|
|||
require("v8-compile-cache");
|
||||
|
||||
import {join} from "path";
|
||||
import {app} from "electron"
|
||||
import { join } from "path";
|
||||
import { app } from "electron";
|
||||
if (!app.isPackaged) {
|
||||
app.setPath("userData", join(app.getPath("appData"), "Cider"));
|
||||
app.setPath("userData", join(app.getPath("appData"), "Cider"));
|
||||
}
|
||||
|
||||
import {Store} from "./base/store";
|
||||
import {AppEvents} from "./base/app";
|
||||
import {Plugins} from "./base/plugins";
|
||||
import {BrowserWindow} from "./base/browserwindow";
|
||||
import {init as Sentry} from "@sentry/electron";
|
||||
import {RewriteFrames} from "@sentry/integrations";
|
||||
import {components, ipcMain} from "electron"
|
||||
import { Store } from "./base/store";
|
||||
import { AppEvents } from "./base/app";
|
||||
import { Plugins } from "./base/plugins";
|
||||
import { BrowserWindow } from "./base/browserwindow";
|
||||
import { init as Sentry } from "@sentry/electron";
|
||||
import { RewriteFrames } from "@sentry/integrations";
|
||||
import { components, ipcMain } from "electron";
|
||||
|
||||
// Analytics for debugging fun yeah.
|
||||
Sentry({
|
||||
dsn: "https://68c422bfaaf44dea880b86aad5a820d2@o954055.ingest.sentry.io/6112214",
|
||||
integrations: [
|
||||
new RewriteFrames({
|
||||
root: process.cwd(),
|
||||
}),
|
||||
],
|
||||
dsn: "https://68c422bfaaf44dea880b86aad5a820d2@o954055.ingest.sentry.io/6112214",
|
||||
integrations: [
|
||||
new RewriteFrames({
|
||||
root: process.cwd(),
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
new Store();
|
||||
|
@ -33,31 +33,30 @@ const CiderPlug = new Plugins();
|
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
app.on("ready", () => {
|
||||
Cider.ready(CiderPlug);
|
||||
Cider.ready(CiderPlug);
|
||||
|
||||
console.log("[Cider] Application is Ready. Creating Window.")
|
||||
if (!app.isPackaged) {
|
||||
console.info("[Cider] Running in development mode.")
|
||||
require("vue-devtools").install()
|
||||
}
|
||||
console.log("[Cider] Application is Ready. Creating Window.");
|
||||
if (!app.isPackaged) {
|
||||
console.info("[Cider] Running in development mode.");
|
||||
require("vue-devtools").install();
|
||||
}
|
||||
|
||||
components.whenReady().then(async () => {
|
||||
const bw = new BrowserWindow()
|
||||
const win = await bw.createWindow()
|
||||
components.whenReady().then(async () => {
|
||||
const bw = new BrowserWindow();
|
||||
const win = await bw.createWindow();
|
||||
|
||||
app.getGPUInfo("complete").then(gpuInfo => {
|
||||
console.log(gpuInfo)
|
||||
})
|
||||
|
||||
console.log("[Cider][Widevine] Status:", components.status());
|
||||
Cider.bwCreated();
|
||||
win.on("ready-to-show", () => {
|
||||
console.debug("[Cider] Window is Ready.")
|
||||
CiderPlug.callPlugins("onReady", win);
|
||||
win.show();
|
||||
});
|
||||
app.getGPUInfo("complete").then((gpuInfo) => {
|
||||
console.log(gpuInfo);
|
||||
});
|
||||
|
||||
console.log("[Cider][Widevine] Status:", components.status());
|
||||
Cider.bwCreated();
|
||||
win.on("ready-to-show", () => {
|
||||
console.debug("[Cider] Window is Ready.");
|
||||
CiderPlug.callPlugins("onReady", win);
|
||||
win.show();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -65,20 +64,20 @@ app.on("ready", () => {
|
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
ipcMain.handle("renderer-ready", (event) => {
|
||||
CiderPlug.callPlugins("onRendererReady", event);
|
||||
})
|
||||
CiderPlug.callPlugins("onRendererReady", event);
|
||||
});
|
||||
|
||||
ipcMain.on("playbackStateDidChange", (_event, attributes) => {
|
||||
CiderPlug.callPlugins("onPlaybackStateDidChange", attributes);
|
||||
CiderPlug.callPlugins("onPlaybackStateDidChange", attributes);
|
||||
});
|
||||
|
||||
ipcMain.on("nowPlayingItemDidChange", (_event, attributes) => {
|
||||
CiderPlug.callPlugins("onNowPlayingItemDidChange", attributes);
|
||||
CiderPlug.callPlugins("onNowPlayingItemDidChange", attributes);
|
||||
});
|
||||
|
||||
app.on("before-quit", () => {
|
||||
CiderPlug.callPlugins("onBeforeQuit");
|
||||
console.warn(`${app.getName()} exited.`);
|
||||
CiderPlug.callPlugins("onBeforeQuit");
|
||||
console.warn(`${app.getName()} exited.`);
|
||||
});
|
||||
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -87,20 +86,20 @@ app.on("before-quit", () => {
|
|||
|
||||
// @ts-ignore
|
||||
app.on("widevine-ready", (version, lastVersion) => {
|
||||
if (null !== lastVersion) {
|
||||
console.log("[Cider][Widevine] Widevine " + version + ", upgraded from " + lastVersion + ", is ready to be used!")
|
||||
} else {
|
||||
console.log("[Cider][Widevine] Widevine " + version + " is ready to be used!")
|
||||
}
|
||||
})
|
||||
if (null !== lastVersion) {
|
||||
console.log("[Cider][Widevine] Widevine " + version + ", upgraded from " + lastVersion + ", is ready to be used!");
|
||||
} else {
|
||||
console.log("[Cider][Widevine] Widevine " + version + " is ready to be used!");
|
||||
}
|
||||
});
|
||||
|
||||
// @ts-ignore
|
||||
app.on("widevine-update-pending", (currentVersion, pendingVersion) => {
|
||||
console.log("[Cider][Widevine] Widevine " + currentVersion + " is ready to be upgraded to " + pendingVersion + "!")
|
||||
})
|
||||
console.log("[Cider][Widevine] Widevine " + currentVersion + " is ready to be upgraded to " + pendingVersion + "!");
|
||||
});
|
||||
|
||||
// @ts-ignore
|
||||
app.on("widevine-error", (error) => {
|
||||
console.log("[Cider][Widevine] Widevine installation encountered an error: " + error)
|
||||
app.exit()
|
||||
})
|
||||
console.log("[Cider][Widevine] Widevine installation encountered an error: " + error);
|
||||
app.exit();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue