im over this

This commit is contained in:
Core 2022-07-30 21:17:11 +01:00
parent 5d45295e6e
commit 96be648c8e
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6
4 changed files with 14 additions and 7 deletions

View file

@ -1183,11 +1183,6 @@ export class BrowserWindow {
app.quit();
})
app.on('before-quit', () => {
})
ipcMain.on('play', (_event, type, id) => {
BrowserWindow.win.webContents.executeJavaScript(`
MusicKit.getInstance().setQueue({ ${type}: '${id}', parameters : {l : app.mklang}}).then(function(queue) {

View file

@ -134,6 +134,7 @@ export class Store {
"scrobble_after": 50,
"filter_loop": false,
"filter_types": {},
"remove_featured": false,
"secrets": {
"username": "",
"key": ""

View file

@ -22,7 +22,7 @@ const MusicKitInterop = {
ipcRenderer.send('wsapi-updatePlaybackState', attributes);
// lastfm call
if (app.mk.currentPlaybackProgress === (app.cfg.connectivity.lastfm.scrobble_after / 100)) {
attributes.primaryArtist = app.cfg.connectivity.lastfm.enabled ? await this.fetchPrimaryArtist(attributes.artistName) : attributes.artistName;
attributes.primaryArtist = (app.cfg.connectivity.lastfm.enabled && app.cfg.connectivity.lastfm.remove_featured) ? await this.fetchPrimaryArtist(attributes.artistName) : attributes.artistName;
ipcRenderer.send('lastfm:scrobbleTrack', attributes);
}
});
@ -36,7 +36,7 @@ const MusicKitInterop = {
MusicKit.getInstance().addEventListener(MusicKit.Events.nowPlayingItemDidChange, async () => {
console.debug('[cider:preload] nowPlayingItemDidChange')
const attributes = MusicKitInterop.getAttributes()
attributes.primaryArtist = app.cfg.connectivity.lastfm.enabled ? await this.fetchPrimaryArtist(attributes.artistName) : attributes.artistName;
attributes.primaryArtist = (app.cfg.connectivity.lastfm.enabled && app.cfg.connectivity.lastfm.remove_featured) ? await this.fetchPrimaryArtist(attributes.artistName) : attributes.artistName;
if (MusicKitInterop.filterTrack(attributes, false, true)) {
global.ipcRenderer.send('nowPlayingItemDidChange', attributes);

View file

@ -1062,6 +1062,17 @@
</label>
</div>
</div>
<div class="md-option-line" v-show="app.cfg.connectivity.lastfm.enabled">
<div class="md-option-segment">
{{$root.getLz('settings.option.connectivity.lastfmScrobble.removeFeatured')}}
</div>
<div class="md-option-segment md-option-segment_auto">
<label>
<input type="checkbox" v-model="app.cfg.connectivity.lastfm.remove_featured"
switch/>
</label>
</div>
</div>
<div class="md-option-line" v-show="app.cfg.connectivity.lastfm.enabled">
<div class="md-option-segment">
{{$root.getLz('settings.option.connectivity.lastfmScrobble.filterTypes')}}