fix(search): remove limit parameter (#946)

This commit is contained in:
Rémi Marseault 2023-07-09 14:28:09 +02:00 committed by GitHub
parent b56caef1db
commit 7b77162871
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 13 deletions

View file

@ -1,20 +1,20 @@
import type {AxiosInstance} from 'axios'
import axios from 'axios'
import type { AxiosInstance } from 'axios'
import type {
ApplicationVersion,
AppPreferences,
Category,
Feed,
FeedRule as QbitFeedRule,
Log,
NetworkInterface,
SearchJob,
SearchPlugin,
SearchStatus,
Torrent,
TorrentFile,
TorrentProperties,
Tracker,
Torrent,
NetworkInterface,
Log
Tracker
} from '@/types/qbit/models'
import type { MainDataResponse, SearchResultsResponse, TorrentPeersResponse } from '@/types/qbit/responses'
import type { AddTorrentPayload, AppPreferencesPayload, CreateFeedPayload, LoginPayload } from '@/types/qbit/payloads'
@ -503,7 +503,7 @@ export class QBitApi {
}).then(res => res.data)
}
async getSearchResults(id: number, limit?: number, offset?: number): Promise<SearchResultsResponse> {
async getSearchResults(id: number, offset?: number, limit?: number): Promise<SearchResultsResponse> {
return this.execute('/search/results', {
id,
limit,

View file

@ -75,12 +75,12 @@
</template>
<script lang="ts">
import { defineComponent } from 'vue'
import { mapGetters } from 'vuex'
import { mdiClose, mdiDownload, mdiToyBrick } from '@mdi/js'
import {defineComponent} from 'vue'
import {mapGetters} from 'vuex'
import {mdiClose, mdiDownload, mdiToyBrick} from '@mdi/js'
import qbit from '@/services/qbit'
import { General } from '@/mixins'
import { SearchPlugin, SearchResult } from '@/types/qbit/models'
import {General} from '@/mixins'
import {SearchPlugin, SearchResult} from '@/types/qbit/models'
export default defineComponent({
name: 'SearchEngine',
@ -165,7 +165,7 @@ export default defineComponent({
clearInterval(this.queryTimer)
},
async refreshResults() {
const response = await qbit.getSearchResults(this.queryId, 100, this.queryResults.length)
const response = await qbit.getSearchResults(this.queryId, this.queryResults.length)
this.queryResults.push(...response.results)
if (response.status === 'Stopped') {
@ -176,7 +176,7 @@ export default defineComponent({
downloadTorrent(item: SearchResult) {
this.createModal('AddModal', { initialMagnet: item.fileUrl })
},
customFilter(value: any, search: string | null, item: any) {
customFilter(value: any, search: string | null) {
return value != null
&& search != null
&& typeof value === 'string'