added cider audio labs and EQ to nowplaying context menu
This commit is contained in:
parent
c8ac1e65be
commit
33c9b323fb
1 changed files with 39 additions and 15 deletions
|
@ -579,11 +579,11 @@ const app = new Vue({
|
||||||
this.setTheme(this.cfg.visual.theme)
|
this.setTheme(this.cfg.visual.theme)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.platform == "darwin") {
|
if (this.platform == "darwin") {
|
||||||
this.chrome.windowControlPosition = "left"
|
this.chrome.windowControlPosition = "left"
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.cfg.visual.nativeTitleBar) {
|
if (this.cfg.visual.nativeTitleBar) {
|
||||||
this.chrome.nativeControls = true
|
this.chrome.nativeControls = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -765,7 +765,8 @@ const app = new Vue({
|
||||||
// let replaygain = self.parseSCTagToRG(tag)
|
// let replaygain = self.parseSCTagToRG(tag)
|
||||||
try {
|
try {
|
||||||
if (app.mk.nowPlayingItem.type !== 'song') {
|
if (app.mk.nowPlayingItem.type !== 'song') {
|
||||||
CiderAudio.audioNodes.gainNode.gain.value = 0.70794578438;}
|
CiderAudio.audioNodes.gainNode.gain.value = 0.70794578438;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
let soundcheck = tag.split(" ")
|
let soundcheck = tag.split(" ")
|
||||||
let numbers = []
|
let numbers = []
|
||||||
|
@ -780,9 +781,9 @@ const app = new Vue({
|
||||||
try {
|
try {
|
||||||
//CiderAudio.audioNodes.gainNode.gain.value = (Math.min(Math.pow(10, (replaygain.gain / 20)), (1 / replaygain.peak)))
|
//CiderAudio.audioNodes.gainNode.gain.value = (Math.min(Math.pow(10, (replaygain.gain / 20)), (1 / replaygain.peak)))
|
||||||
CiderAudio.audioNodes.gainNode.gain.value = gain
|
CiderAudio.audioNodes.gainNode.gain.value = gain
|
||||||
} catch (e) {}
|
} catch (e) { }
|
||||||
}
|
}
|
||||||
} catch (e) {ipcRenderer.send('SoundCheckTag', event, tag);} // brute force until it works
|
} catch (e) { ipcRenderer.send('SoundCheckTag', event, tag); } // brute force until it works
|
||||||
})
|
})
|
||||||
|
|
||||||
ipcRenderer.on('play', function (_event, mode, id) {
|
ipcRenderer.on('play', function (_event, mode, id) {
|
||||||
|
@ -952,7 +953,7 @@ const app = new Vue({
|
||||||
less.refresh()
|
less.refresh()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
macOSEmu () {
|
macOSEmu() {
|
||||||
this.chrome.forceDirectives["macosemu"] = {
|
this.chrome.forceDirectives["macosemu"] = {
|
||||||
value: true
|
value: true
|
||||||
}
|
}
|
||||||
|
@ -989,8 +990,8 @@ const app = new Vue({
|
||||||
classes.simplebg = true
|
classes.simplebg = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.platform !== "darwin") {
|
if (this.platform !== "darwin") {
|
||||||
switch(parseInt(this.cfg.visual.windowControlPosition)) {
|
switch (parseInt(this.cfg.visual.windowControlPosition)) {
|
||||||
default:
|
default:
|
||||||
case 0:
|
case 0:
|
||||||
this.chrome.windowControlPosition = "right"
|
this.chrome.windowControlPosition = "right"
|
||||||
|
@ -1010,10 +1011,10 @@ const app = new Vue({
|
||||||
if (this.getThemeDirective('windowLayout') == 'twopanel') {
|
if (this.getThemeDirective('windowLayout') == 'twopanel') {
|
||||||
classes.twopanel = true
|
classes.twopanel = true
|
||||||
}
|
}
|
||||||
if(this.getThemeDirective("appNavigation") == "seperate"){
|
if (this.getThemeDirective("appNavigation") == "seperate") {
|
||||||
classes.navbar = true
|
classes.navbar = true
|
||||||
}
|
}
|
||||||
if(this.getThemeDirective("macosemu") == true){
|
if (this.getThemeDirective("macosemu") == true) {
|
||||||
classes.macosemu = true
|
classes.macosemu = true
|
||||||
}
|
}
|
||||||
return classes
|
return classes
|
||||||
|
@ -3342,7 +3343,7 @@ const app = new Vue({
|
||||||
return "https://beta.music.apple.com/assets/product/MissingArtworkMusic.svg"
|
return "https://beta.music.apple.com/assets/product/MissingArtworkMusic.svg"
|
||||||
}
|
}
|
||||||
height = parseInt(height * window.devicePixelRatio)
|
height = parseInt(height * window.devicePixelRatio)
|
||||||
if(width) {
|
if (width) {
|
||||||
width = parseInt(width * window.devicePixelRatio)
|
width = parseInt(width * window.devicePixelRatio)
|
||||||
}
|
}
|
||||||
let newurl = `${url.replace('{w}', width ?? height).replace('{h}', height).replace('{f}', "webp").replace('{c}', ((width === 900) ? "sr" : "cc"))}`;
|
let newurl = `${url.replace('{w}', width ?? height).replace('{h}', height).replace('{f}', "webp").replace('{c}', ((width === 900) ? "sr" : "cc"))}`;
|
||||||
|
@ -3784,10 +3785,33 @@ const app = new Vue({
|
||||||
app.songLinkShare((u.data.data.length && u.data.data.length > 0) ? u.data.data[0].attributes.url : u.data.data.attributes.url)
|
app.songLinkShare((u.data.data.length && u.data.data.length > 0) ? u.data.data[0].attributes.url : u.data.data.attributes.url)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "equalizer",
|
||||||
|
"icon": "../views/svg/speaker.svg",
|
||||||
|
"name": app.getLz('term.equalizer'),
|
||||||
|
"hidden": true,
|
||||||
|
"action": function () {
|
||||||
|
app.modals.equalizer = true
|
||||||
|
app.modals.audioSettings = false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "audioLab",
|
||||||
|
"icon": "../views/svg/speaker.svg",
|
||||||
|
"name": app.getLz('settings.option.audio.audioLab'),
|
||||||
|
"hidden": true,
|
||||||
|
"action": function () {
|
||||||
|
app.appRoute('audiolabs')
|
||||||
|
}
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(this.cfg.advanced.AudioContext) {
|
||||||
|
menus.normal.items.find(i => i.id === 'audioLab').hidden = false
|
||||||
|
menus.normal.items.find(i => i.id === 'equalizer').hidden = false
|
||||||
|
}
|
||||||
if (this.contextExt) {
|
if (this.contextExt) {
|
||||||
if (this.contextExt.normal) {
|
if (this.contextExt.normal) {
|
||||||
menus.normal.items = menus.normal.items.concat(this.contextExt.normal)
|
menus.normal.items = menus.normal.items.concat(this.contextExt.normal)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue