diff --git a/src/models/playlist.rs b/src/models/playlist.rs index 4ec9de1..a90669c 100644 --- a/src/models/playlist.rs +++ b/src/models/playlist.rs @@ -20,7 +20,7 @@ impl Playlist { } pub fn page_with_indices(&self, index: usize) -> Option> { - if index - 1 > self.total_pages() { + if index > self.total_pages() { return None; } let start = (index - 1) * PAGE_SIZE;