Skip to content

Commit

Permalink
fix #187 pageSize issue
Browse files Browse the repository at this point in the history
  • Loading branch information
hermanho committed Mar 16, 2024
1 parent 8ec1a53 commit 7aae4a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GPhotos.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class GPhotos {
* @param {string} pageToken
* @returns {Promise<MediaItem[]>} MediaItem
*/
const getImage = async (pageSize = 100, pageToken = "") => {
const getImage = async (pageSize = 50, pageToken = "") => {
// this.log("Indexing photos now. total: ", list.length);
try {
let data = {
Expand All @@ -263,7 +263,7 @@ class GPhotos {
} else {
if (response.data.nextPageToken) {
await sleep(500);
return getImage(50, response.data.nextPageToken);
return getImage(pageSize, response.data.nextPageToken);
} else {
return list; // all found but lesser than maxNum
}
Expand Down

0 comments on commit 7aae4a9

Please sign in to comment.