Skip to content

Commit

Permalink
Make page index start at 1
Browse files Browse the repository at this point in the history
  • Loading branch information
ksw2000 committed Jan 28, 2024
1 parent c41242f commit 652d255
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ export class Queue {
private showListByPage(lang: string, page: number, isShowSearchList: boolean = false): string {
let content = '```yaml\n';
const pages = isShowSearchList ? Math.ceil(this._searchResult.length / entriesOfOnePage) : this.pages;
content += `page:\t${page}/${Math.max(pages, 1) - 1}\n`;
// when showing the current page, increasing one for the number of current page.
content += `page:\t${page + 1}/${Math.max(pages, 1)}\n`;
if (this.isEmpty() || (isShowSearchList && this._searchResult.length === 0)) {
content += (messages.playlist_is_empty as langMap)[lang];
}
Expand Down

0 comments on commit 652d255

Please sign in to comment.