Merge branch 'main' of https://github.com/ciderapp/Cider
This commit is contained in:
commit
62858b5fe4
3 changed files with 93 additions and 1 deletions
2
index.js
2
index.js
|
@ -8,7 +8,6 @@ ElectronSentry.init({dsn: "https://68c422bfaaf44dea880b86aad5a820d2@o954055.inge
|
||||||
// Enable WebGPU and list adapters (EXPERIMENTAL.)
|
// Enable WebGPU and list adapters (EXPERIMENTAL.)
|
||||||
app.commandLine.appendSwitch('enable-unsafe-webgpu');
|
app.commandLine.appendSwitch('enable-unsafe-webgpu');
|
||||||
|
|
||||||
|
|
||||||
const configSchema = {
|
const configSchema = {
|
||||||
"general": {
|
"general": {
|
||||||
"close_behavior": {
|
"close_behavior": {
|
||||||
|
@ -84,6 +83,7 @@ const configSchema = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Creating the Application Window and Calling all the Functions
|
// Creating the Application Window and Calling all the Functions
|
||||||
function CreateWindow() {
|
function CreateWindow() {
|
||||||
if (app.isQuiting) { app.quit(); return; }
|
if (app.isQuiting) { app.quit(); return; }
|
||||||
|
|
|
@ -6,8 +6,84 @@ const path = require("path");
|
||||||
const windowStateKeeper = require("electron-window-state");
|
const windowStateKeeper = require("electron-window-state");
|
||||||
const os = require('os');
|
const os = require('os');
|
||||||
const Store = require("electron-store");
|
const Store = require("electron-store");
|
||||||
|
const store = new Store();
|
||||||
const yt = require('youtube-search-without-api-key');
|
const yt = require('youtube-search-without-api-key');
|
||||||
|
|
||||||
|
const schema = {
|
||||||
|
"general": {
|
||||||
|
"close_behavior": {
|
||||||
|
type: "number",
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
"startup_behavior": {
|
||||||
|
type: "number",
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
"discord_rpc": {
|
||||||
|
type: "number",
|
||||||
|
default: 1
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"behavior": {
|
||||||
|
"hw_acceleration": {
|
||||||
|
type: "number",
|
||||||
|
default: 0 // 0 = default, 1 = webgpu, 2 = gpu disabled
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"audio": {
|
||||||
|
"quality": {
|
||||||
|
type: "string",
|
||||||
|
default: "extreme",
|
||||||
|
},
|
||||||
|
"seamless_audio": {
|
||||||
|
type: "boolean",
|
||||||
|
default: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"visual": {
|
||||||
|
"theme": {
|
||||||
|
type: "string",
|
||||||
|
default: ""
|
||||||
|
},
|
||||||
|
"scrollbars": {
|
||||||
|
type: "number",
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
"refresh_rate": {
|
||||||
|
type: "number",
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
"animated_artwork": {
|
||||||
|
type: "number",
|
||||||
|
default: 0 // 0 = always, 1 = limited, 2 = never
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lyrics": {
|
||||||
|
"enable_mxm": {
|
||||||
|
type: "boolean",
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
"mxm_language": {
|
||||||
|
type: "string",
|
||||||
|
default: "en"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lastfm": {
|
||||||
|
"enabled": {
|
||||||
|
type: "boolean",
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
"scrobble_after": {
|
||||||
|
type: "number",
|
||||||
|
default: 30
|
||||||
|
},
|
||||||
|
"auth_token": {
|
||||||
|
type: "string",
|
||||||
|
default: ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Analytics for debugging.
|
// Analytics for debugging.
|
||||||
const ElectronSentry = require("@sentry/electron");
|
const ElectronSentry = require("@sentry/electron");
|
||||||
ElectronSentry.init({dsn: "https://68c422bfaaf44dea880b86aad5a820d2@o954055.ingest.sentry.io/6112214"});
|
ElectronSentry.init({dsn: "https://68c422bfaaf44dea880b86aad5a820d2@o954055.ingest.sentry.io/6112214"});
|
||||||
|
|
|
@ -343,9 +343,15 @@ const app = new Vue({
|
||||||
|
|
||||||
// load last played track
|
// load last played track
|
||||||
try {
|
try {
|
||||||
|
<<<<<<< HEAD
|
||||||
let lastItem = window.localStorage.getItem("currentTrack")
|
let lastItem = window.localStorage.getItem("currentTrack")
|
||||||
let time = window.localStorage.getItem("currentTime")
|
let time = window.localStorage.getItem("currentTime")
|
||||||
let queue = window.localStorage.getItem("currentQueue")
|
let queue = window.localStorage.getItem("currentQueue")
|
||||||
|
=======
|
||||||
|
lastItem = window.localStorage.getItem("currentTrack")
|
||||||
|
time = window.localStorage.getItem("currentTime")
|
||||||
|
queue = window.localStorage.getItem("currentQueue")
|
||||||
|
>>>>>>> 7322c71... save last played track, time and queue
|
||||||
if (lastItem != null) {
|
if (lastItem != null) {
|
||||||
lastItem = JSON.parse(lastItem)
|
lastItem = JSON.parse(lastItem)
|
||||||
var kind = lastItem.attributes.playParams.kind;
|
var kind = lastItem.attributes.playParams.kind;
|
||||||
|
@ -365,9 +371,15 @@ const app = new Vue({
|
||||||
let ids = queue.map ( e => (e.playParams ? e.playParams.id : (e.attributes.playParams ? e.attributes.playParams.id : '') ))
|
let ids = queue.map ( e => (e.playParams ? e.playParams.id : (e.attributes.playParams ? e.attributes.playParams.id : '') ))
|
||||||
if (ids.length > 0) {
|
if (ids.length > 0) {
|
||||||
for (id of ids){
|
for (id of ids){
|
||||||
|
<<<<<<< HEAD
|
||||||
try{
|
try{
|
||||||
app.mk.playLater({songs: [id] })
|
app.mk.playLater({songs: [id] })
|
||||||
} catch (err){}
|
} catch (err){}
|
||||||
|
=======
|
||||||
|
try{
|
||||||
|
app.mk.playLater({songs: [id] })
|
||||||
|
} catch (err){}
|
||||||
|
>>>>>>> 7322c71... save last played track, time and queue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -375,7 +387,11 @@ const app = new Vue({
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
})},1500)
|
})},1500)
|
||||||
|
=======
|
||||||
|
})},1000)
|
||||||
|
>>>>>>> 7322c71... save last played track, time and queue
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue