disable marquee
This commit is contained in:
parent
c02493696f
commit
25f53f9b72
3 changed files with 13 additions and 3 deletions
|
@ -1,3 +1,4 @@
|
|||
import * as electron from 'electron';
|
||||
import * as DiscordRPC from 'discord-rpc'
|
||||
export default class DiscordRPCPlugin {
|
||||
/**
|
||||
|
@ -177,6 +178,9 @@ export default class DiscordRPCPlugin {
|
|||
onReady(win: any): void {
|
||||
this._win = win;
|
||||
this.connect((this._win.store.store.general.discord_rpc == 1) ? '911790844204437504' : '886578863147192350');
|
||||
// electron.ipcMain.on("forceUpdateRPC", (event, attributes : object) => {
|
||||
// this.updateActivity(attributes)
|
||||
// });
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2877,7 +2877,12 @@ const app = new Vue({
|
|||
let data = await this.mk.api.v3.music(`/v1/me/library/songs/${this.mk.nowPlayingItem.id}`);
|
||||
data = data.data.data[0];
|
||||
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 {
|
||||
document.querySelector('.app-playback-controls .artwork').style.setProperty('--artwork', `url("${this.currentArtUrl}")`);
|
||||
} catch (e) {}
|
||||
|
|
|
@ -86,16 +86,17 @@
|
|||
<mediaitem-artwork :url="currentArtUrl"></mediaitem-artwork>
|
||||
</div>
|
||||
<div class="playback-info">
|
||||
<!-- :class="[isElementOverflowing('#app-main > div.app-chrome > div.app-chrome--center > div > div > div.playback-info > div.song-name') ? 'marquee' : '']" -->
|
||||
<div class="song-name" style="-webkit-box-orient: horizontal;"
|
||||
:class="[isElementOverflowing('#app-main > div.app-chrome > div.app-chrome--center > div > div > div.playback-info > div.song-name') ? 'marquee' : '']"
|
||||
|
||||
:style="[mk.nowPlayingItem['attributes']['contentRating'] == 'explicit' ? {'margin-left' : '23px'} : {'margin-left' : '0px'} ]">
|
||||
{{ mk.nowPlayingItem["attributes"]["name"] }}
|
||||
<div class="explicit-icon"
|
||||
v-if="mk.nowPlayingItem['attributes']['contentRating'] == 'explicit'"
|
||||
style="display: inline-block"></div>
|
||||
</div>
|
||||
<!-- :class="[isElementOverflowing('#app-main > div.app-chrome > div.app-chrome--center > div > div > div.playback-info > div.song-artist') ? 'marquee' : '']" -->
|
||||
<div class="song-artist"
|
||||
:class="[isElementOverflowing('#app-main > div.app-chrome > div.app-chrome--center > div > div > div.playback-info > div.song-artist') ? 'marquee' : '']"
|
||||
style="display: inline-block; -webkit-box-orient: horizontal; white-space: nowrap;">
|
||||
<div class="item-navigate song-artist" style="display: inline-block"
|
||||
@click="getNowPlayingItemDetailed(`artist`)">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue