MCPcopy
hub / github.com/MALSync/MALSync / isEnabled

Function isEnabled

src/utils/syncHandler.ts:374–388  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

372
373export const background = {
374 async isEnabled() {
375 return api.storage.get('backgroundListSync').then(async function (state) {
376 con.info('background list sync state', state);
377 if (
378 state &&
379 state.mode === (await api.settings.getAsync('syncMode')) &&
380 state.syncModeSimkl === (await api.settings.getAsync('syncModeSimkl')) &&
381 state.splitTracking === (await api.settings.getAsync('splitTracking'))
382 ) {
383 return true;
384 }
385 background.disable();
386 return false;
387 });
388 },
389 async enable() {
390 return api.storage.set('backgroundListSync', {
391 mode: await api.settings.getAsync('syncMode'),

Callers

nothing calls this directly

Calls 2

getMethod · 0.65
infoMethod · 0.45

Tested by

no test coverage detected