Skip to content

Conversation

@Unknown15082
Copy link

Querying all scores in a room's playlist can return "cursor_string": null, which causes playlist_scores to panic since it expected a string. To fix this, I changed cursor to be optional.

Please tell me if this issue is not reproducible, or if there's anything I missed.

@MaxOhn
Copy link
Owner

MaxOhn commented Sep 9, 2025

Thanks for the PR!

I think specifying the cursor in the get_next method needs an adjustment since using the default string (i.e. an empty one) as cursor doesn't necessarily work with the api. Something like this should be better I think

let mut req = osu.playlist_scores(..).limit(..).sort(..);
            
if let Some(cursor) = self.cursor.as_deref() {
    req = req.cursor(cursor);
}

Some(req.await)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants