mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-22 14:23:35 -07:00
Return empty list instead of error.
This commit is contained in:
parent
4a669237dd
commit
876849cdc1
1 changed files with 4 additions and 2 deletions
|
@ -386,8 +386,10 @@ void TorrentsController::infoAction()
|
|||
// normalize offset
|
||||
if (offset < 0)
|
||||
offset = size + offset;
|
||||
if ((offset >= size) || (offset < 0))
|
||||
throw APIError(APIErrorType::Conflict, tr("Offset is out of range"));
|
||||
if ((offset >= size) || (offset < 0)) {
|
||||
setResult(QJsonArray {});
|
||||
return;
|
||||
}
|
||||
// normalize limit
|
||||
if (limit <= 0)
|
||||
limit = -1; // unlimited
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue