Add option to disable loop filter in lastfm

This commit is contained in:
vapormusic 2022-01-26 21:24:30 +07:00
parent 6fb2973b11
commit 1badd13f69
4 changed files with 20 additions and 4 deletions

View file

@ -234,12 +234,17 @@
"settings.option.connectivity.lastfmScrobble.delay": "LastFM Scrobble Delay (%)", "settings.option.connectivity.lastfmScrobble.delay": "LastFM Scrobble Delay (%)",
"settings.option.connectivity.lastfmScrobble.nowPlaying": "Enable LastFM Now Playing", "settings.option.connectivity.lastfmScrobble.nowPlaying": "Enable LastFM Now Playing",
"settings.option.connectivity.lastfmScrobble.removeFeatured": "Remove featuring artists from song title (LastFM)", "settings.option.connectivity.lastfmScrobble.removeFeatured": "Remove featuring artists from song title (LastFM)",
"settings.option.connectivity.lastfmScrobble.filterLoop": "Filter looped track (LastFM)",
// Refer to term.connect for the connect button // Refer to term.connect for the connect button
// Settings - Experimental // Settings - Experimental
"settings.header.experimental": "Experimental", "settings.header.experimental": "Experimental",
"settings.header.experimental.description": "Adjust the experimental settings for Cider.", "settings.header.experimental.description": "Adjust the experimental settings for Cider.",
"settings.option.experimental.compactUI": "Compact UI", // Toggle "settings.option.experimental.compactUI": "Compact UI", // Toggle
"settings.option.experimental.closeButtonBehaviour": "Close Button Behaviour",
"settings.option.experimental.closeButtonBehaviour.quit": "Quit Cider",
"settings.option.experimental.closeButtonBehaviour.minimizeTaskbar": "Minimize to taskbar",
"settings.option.experimental.closeButtonBehaviour.minimizeTray": "Minimize to system tray",
// Refer to term.disabled & term.enabled // Refer to term.disabled & term.enabled
// Spatialization Menu // Spatialization Menu

View file

@ -79,6 +79,7 @@ export class ConfigStore {
"scrobble_after": 30, "scrobble_after": 30,
"auth_token": "", "auth_token": "",
"enabledRemoveFeaturingArtists": true, "enabledRemoveFeaturingArtists": true,
"filterLoop": true,
"NowPlaying": "true" "NowPlaying": "true"
}, },
"advanced": { "advanced": {

View file

@ -243,6 +243,8 @@ export default class LastFMPlugin {
* @param attributes Music Attributes * @param attributes Music Attributes
*/ */
onNowPlayingItemDidChange(attributes: object): void { onNowPlayingItemDidChange(attributes: object): void {
if (!this._store.lastfm.filterLoop){
this._lastfm.cachedAttributes = []}
this.scrobbleSong(attributes) this.scrobbleSong(attributes)
this.updateNowPlayingSong(attributes) this.updateNowPlayingSong(attributes)
} }

View file

@ -494,6 +494,14 @@
<input type="checkbox" v-model="app.cfg.lastfm.enabledRemoveFeaturingArtists" switch/> <input type="checkbox" v-model="app.cfg.lastfm.enabledRemoveFeaturingArtists" switch/>
</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.lastfmScrobble.filterLoop')}}
</div>
<div class="md-option-segment md-option-segment_auto" >
<input type="checkbox" v-model="app.cfg.lastfm.filterLoop" switch/>
</div>
</div>
</div> </div>
<div class="md-option-header"> <div class="md-option-header">
<span>{{$root.getLz('settings.header.experimental')}}</span> <span>{{$root.getLz('settings.header.experimental')}}</span>
@ -531,13 +539,13 @@
</div> </div>
<div class="md-option-line"> <div class="md-option-line">
<div class="md-option-segment"> <div class="md-option-segment">
Close Button Behavior {{$root.getLz("settings.option.experimental.closeButtonBehaviour")}}
</div> </div>
<div class="md-option-segment md-option-segment_auto"> <div class="md-option-segment md-option-segment_auto">
<select class="md-select" v-model="app.cfg.general.close_behavior"> <select class="md-select" v-model="app.cfg.general.close_behavior">
<option value='0'>Quit Cider</option> <option value='0'>{{$root.getLz("settings.option.experimental.closeButtonBehaviour.quit")}}</option>
<option value='1'>Minimize to taskbar</option> <option value='1'>{{$root.getLz("settings.option.experimental.closeButtonBehaviour.minimizeTaskbar")}}</option>
<option value='2'>Minimize to system tray</option> <option value='2'>{{$root.getLz("settings.option.experimental.closeButtonBehaviour.minimizeTray")}}</option>
</select> </select>
</div> </div>
</div> </div>