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

Method onsiteSearch

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

Source from the content-addressed store, hash-verified

552 }
553
554 public async onsiteSearch(): Promise<false | SearchResult> {
555 if (this.page && this.syncPage && this.syncPage.curState && this.syncPage.curState.on) {
556 let result: false | string = false;
557 if (this.syncPage.curState.on === 'OVERVIEW') {
558 if (this.page.overview && this.page.overview.getMalUrl) {
559 result = await this.page.overview.getMalUrl(api.settings.get('syncMode'));
560 }
561 } else if (this.page.sync && this.page.sync.getMalUrl) {
562 result = await this.page.sync.getMalUrl(api.settings.get('syncMode'));
563 }
564 if (result) {
565 this.logger.m('Onsite').log('[SEARCH]', 'Overwrite by onsite url', result);
566 return {
567 url: result,
568 offset: 0,
569 provider: 'sync',
570 similarity: {
571 same: true,
572 value: 1,
573 },
574 };
575 }
576 }
577 return false;
578 }
579
580 public openCorrection() {
581 /* Implemented in vueSearchClass */

Callers 1

searchMethod · 0.95

Calls 2

getMethod · 0.65
getMalUrlMethod · 0.45

Tested by

no test coverage detected