removed some comments, fixed app not loading in yarn start.
This commit is contained in:
parent
e468b1fa83
commit
3340fb93df
4 changed files with 2 additions and 84 deletions
|
@ -3073,23 +3073,6 @@ const app = new Vue({
|
||||||
})
|
})
|
||||||
self.$store.commit("setLCDArtwork", img)
|
self.$store.commit("setLCDArtwork", img)
|
||||||
})
|
})
|
||||||
|
|
||||||
// Vibrant.from(this.mk["nowPlayingItem"]["attributes"]["artwork"]["url"].replace('{w}', size).replace('{h}', size)).getPalette().then(palette=>{
|
|
||||||
// let angle = "140deg"
|
|
||||||
// let gradient = ""
|
|
||||||
// let colors = Object.values(palette).filter(color=>color!=null)
|
|
||||||
// if(colors.length > 0){
|
|
||||||
// let stops = []
|
|
||||||
// colors.forEach(color=>{
|
|
||||||
// stops.push(`${self._rgbToRgb(color._rgb)} 0%`)
|
|
||||||
// })
|
|
||||||
// stops.push(`${self._rgbToRgb(colors[0]._rgb)} 100%`)
|
|
||||||
// gradient = `linear-gradient(${angle}, ${stops.join(", ")}`
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// document.querySelector("#app").style.setProperty("--bgColor", gradient)
|
|
||||||
// }).setQuantizer(Vibrant.Quantizer.WebWorker)
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
clearInterval(bginterval);
|
clearInterval(bginterval);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -3114,47 +3097,6 @@ const app = new Vue({
|
||||||
}
|
}
|
||||||
}, 200)
|
}, 200)
|
||||||
},
|
},
|
||||||
|
|
||||||
// getNowPlayingArtwork(size = 600) {
|
|
||||||
// if (typeof this.mk.nowPlayingItem === "undefined") return;
|
|
||||||
// let interval = setInterval(() => {
|
|
||||||
|
|
||||||
// try {
|
|
||||||
// if (this.mk.nowPlayingItem && this.mk.nowPlayingItem["id"] != this.currentTrackIDBG && document.querySelector('.app-playback-controls .artwork')) {
|
|
||||||
// this.currentTrackIDBG = this.mk.nowPlayingItem["id"];
|
|
||||||
// if (document.querySelector('.app-playback-controls .artwork') != null) {
|
|
||||||
// clearInterval(interval);
|
|
||||||
// }
|
|
||||||
// if (app.mk.nowPlayingItem.attributes.artwork != null && app.mk.nowPlayingItem.attributes.artwork.url != null && app.mk.nowPlayingItem.attributes.artwork.url!= '' ) {
|
|
||||||
// document.querySelector('.app-playback-controls .artwork').style.setProperty('--artwork', `url("${decodeURI((this.mk["nowPlayingItem"]["attributes"]["artwork"]["url"])).replace('{w}', size).replace('{h}', size)}")`);
|
|
||||||
// try {
|
|
||||||
// clearInterval(interval);
|
|
||||||
// } catch (err) {
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// this.setLibraryArt()
|
|
||||||
// }
|
|
||||||
// } else if (this.mk.nowPlayingItem["id"] == this.currentTrackID) {
|
|
||||||
// try {
|
|
||||||
// clearInterval(interval);
|
|
||||||
// } catch (err) {
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// } catch (e) {
|
|
||||||
// if (this.mk.nowPlayingItem && this.mk.nowPlayingItem["id"] && document.querySelector('.app-playback-controls .artwork')) {
|
|
||||||
// this.setLibraryArt()
|
|
||||||
// try {
|
|
||||||
// clearInterval(interval);
|
|
||||||
// } catch (err) {
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
// }, 200)
|
|
||||||
|
|
||||||
|
|
||||||
// },
|
|
||||||
async getCurrentArtURL() {
|
async getCurrentArtURL() {
|
||||||
try {
|
try {
|
||||||
this.currentArtUrl = '';
|
this.currentArtUrl = '';
|
||||||
|
@ -3169,11 +3111,6 @@ const app = new Vue({
|
||||||
data = data.data.data[0];
|
data = data.data.data[0];
|
||||||
if (data != null && data !== "" && data.attributes != null && data.attributes.artwork != null) {
|
if (data != null && data !== "" && data.attributes != null && data.attributes.artwork != null) {
|
||||||
this.currentArtUrl = (data["attributes"]["artwork"]["url"] ?? '').replace('{w}', 50).replace('{h}', 50);
|
this.currentArtUrl = (data["attributes"]["artwork"]["url"] ?? '').replace('{w}', 50).replace('{h}', 50);
|
||||||
// if (this.currentArtUrl != ""){
|
|
||||||
// let attr = MusicKitInterop.getAttributes();
|
|
||||||
// attr.artwork.url = this.currentArtUrl;
|
|
||||||
// ipcRenderer.send('forceUpdateRPC',attr)
|
|
||||||
// }
|
|
||||||
try {
|
try {
|
||||||
document.querySelector('.app-playback-controls .artwork').style.setProperty('--artwork', `url("${this.currentArtUrl}")`);
|
document.querySelector('.app-playback-controls .artwork').style.setProperty('--artwork', `url("${this.currentArtUrl}")`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -3398,18 +3335,11 @@ const app = new Vue({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async nowPlayingContextMenu(event) {
|
async nowPlayingContextMenu(event) {
|
||||||
// function revisedRandId() {
|
|
||||||
// return Math.random().toString(36).replace(/[^a-z]+/g, '').substr(2, 10);
|
|
||||||
// }
|
|
||||||
let self = this
|
let self = this
|
||||||
let data_type = this.mk.nowPlayingItem.playParams.kind
|
let data_type = this.mk.nowPlayingItem.playParams.kind
|
||||||
let item_id = this.mk.nowPlayingItem.attributes.playParams.id ?? this.mk.nowPlayingItem.id
|
let item_id = this.mk.nowPlayingItem.attributes.playParams.id ?? this.mk.nowPlayingItem.id
|
||||||
let isLibrary = this.mk.nowPlayingItem.attributes.playParams.isLibrary ?? false
|
let isLibrary = this.mk.nowPlayingItem.attributes.playParams.isLibrary ?? false
|
||||||
let params = {"fields[songs]": "inLibrary", "fields[albums]": "inLibrary", "relate": "library", "t": "1"}
|
let params = {"fields[songs]": "inLibrary", "fields[albums]": "inLibrary", "relate": "library", "t": "1"}
|
||||||
// let res = await app.mkapi(data_type, isLibrary , item_id, params);
|
|
||||||
// if (res && res.relationships && res.relationships.library && res.relationships.library.data && res.relationships.library.data.length > 0) {
|
|
||||||
// item_id = res.relationships.library.data[0].id
|
|
||||||
// }
|
|
||||||
app.selectedMediaItems = []
|
app.selectedMediaItems = []
|
||||||
app.select_selectMediaItem(item_id, data_type, 0, '12344', isLibrary)
|
app.select_selectMediaItem(item_id, data_type, 0, '12344', isLibrary)
|
||||||
let useMenu = "normal"
|
let useMenu = "normal"
|
||||||
|
@ -3473,7 +3403,6 @@ const app = new Vue({
|
||||||
"disabled": false,
|
"disabled": false,
|
||||||
"action": function () {
|
"action": function () {
|
||||||
app.addToLibrary(app.mk.nowPlayingItem.id);
|
app.addToLibrary(app.mk.nowPlayingItem.id);
|
||||||
// if (!isLibrary) {app.addToLibrary(item_id); this.mk.nowPlayingItem.attributes.playParams["isLibrary"] = true} else { app.removeFromLibrary(data_type,item_id); this.mk.nowPlayingItem.attributes.playParams["isLibrary"] = false};
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -3499,21 +3428,10 @@ const app = new Vue({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.contextExt) {
|
if (this.contextExt) {
|
||||||
// if this.context-ext.normal is true append all options to the 'normal' menu which is a kvp of arrays
|
|
||||||
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// isLibrary = await app.inLibrary([this.mk.nowPlayingItem])
|
|
||||||
// console.warn(isLibrary)
|
|
||||||
// if(isLibrary.length != 0) {
|
|
||||||
// if (isLibrary[0].attributes.inLibrary) {
|
|
||||||
// menus.normal.items.find(x => x.id == "addToLibrary").disabled = true
|
|
||||||
// }
|
|
||||||
// }else{
|
|
||||||
// menus.normal.items.find(x => x.id == "addToLibrary").disabled = true
|
|
||||||
// }
|
|
||||||
this.showMenuPanel(menus[useMenu], event)
|
this.showMenuPanel(menus[useMenu], event)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
@import url("ameframework.css");
|
|
||||||
@import url("assets/fonts/Inter/inter.css");
|
@import url("assets/fonts/Inter/inter.css");
|
||||||
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@100;300;400;500;700;900&display=swap');
|
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@100;300;400;500;700;900&display=swap');
|
||||||
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@100;300;400;500;700;900&display=swap");
|
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@100;300;400;500;700;900&display=swap");
|
||||||
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+HK:wght@100;300;400;500;700;900&display=swap");
|
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+HK:wght@100;300;400;500;700;900&display=swap");
|
||||||
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@100;300;400;500;700;900&display=swap");
|
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@100;300;400;500;700;900&display=swap");
|
||||||
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;300;400;500;700;900&display=swap");
|
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;300;400;500;700;900&display=swap");
|
||||||
|
@import url("less/ameframework.less");
|
||||||
@import url("less/bootstrap.less");
|
@import url("less/bootstrap.less");
|
||||||
@import url("less/notyf.less");
|
@import url("less/notyf.less");
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
v-if="mk.nowPlayingItem['attributes']['contentRating'] == 'explicit'"
|
v-if="mk.nowPlayingItem['attributes']['contentRating'] == 'explicit'"
|
||||||
style="display: inline-block"></div>
|
style="display: inline-block"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="audio-type ppe-icon" v-if="app.cfg.advanced.ciderPPE == true"></div>
|
<div class="audio-type ppe-icon" v-if="cfg.advanced.ciderPPE == true"></div>
|
||||||
<div class="song-artist-album">
|
<div class="song-artist-album">
|
||||||
<div class="song-artist-album-content"
|
<div class="song-artist-album-content"
|
||||||
:class="[isElementOverflowing('#app-main > .app-chrome .app-chrome-item > .app-playback-controls > div >.song-artist-album > .song-artist-album-content') ? 'marquee' : '']"
|
:class="[isElementOverflowing('#app-main > .app-chrome .app-chrome-item > .app-playback-controls > div >.song-artist-album > .song-artist-album-content') ? 'marquee' : '']"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue