fix: apply fix from eslint

This commit is contained in:
JellyBrick
2024-02-18 11:58:26 +09:00
parent 9f5651a8ba
commit 4657aeca45
12 changed files with 67 additions and 51 deletions

View File

@ -76,7 +76,7 @@ export const defaultConfig: ScrobblerPluginConfig = {
enabled: false,
token: undefined,
session_key: undefined,
api_root: 'http://ws.audioscrobbler.com/2.0/',
api_root: 'https://ws.audioscrobbler.com/2.0/',
api_key: '04d76faaac8726e60988e14c105d421a',
secret: 'a5d2a36fdf64819290f6982481eaffa2',
},

View File

@ -1,4 +1,4 @@
import registerCallback, { type SongInfo } from '@/providers/song-info';
import registerCallback, { MediaType, type SongInfo } from '@/providers/song-info';
import { createBackend } from '@/utils';
import { ScrobblerPluginConfig } from './index';
@ -52,7 +52,7 @@ export const backend = createBackend<{
if (!songInfo.isPaused) {
const configNonnull = this.config!;
// Scrobblers normally have no trouble working with official music videos
if (!configNonnull.scrobble_other_media && (songInfo.mediaType !== 'AUDIO' && songInfo.mediaType !== 'ORIGINAL_MUSIC_VIDEO')) {
if (!configNonnull.scrobble_other_media && (songInfo.mediaType !== MediaType.Audio && songInfo.mediaType !== MediaType.OriginalMusicVideo)) {
return;
}