Merge branch 'upcoming' of https://github.com/ciderapp/Cider into upcoming
This commit is contained in:
commit
f95d9dcab2
4 changed files with 39 additions and 8 deletions
|
@ -127,7 +127,7 @@ export class AppEvents {
|
||||||
else if (arg.includes('/play/')) { //Steer away from protocol:// specific conditionals
|
else if (arg.includes('/play/')) { //Steer away from protocol:// specific conditionals
|
||||||
|
|
||||||
const playParam = arg.split('/play/')[1]
|
const playParam = arg.split('/play/')[1]
|
||||||
if (playParam.includes('s/')) { // setQueue can be done with album, song, url, playlist id
|
if (playParam.includes('s/')) { // song
|
||||||
console.log(playParam)
|
console.log(playParam)
|
||||||
let song = playParam.split('s/')[1]
|
let song = playParam.split('s/')[1]
|
||||||
console.warn(`[LinkHandler] Attempting to load song by id: ${song}`);
|
console.warn(`[LinkHandler] Attempting to load song by id: ${song}`);
|
||||||
|
@ -136,7 +136,34 @@ export class AppEvents {
|
||||||
// MusicKit.getInstance().play();
|
// MusicKit.getInstance().play();
|
||||||
// });
|
// });
|
||||||
// `)
|
// `)
|
||||||
|
} else if (playParam.includes('a/')) { // album
|
||||||
|
console.log(playParam)
|
||||||
|
let album = playParam.split('a/')[1]
|
||||||
|
console.warn(`[LinkHandler] Attempting to load album by id: ${album}`);
|
||||||
|
// AppEvents.window.webContents.executeJavaScript(`
|
||||||
|
// MusicKit.getInstance().setQueue({ album: '${album}'}).then(function(queue) {
|
||||||
|
// MusicKit.getInstance().play();
|
||||||
|
// });
|
||||||
|
// `)
|
||||||
|
} else if (playParam.includes('p/')) { // playlist
|
||||||
|
console.log(playParam)
|
||||||
|
let playlist = playParam.split('p/')[1]
|
||||||
|
console.warn(`[LinkHandler] Attempting to load playlist by id: ${playlist}`);
|
||||||
|
// AppEvents.window.webContents.executeJavaScript(`
|
||||||
|
// MusicKit.getInstance().setQueue({ playlist: '${playlist}'}).then(function(queue) {
|
||||||
|
// MusicKit.getInstance().play();
|
||||||
|
// });
|
||||||
|
// `)
|
||||||
|
}
|
||||||
|
} else if (arg.includes('music.apple.com')) { // URL (used with itms/itmss/music/musics uris)
|
||||||
|
console.log(arg)
|
||||||
|
let url = arg.split('//')[1]
|
||||||
|
console.warn(`[LinkHandler] Attempting to load url: ${url}`);
|
||||||
|
// AppEvents.window.webContents.executeJavaScript(`
|
||||||
|
// MusicKit.getInstance().setQueue({ url: 'https://${url}'}).then(function(queue) {
|
||||||
|
// MusicKit.getInstance().play();
|
||||||
|
// });
|
||||||
|
// `)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -3016,7 +3016,11 @@ const app = new Vue({
|
||||||
this.cfg.audio.muted = true;
|
this.cfg.audio.muted = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
checkMuteChange() {
|
||||||
|
if( this.cfg.audio.muted ) {
|
||||||
|
this.cfg.audio.muted = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
async apiCall(url, callback) {
|
async apiCall(url, callback) {
|
||||||
const xmlHttp = new XMLHttpRequest();
|
const xmlHttp = new XMLHttpRequest();
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
<div class="input-container">
|
<div class="input-container">
|
||||||
<button class="volume-button--small volume" @click="app.muteButtonPressed()" :class="{'active': app.cfg.audio.volume == 0}"></button>
|
<button class="volume-button--small volume" @click="app.muteButtonPressed()" :class="{'active': app.cfg.audio.volume == 0}"></button>
|
||||||
<input type="range" class="slider" @wheel="app.volumeWheel" step="0.01" min="0" max="1" v-model="app.mk.volume"
|
<input type="range" class="slider" @wheel="app.volumeWheel" step="0.01" min="0" max="1" v-model="app.mk.volume"
|
||||||
v-if="typeof app.mk.volume != 'undefined'">
|
v-if="typeof app.mk.volume != 'undefined'" @change="app.checkMuteChange()">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -92,12 +92,10 @@
|
||||||
<div class="song-artist"
|
<div class="song-artist"
|
||||||
style="display: inline-block; -webkit-box-orient: horizontal; white-space: nowrap;">
|
style="display: inline-block; -webkit-box-orient: horizontal; white-space: nowrap;">
|
||||||
<div class="item-navigate song-artist" style="display: inline-block"
|
<div class="item-navigate song-artist" style="display: inline-block"
|
||||||
:style="[chrome.progresshover ? {'opacity': '0'} : {'opacity' : '1'} ]"
|
|
||||||
@click="getNowPlayingItemDetailed(`artist`)">
|
@click="getNowPlayingItemDetailed(`artist`)">
|
||||||
{{ mk.nowPlayingItem["attributes"]["artistName"] }}
|
{{ mk.nowPlayingItem["attributes"]["artistName"] }}
|
||||||
</div>
|
</div>
|
||||||
<div class="song-artist item-navigate" style="display: inline-block"
|
<div class="song-artist item-navigate" style="display: inline-block"
|
||||||
:style="[chrome.progresshover ? {'opacity': '0'} : {'opacity' : '1'}]"
|
|
||||||
@click="getNowPlayingItemDetailed('album')" v-if="mk.nowPlayingItem['attributes']['albumName'] != ''">
|
@click="getNowPlayingItemDetailed('album')" v-if="mk.nowPlayingItem['attributes']['albumName'] != ''">
|
||||||
<div class="separator" style="display: inline-block;">{{"—"}}</div>
|
<div class="separator" style="display: inline-block;">{{"—"}}</div>
|
||||||
{{(mk.nowPlayingItem["attributes"]["albumName"]) ?
|
{{(mk.nowPlayingItem["attributes"]["albumName"]) ?
|
||||||
|
@ -136,7 +134,8 @@
|
||||||
<button class="volume-button--small volume" @click="muteButtonPressed()" :class="{'active': this.cfg.audio.volume == 0}"></button>
|
<button class="volume-button--small volume" @click="muteButtonPressed()" :class="{'active': this.cfg.audio.volume == 0}"></button>
|
||||||
<input type="range" class="" @wheel="volumeWheel" step="0.01" min="0" max="1"
|
<input type="range" class="" @wheel="volumeWheel" step="0.01" min="0" max="1"
|
||||||
v-model="mk.volume"
|
v-model="mk.volume"
|
||||||
v-if="typeof mk.volume != 'undefined'">
|
v-if="typeof mk.volume != 'undefined'"
|
||||||
|
@change="checkMuteChange()">
|
||||||
</div>
|
</div>
|
||||||
<div class="app-chrome-item generic" v-if="false">
|
<div class="app-chrome-item generic" v-if="false">
|
||||||
<button class="playback-button--small">
|
<button class="playback-button--small">
|
||||||
|
@ -300,7 +299,8 @@
|
||||||
<button class="volume-button--small volume" @click="muteButtonPressed()" :class="{'active': this.cfg.audio.volume == 0}"></button>
|
<button class="volume-button--small volume" @click="muteButtonPressed()" :class="{'active': this.cfg.audio.volume == 0}"></button>
|
||||||
<input type="range" class="" @wheel="volumeWheel" step="0.01" min="0" max="1"
|
<input type="range" class="" @wheel="volumeWheel" step="0.01" min="0" max="1"
|
||||||
v-model="mk.volume"
|
v-model="mk.volume"
|
||||||
v-if="typeof mk.volume != 'undefined'">
|
v-if="typeof mk.volume != 'undefined'"
|
||||||
|
@change="checkMuteChange()">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue