MCPcopy Index your code
hub / github.com/MALSync/MALSync / initRules

Method initRules

src/_provider/Search/searchClass.ts:597–608  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

595 rules: RulesClass | undefined;
596
597 async initRules() {
598 const logger = con.m('Rules');
599 const url = this.getUrl();
600 logger.log('Url', url);
601 if (url) {
602 const cacheKeyObj = await getRulesCacheKey(url);
603 logger.log('Cachekey', cacheKeyObj);
604 this.rules = await new RulesClass(cacheKeyObj.rulesCacheKey, this.getNormalizedType()).init();
605 return cacheKeyObj.singleObj;
606 }
607 return undefined;
608 }
609
610 applyRules(episode: number) {
611 if (this.rules) {

Callers 1

handlePageMethod · 0.80

Calls 4

getUrlMethod · 0.95
getNormalizedTypeMethod · 0.95
getRulesCacheKeyFunction · 0.90
initMethod · 0.45

Tested by

no test coverage detected