Filter loop added
This commit is contained in:
parent
23ad2640dc
commit
7850493c9e
3 changed files with 13 additions and 2 deletions
|
@ -222,6 +222,7 @@ export class Store {
|
||||||
"lastfm": {
|
"lastfm": {
|
||||||
"enabled": false,
|
"enabled": false,
|
||||||
"scrobble_after": 50,
|
"scrobble_after": 50,
|
||||||
|
"filter_loop": false,
|
||||||
"secrets": {
|
"secrets": {
|
||||||
"username": "",
|
"username": "",
|
||||||
"key": ""
|
"key": ""
|
||||||
|
|
|
@ -162,7 +162,7 @@ export default class lastfm {
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
private scrobbleTrack(attributes: any): void {
|
private scrobbleTrack(attributes: any): void {
|
||||||
if (!this._authenticated || !attributes || (this._scrobbleCache.track === attributes.lfmTrack.name)) return;
|
if (!this._authenticated || !attributes || (this._utils.getStoreValue("lastfm.filter_loop") && this._scrobbleCache.track === attributes.lfmTrack.name)) return;
|
||||||
|
|
||||||
if (this._scrobbleDelay) {
|
if (this._scrobbleDelay) {
|
||||||
clearTimeout(this._scrobbleDelay);
|
clearTimeout(this._scrobbleDelay);
|
||||||
|
@ -200,7 +200,7 @@ export default class lastfm {
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateNowPlayingTrack(attributes: any): void {
|
private updateNowPlayingTrack(attributes: any): void {
|
||||||
if (!this._authenticated || !attributes || (this._nowPlayingCache.track === attributes.lfmTrack.name)) return;
|
if (!this._authenticated || !attributes || (this._utils.getStoreValue("lastfm.filter_loop") && this._nowPlayingCache.track === attributes.lfmTrack.name)) return;
|
||||||
|
|
||||||
const nowPlaying = {
|
const nowPlaying = {
|
||||||
'artist': attributes.lfmTrack.artist.name,
|
'artist': attributes.lfmTrack.artist.name,
|
||||||
|
|
|
@ -1079,6 +1079,16 @@
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="md-option-line" v-show="app.cfg.lastfm.enabled">
|
||||||
|
<div class="md-option-segment">
|
||||||
|
{{$root.getLz('settings.option.connectivity.filterLoop')}}
|
||||||
|
</div>
|
||||||
|
<div class="md-option-segment md-option-segment_auto">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" v-model="app.cfg.lastfm.filter_loop" switch/>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</b-tab>
|
</b-tab>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue