mirror of
https://github.com/LukeHagar/plex-api-oauth.git
synced 2025-12-06 12:37:50 +00:00
Corrected hasMore functionality
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "plex-api-oauth",
|
||||
"version": "1.1.98",
|
||||
"version": "1.1.103",
|
||||
"description": "An NPM Module designed to make Plex Media Server and plex.tv API calls easier to implement in JavaScript and React projects",
|
||||
"main": "./src/index.js",
|
||||
"type": "module",
|
||||
|
||||
@@ -2,7 +2,6 @@ import { PlexOauth } from "plex-oauth";
|
||||
import { v4 } from "uuid";
|
||||
import axios from "axios";
|
||||
import qs from "qs";
|
||||
// import InfiniteScroll from "react-infinite-scroller";
|
||||
import { useState, useEffect } from "react";
|
||||
|
||||
export async function PlexLogin(plexClientInformation) {
|
||||
@@ -865,10 +864,13 @@ export async function GetLibraryPages(
|
||||
break;
|
||||
}
|
||||
console.debug(data);
|
||||
if (data !== null) {
|
||||
try {
|
||||
items = data;
|
||||
hasMore = data.length > 0;
|
||||
hasMore = data.length === chunkSize;
|
||||
console.debug({ items, hasMore });
|
||||
} catch {
|
||||
items = [];
|
||||
hasMore = false;
|
||||
}
|
||||
return { items, hasMore };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user