mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 09:49:19 +02:00
Merge branch 'master' into 2.6-master
This commit is contained in:
commit
d82bccfa35
2 changed files with 8 additions and 4 deletions
|
@ -71,9 +71,13 @@ class OPDSFeedHandler extends AbstractOPDSFeedHandler implements OPDSConstants {
|
|||
myIndex = feed.OpensearchStartIndex - 1;
|
||||
if (feed.OpensearchItemsPerPage > 0) {
|
||||
myItemsToLoad = feed.OpensearchItemsPerPage;
|
||||
final int len = feed.OpensearchTotalResults - myIndex;
|
||||
if (len > 0 && len < myItemsToLoad) {
|
||||
myItemsToLoad = len;
|
||||
if (feed.OpensearchTotalResults >= 0) {
|
||||
myItemsToLoad =
|
||||
Math.min(Math.max(0, feed.OpensearchTotalResults - myIndex), myItemsToLoad);
|
||||
}
|
||||
if (myItemsToLoad == 0) {
|
||||
myData.ResumeURI = null;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if ("series".equals(feed.ViewType)) {
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.geometerplus.zlibrary.core.xml.ZLStringMap;
|
|||
import org.geometerplus.fbreader.network.atom.*;
|
||||
|
||||
class OPDSFeedMetadata extends ATOMFeedMetadata {
|
||||
public int OpensearchTotalResults;
|
||||
public int OpensearchTotalResults = -1;
|
||||
public int OpensearchItemsPerPage;
|
||||
public int OpensearchStartIndex = 1;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue