From 306fb0a304c48831d988f8fb65e317daf47d2d50 Mon Sep 17 00:00:00 2001 From: John Volk Date: Fri, 1 May 2026 07:37:38 -0400 Subject: [PATCH] drime: fix listings of large directories next_page is not currently being returned on listings which is causing the rclone listing code to go wrong. This was returned so is likely a regression in Drime. This changes the page counter to calculate using current_page and last_page. last_page on the first page request is just current_page+1. drime appears to be capping per_page to 200. as more pages are requested, last_page increments by 1 until current_page = last_page --- backend/drime/api/types.go | 4 ++-- backend/drime/drime.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/drime/api/types.go b/backend/drime/api/types.go index f2d18af6f..9396034fa 100644 --- a/backend/drime/api/types.go +++ b/backend/drime/api/types.go @@ -77,9 +77,9 @@ type Listing struct { Data []Item `json:"data"` From int `json:"from"` LastPage int `json:"last_page"` - NextPage int `json:"next_page"` + NextPageURL string `json:"next_page_url"` PerPage int `json:"per_page"` - PrevPage int `json:"prev_page"` + PrevPageURL string `json:"prev_page_url"` To int `json:"to"` Total int `json:"total"` } diff --git a/backend/drime/drime.go b/backend/drime/drime.go index a8bbfb540..3960c0d5f 100644 --- a/backend/drime/drime.go +++ b/backend/drime/drime.go @@ -565,10 +565,10 @@ OUTER: break OUTER } } - if result.NextPage == 0 { + if result.CurrentPage == result.LastPage { break } - page = result.NextPage + page = result.CurrentPage + 1 } return found, err }