Fix LastFM Filter Types

This commit is contained in:
Core 2022-09-16 18:39:39 +01:00
parent 7b3c483df7
commit 046cee6348
No known key found for this signature in database
GPG key ID: 2AB8327FBA02D1C0
6 changed files with 12 additions and 7 deletions

View file

@ -1350,7 +1350,7 @@ export class BrowserWindow {
.then(async (buffer) => {
const metadata = await mm.parseBuffer(buffer, "audio/x-m4a");
let SoundCheckTag = metadata.native.iTunes[1].value;
console.log("sc", SoundCheckTag);
console.debug("sc", SoundCheckTag);
BrowserWindow.win.webContents.send("SoundCheckTag", SoundCheckTag);
})
.catch((err) => {

View file

@ -170,7 +170,7 @@ export default class lastfm {
return;
}
if (!this._authenticated || !attributes || this._utils.getStoreValue("connectivity.lastfm.filter_types")[attributes.playParams.kind] || (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.type] || (this._utils.getStoreValue("connectivity.lastfm.filter_loop") && this._scrobbleCache.track === attributes.lfmTrack.name)) return;
// Scrobble
const scrobble = {
@ -210,7 +210,9 @@ export default class lastfm {
return;
}
if (!this._authenticated || !attributes || this._utils.getStoreValue("connectivity.lastfm.filter_types")[attributes.playParams.kind] || (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.type] || (this._utils.getStoreValue("connectivity.lastfm.filter_loop") && this._nowPlayingCache.track === attributes.lfmTrack.name)) return;
console.log(this._utils.getStoreValue("connectivity.lastfm.filter_types"));
const nowPlaying = {
artist: attributes.lfmTrack.artist.name,

View file

@ -159,7 +159,7 @@ export default class RAOP {
electron.ipcMain.on("getAirplayDevice", (event, data) => {
this.castDevices = [];
console.log("scan for airplay devices");
console.debug("scan for airplay devices");
const browser = this.mdns.createBrowser(this.mdns.tcp("raop"));
browser.on("ready", browser.discover);
@ -168,7 +168,7 @@ export default class RAOP {
if (service.addresses && service.fullname && service.fullname.includes("_raop._tcp")) {
// console.log(service.txt)
this._win.webContents.executeJavaScript(`console.log(
"${service.name} ${service.host}:${service.port} ${service.addresses} ${service.fullname}"
"${service.name} ${service.host}:${service.port} ${service.addresses} ${service.fullname}"
)`);
let itemname = service.fullname.substring(service.fullname.indexOf("@") + 1, service.fullname.indexOf("._raop._tcp"));
this.ondeviceup(itemname, service.host, service.port, service.addresses, service.txt);