mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-16 12:42:06 +00:00
fix(scrobbler): remove snake_case
This commit is contained in:
@ -16,24 +16,42 @@ const migrations = {
|
||||
secret?: string;
|
||||
};
|
||||
if (lastfmConfig) {
|
||||
const scrobblerConfig = store.get(
|
||||
let scrobblerConfig = store.get(
|
||||
'plugins.scrobbler',
|
||||
) as {
|
||||
enabled?: boolean;
|
||||
scrobblers: {
|
||||
lastfm: {
|
||||
scrobblers?: {
|
||||
lastfm?: {
|
||||
enabled?: boolean;
|
||||
token?: string;
|
||||
session_key?: string;
|
||||
api_root?: string;
|
||||
api_key?: string;
|
||||
sessionKey?: string;
|
||||
apiRoot?: string;
|
||||
apiKey?: string;
|
||||
secret?: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
} | undefined;
|
||||
|
||||
scrobblerConfig.enabled = lastfmConfig.enabled;
|
||||
scrobblerConfig.scrobblers.lastfm = lastfmConfig;
|
||||
if (!scrobblerConfig) {
|
||||
scrobblerConfig = {
|
||||
enabled: lastfmConfig.enabled,
|
||||
};
|
||||
}
|
||||
|
||||
if (!scrobblerConfig.scrobblers) {
|
||||
scrobblerConfig.scrobblers = {
|
||||
lastfm: {},
|
||||
};
|
||||
}
|
||||
|
||||
scrobblerConfig.scrobblers.lastfm = {
|
||||
enabled: lastfmConfig.enabled,
|
||||
token: lastfmConfig.token,
|
||||
sessionKey: lastfmConfig.session_key,
|
||||
apiRoot: lastfmConfig.api_root,
|
||||
apiKey: lastfmConfig.api_key,
|
||||
secret: lastfmConfig.secret,
|
||||
};
|
||||
store.set('plugins.scrobbler', scrobblerConfig);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user