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

@ -548,6 +548,7 @@
"settings.option.connectivity.lastfmScrobble.filterLoop": "Filter looped track (Last.fm)",
"settings.option.connectivity.lastfmScrobble.filterLoop.description": "Prevent looped tracks from being scrobbled or displayed in the Now Playing list on Last.fm.",
"settings.option.connectivity.lastfmScrobble.filterTypes": "Filter Media Types (Last.fm)",
"settings.option.connectivity.lastfmScrobble.filterTypes.description": "Prevent tracks of the selected media types from being scrobbled or displayed in the Now Playing list on Last.fm.",
"settings.option.connectivity.lastfmScrobble.manualToken": "Enter Last.fm Token Manually",
"settings.option.connectivity.lastfmScrobble.manualToken.link": "Click here to get a Last.fm token",
"settings.notyf.connectivity.lastfmScrobble.connectError": "Last.fm Connection Timed Out",

View file

@ -548,6 +548,7 @@
"settings.option.connectivity.lastfmScrobble.filterLoop": "Filter looped track (Last.fm)",
"settings.option.connectivity.lastfmScrobble.filterLoop.description": "Prevent looped tracks from being scrobbled or displayed in the Now Playing list on Last.fm.",
"settings.option.connectivity.lastfmScrobble.filterTypes": "Filter Media Types (Last.fm)",
"settings.option.connectivity.lastfmScrobble.filterTypes.description": "Prevent tracks of the selected media types from being scrobbled or displayed in the Now Playing list on Last.fm.",
"settings.option.connectivity.lastfmScrobble.manualToken": "Enter Last.fm Token Manually",
"settings.option.connectivity.lastfmScrobble.manualToken.link": "Click here to get a Last.fm token",
"settings.notyf.connectivity.lastfmScrobble.connectError": "Last.fm Connection Timed Out",

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);

View file

@ -1118,11 +1118,12 @@
<div class="md-option-line" v-show="app.cfg.connectivity.lastfm.enabled">
<div class="md-option-segment">
{{$root.getLz('settings.option.connectivity.lastfmScrobble.filterTypes')}}
<small>{{$root.getLz('settings.option.connectivity.lastfmScrobble.filterTypes.description')}}</small>
</div>
<div class="md-option-segment md-option-segment_auto">
<label>
<input type="checkbox" @change="filterChange" value="song">{{$root.getLz('term.songs')}}<br>
<input type="checkbox" @change="filterChange" value="musicVideo">{{$root.getLz('term.musicVideos')}}<br>
<input type="checkbox" v-model="app.cfg.connectivity.lastfm.filter_types['song']">{{$root.getLz('term.songs')}}<br>
<input type="checkbox" v-model="app.cfg.connectivity.lastfm.filter_types['musicVideo']">{{$root.getLz('term.musicVideos')}}
</label>
</div>
</div>