enforce Private Sessions on RPC and LastFM
This commit is contained in:
parent
3c5ac8446c
commit
ae9ea1d668
3 changed files with 9 additions and 4 deletions
|
@ -23,6 +23,7 @@
|
|||
"term.about": "Über",
|
||||
"term.privateSession": "Private Sitzung",
|
||||
"term.queue": "Warteschlange",
|
||||
"term.history": "Verlauf",
|
||||
"term.search": "Suche",
|
||||
"term.library": "Mediathek",
|
||||
"term.listenNow": "Jetzt Hören",
|
||||
|
|
|
@ -207,6 +207,7 @@ export default class DiscordRichPresence {
|
|||
this.connect((DiscordRichPresence._store.general.discord_rpc == 1) ? '911790844204437504' : '886578863147192350');
|
||||
console.debug(`[Plugin][${this.name}] Ready.`);
|
||||
ipcMain.on('updateRPCImage', (_event, imageurl) => {
|
||||
if (DiscordRichPresence._store.visual.showuserinfo){
|
||||
fetch('https://api.cider.sh/v1/images' ,{
|
||||
|
||||
method: 'POST',
|
||||
|
@ -221,7 +222,7 @@ export default class DiscordRichPresence {
|
|||
self._attributes["artwork"]["url"] = json.url
|
||||
self.updateActivity(self._attributes)
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -237,8 +238,9 @@ export default class DiscordRichPresence {
|
|||
* @param attributes Music Attributes (attributes.status = current state)
|
||||
*/
|
||||
onPlaybackStateDidChange(attributes: object): void {
|
||||
if (DiscordRichPresence._store.visual.showuserinfo){
|
||||
this._attributes = attributes
|
||||
this.updateActivity(attributes)
|
||||
this.updateActivity(attributes)}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -246,7 +248,8 @@ export default class DiscordRichPresence {
|
|||
* @param attributes Music Attributes
|
||||
*/
|
||||
onNowPlayingItemDidChange(attributes: object): void {
|
||||
if (DiscordRichPresence._store.visual.showuserinfo){
|
||||
this._attributes = attributes
|
||||
this.updateActivity(attributes)
|
||||
this.updateActivity(attributes)}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -258,13 +258,14 @@ export default class LastFMPlugin {
|
|||
* @param attributes Music Attributes
|
||||
*/
|
||||
nowPlayingItemDidChangeLastFM(attributes: any): void {
|
||||
if (this._store.visual.showuserinfo){
|
||||
attributes.status = true
|
||||
if (!this._store.lastfm.filterLoop) {
|
||||
this._lastfm.cachedNowPlayingAttributes = false;
|
||||
this._lastfm.cachedAttributes = false
|
||||
}
|
||||
this.updateNowPlayingSong(attributes)
|
||||
this.scrobbleSong(attributes)
|
||||
this.scrobbleSong(attributes)}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue