Fix
This commit is contained in:
parent
65ef41ab01
commit
50a8524f55
2 changed files with 6 additions and 6 deletions
|
@ -50,17 +50,17 @@ export default class lastfm {
|
||||||
});
|
});
|
||||||
|
|
||||||
this._utils.getIPCMain().on("lastfm:nowPlayingChange", (event: any, attributes: any) => {
|
this._utils.getIPCMain().on("lastfm:nowPlayingChange", (event: any, attributes: any) => {
|
||||||
if (this._utils.getStoreValue("connectivity.lastfm.filter_loop") || this._utils.getStoreValue("general.privateEnabled") || attributes.type === "radioStation") return;
|
if (this._utils.getStoreValue("connectivity.lastfm.filter_loop") || this._utils.getStoreValue("general.privateEnabled") || attributes.kind === "radioStation") return;
|
||||||
this.updateNowPlayingTrack(attributes);
|
this.updateNowPlayingTrack(attributes);
|
||||||
});
|
});
|
||||||
|
|
||||||
this._utils.getIPCMain().on("lastfm:FilteredNowPlayingItemDidChange", (event: any, attributes: any) => {
|
this._utils.getIPCMain().on("lastfm:FilteredNowPlayingItemDidChange", (event: any, attributes: any) => {
|
||||||
if (this._utils.getStoreValue("general.privateEnabled") || attributes.type === "radioStation") return;
|
if (this._utils.getStoreValue("general.privateEnabled") || attributes.kind === "radioStation") return;
|
||||||
this.updateNowPlayingTrack(attributes);
|
this.updateNowPlayingTrack(attributes);
|
||||||
});
|
});
|
||||||
|
|
||||||
this._utils.getIPCMain().on("lastfm:scrobbleTrack", (event: any, attributes: any) => {
|
this._utils.getIPCMain().on("lastfm:scrobbleTrack", (event: any, attributes: any) => {
|
||||||
if (this._utils.getStoreValue("general.privateEnabled") || attributes.type === "radioStation") return;
|
if (this._utils.getStoreValue("general.privateEnabled") || attributes.kind === "radioStation") return;
|
||||||
this.scrobbleTrack(attributes);
|
this.scrobbleTrack(attributes);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -170,7 +170,7 @@ export default class lastfm {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this._authenticated || !attributes || this._utils.getStoreValue("connectivity.lastfm.filter_types")[attributes.playParams.kind] || this._utils.getStoreValue("connectivity.lastfm.filter_types")[attributes.type] || (this._utils.getStoreValue("connectivity.lastfm.filter_loop") && this._scrobbleCache.track === attributes.lfmTrack.name)) return;
|
if (!this._authenticated || !attributes || this._utils.getStoreValue("connectivity.lastfm.filter_types")[attributes.playParams.kind] || this._utils.getStoreValue("connectivity.lastfm.filter_types")[attributes.kind] || (this._utils.getStoreValue("connectivity.lastfm.filter_loop") && this._scrobbleCache.track === attributes.lfmTrack.name)) return;
|
||||||
|
|
||||||
// Scrobble
|
// Scrobble
|
||||||
const scrobble = {
|
const scrobble = {
|
||||||
|
@ -210,7 +210,7 @@ export default class lastfm {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this._authenticated || !attributes || this._utils.getStoreValue("connectivity.lastfm.filter_types")[attributes.playParams.kind] || this._utils.getStoreValue("connectivity.lastfm.filter_types")[attributes.type] || (this._utils.getStoreValue("connectivity.lastfm.filter_loop") && this._nowPlayingCache.track === attributes.lfmTrack.name)) return;
|
if (!this._authenticated || !attributes || this._utils.getStoreValue("connectivity.lastfm.filter_types")[attributes.playParams.kind] || this._utils.getStoreValue("connectivity.lastfm.filter_types")[attributes.kind] || (this._utils.getStoreValue("connectivity.lastfm.filter_loop") && this._nowPlayingCache.track === attributes.lfmTrack.name)) return;
|
||||||
|
|
||||||
console.log(this._utils.getStoreValue("connectivity.lastfm.filter_types"));
|
console.log(this._utils.getStoreValue("connectivity.lastfm.filter_types"));
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,7 @@ const MusicKitInterop = {
|
||||||
const attributes = nowPlayingItem != null ? nowPlayingItem.attributes : {};
|
const attributes = nowPlayingItem != null ? nowPlayingItem.attributes : {};
|
||||||
|
|
||||||
attributes.songId = attributes.songId ?? attributes.playParams?.catalogId ?? attributes.playParams?.id;
|
attributes.songId = attributes.songId ?? attributes.playParams?.catalogId ?? attributes.playParams?.id;
|
||||||
attributes.type = nowPlayingItem?.type ?? "";
|
attributes.kind = nowPlayingItem?.type ?? attributes.type ?? attributes.playParams.kind ?? "";
|
||||||
attributes.status = nowPlayingItem == null ? null : !!isPlayingExport;
|
attributes.status = nowPlayingItem == null ? null : !!isPlayingExport;
|
||||||
attributes.name = attributes?.name ?? "no-title-found";
|
attributes.name = attributes?.name ?? "no-title-found";
|
||||||
attributes.artwork = attributes?.artwork ?? { url: "" };
|
attributes.artwork = attributes?.artwork ?? { url: "" };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue