@@ -156,7 +156,7 @@ export default class MediaDbPlugin extends Plugin {
156156 */
157157 async createLinkWithSearchModal ( ) : Promise < void > {
158158 const apiSearchResults : MediaTypeModel [ ] = await this . modalHelper . openAdvancedSearchModal ( { } , async advancedSearchModalData => {
159- return await this . apiManager . query ( advancedSearchModalData . query , advancedSearchModalData . apis ) ;
159+ return await this . apiManager . query ( advancedSearchModalData . query , advancedSearchModalData . apis , "default" ) ;
160160 } ) ;
161161
162162 if ( ! apiSearchResults ) {
@@ -186,7 +186,7 @@ export default class MediaDbPlugin extends Plugin {
186186 let apiSearchResults : MediaTypeModel [ ] = await this . modalHelper . openSearchModal ( searchModalOptions ?? { } , async searchModalData => {
187187 types = searchModalData . types ;
188188 const apis = this . apiManager . apis . filter ( x => x . hasTypeOverlap ( searchModalData . types ) ) . map ( x => x . apiName ) ;
189- return await this . apiManager . query ( searchModalData . query , apis ) ;
189+ return await this . apiManager . query ( searchModalData . query , apis , searchModalData . types . toString ( ) ) ;
190190 } ) ;
191191
192192 if ( ! apiSearchResults ) {
@@ -218,7 +218,7 @@ export default class MediaDbPlugin extends Plugin {
218218
219219 async createEntryWithAdvancedSearchModal ( ) : Promise < void > {
220220 const apiSearchResults : MediaTypeModel [ ] = await this . modalHelper . openAdvancedSearchModal ( { } , async advancedSearchModalData => {
221- return await this . apiManager . query ( advancedSearchModalData . query , advancedSearchModalData . apis ) ;
221+ return await this . apiManager . query ( advancedSearchModalData . query , advancedSearchModalData . apis , "default" ) ;
222222 } ) ;
223223
224224 if ( ! apiSearchResults ) {
@@ -570,7 +570,7 @@ export default class MediaDbPlugin extends Plugin {
570570
571571 let results : MediaTypeModel [ ] = [ ] ;
572572 try {
573- results = await this . apiManager . query ( title , [ selectedAPI ] ) ;
573+ results = await this . apiManager . query ( title , [ selectedAPI ] , "default" ) ;
574574 } catch ( e ) {
575575 erroredFiles . push ( { filePath : file . path , error : e . toString ( ) } ) ;
576576 continue ;
0 commit comments