Skip to content

Commit

Permalink
fix: limit the tag loader per page to maxLimit
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed Dec 14, 2022
1 parent 7e058b5 commit ec96aab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/src/tools/tag-list-loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void TagListLoader::loadTags()

void TagListLoader::loadNextPage()
{
m_currentTagApi = new TagApi(m_profile, m_site, m_api, m_currentPage, 500, "count", this);
m_currentTagApi = new TagApi(m_profile, m_site, m_api, m_currentPage, qMin(500, m_api->maxLimit()), "count", this);
connect(m_currentTagApi, &TagApi::finishedLoading, this, &TagListLoader::tagsLoaded);
m_currentTagApi->load();
}
Expand Down
1 change: 1 addition & 0 deletions src/sites/Szurubooru/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export const source: ISource = {
json: {
name: "JSON",
auth: ["basic", "token"],
maxLimit: 100,
search: {
url: (query: ISearchQuery, opts: IUrlOptions): IRequest => {
const offset = (query.page - 1) * opts.limit;
Expand Down

0 comments on commit ec96aab

Please sign in to comment.