mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-06 12:00:17 +02:00
related catalog links
This commit is contained in:
parent
05133e0063
commit
a7bd1ddb95
5 changed files with 7 additions and 6 deletions
|
@ -1,6 +1,7 @@
|
||||||
===== 1.3.8 (Feb ??, 2012) =====
|
===== 1.3.8 (Feb ??, 2012) =====
|
||||||
* striked through/underlined text support
|
* striked through/underlined text support
|
||||||
* asynchronous bonjour scanning: user can select any found network even if scanning is still in progress
|
* asynchronous bonjour scanning: user can select any found network even if scanning is still in progress
|
||||||
|
* better support for "related" catalogs in book descriptions
|
||||||
|
|
||||||
===== 1.3.7 (Feb 9, 2012) =====
|
===== 1.3.7 (Feb 9, 2012) =====
|
||||||
* Font smoothing settings (Settings -> Text -> Font properties)
|
* Font smoothing settings (Settings -> Text -> Font properties)
|
||||||
|
|
|
@ -125,7 +125,7 @@ public class OPDSBookItem extends NetworkBookItem implements OPDSConstants {
|
||||||
if (MimeType.IMAGE_PNG.equals(type) || MimeType.IMAGE_JPEG.equals(type)) {
|
if (MimeType.IMAGE_PNG.equals(type) || MimeType.IMAGE_JPEG.equals(type)) {
|
||||||
urls.addInfo(new UrlInfo(UrlInfo.Type.Image, href));
|
urls.addInfo(new UrlInfo(UrlInfo.Type.Image, href));
|
||||||
}
|
}
|
||||||
} else if (MimeType.APP_ATOM.Name.equals(type.Name) &&
|
} else if (MimeType.APP_ATOM.weakEquals(type) &&
|
||||||
"entry".equals(type.getParameter("type"))) {
|
"entry".equals(type.getParameter("type"))) {
|
||||||
urls.addInfo(new UrlInfo(UrlInfo.Type.SingleEntry, href));
|
urls.addInfo(new UrlInfo(UrlInfo.Type.SingleEntry, href));
|
||||||
} else if (UrlInfo.Type.BookBuy == referenceType) {
|
} else if (UrlInfo.Type.BookBuy == referenceType) {
|
||||||
|
@ -273,7 +273,7 @@ public class OPDSBookItem extends NetworkBookItem implements OPDSConstants {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public OPDSCatalogItem createRelatedCatalogItem(RelatedUrlInfo info) {
|
public OPDSCatalogItem createRelatedCatalogItem(RelatedUrlInfo info) {
|
||||||
if (MimeType.APP_ATOM.equals(info.Mime)) {
|
if (MimeType.APP_ATOM.weakEquals(info.Mime)) {
|
||||||
return new OPDSCatalogItem((OPDSNetworkLink)Link, info);
|
return new OPDSCatalogItem((OPDSNetworkLink)Link, info);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -55,7 +55,7 @@ class OPDSCatalogInfoHandler extends AbstractOPDSFeedHandler {
|
||||||
if ("search".equals(rel)) {
|
if ("search".equals(rel)) {
|
||||||
if (MimeType.APP_OPENSEARCHDESCRIPTION.equals(type)) {
|
if (MimeType.APP_OPENSEARCHDESCRIPTION.equals(type)) {
|
||||||
myOpensearchDescriptionURLs.add(ZLNetworkUtil.url(myBaseURL, link.getHref()));
|
myOpensearchDescriptionURLs.add(ZLNetworkUtil.url(myBaseURL, link.getHref()));
|
||||||
} else if (MimeType.APP_ATOM.equals(type)) {
|
} else if (MimeType.APP_ATOM.weakEquals(type)) {
|
||||||
final String template = ZLNetworkUtil.url(myBaseURL, link.getHref());
|
final String template = ZLNetworkUtil.url(myBaseURL, link.getHref());
|
||||||
final OpenSearchDescription descr = OpenSearchDescription.createDefault(template);
|
final OpenSearchDescription descr = OpenSearchDescription.createDefault(template);
|
||||||
if (descr.isValid()) {
|
if (descr.isValid()) {
|
||||||
|
|
|
@ -95,11 +95,11 @@ class OPDSLinkXMLReader extends OPDSXMLReader implements OPDSConstants {
|
||||||
infos.addInfo(new UrlInfoWithDate(UrlInfo.Type.Image, href));
|
infos.addInfo(new UrlInfoWithDate(UrlInfo.Type.Image, href));
|
||||||
}
|
}
|
||||||
} else if (rel == null) {
|
} else if (rel == null) {
|
||||||
if (MimeType.APP_ATOM.equals(type)) {
|
if (MimeType.APP_ATOM.weakEquals(type)) {
|
||||||
infos.addInfo(new UrlInfoWithDate(UrlInfo.Type.Catalog, href));
|
infos.addInfo(new UrlInfoWithDate(UrlInfo.Type.Catalog, href));
|
||||||
}
|
}
|
||||||
} else if (rel == "search") {
|
} else if (rel == "search") {
|
||||||
if (MimeType.APP_ATOM.equals(type)) {
|
if (MimeType.APP_ATOM.weakEquals(type)) {
|
||||||
final OpenSearchDescription descr = OpenSearchDescription.createDefault(href);
|
final OpenSearchDescription descr = OpenSearchDescription.createDefault(href);
|
||||||
if (descr.isValid()) {
|
if (descr.isValid()) {
|
||||||
// TODO: May be do not use '%s'??? Use Description instead??? (this needs to rewrite SEARCH engine logic a little)
|
// TODO: May be do not use '%s'??? Use Description instead??? (this needs to rewrite SEARCH engine logic a little)
|
||||||
|
|
|
@ -105,7 +105,7 @@ class OpenSearchXMLReader extends ZLXMLReaderAdapter {
|
||||||
if (tagPrefix == myOpenSearchNamespaceId && tag == TAG_URL) {
|
if (tagPrefix == myOpenSearchNamespaceId && tag == TAG_URL) {
|
||||||
final MimeType type = MimeType.get(attributes.getValue("type"));
|
final MimeType type = MimeType.get(attributes.getValue("type"));
|
||||||
final String rel = attributes.getValue("rel");
|
final String rel = attributes.getValue("rel");
|
||||||
if (MimeType.APP_ATOM.equals(type)
|
if (MimeType.APP_ATOM.weakEquals(type)
|
||||||
&& (rel == null || rel == "results")) {
|
&& (rel == null || rel == "results")) {
|
||||||
final String template = ZLNetworkUtil.url(myBaseURL, attributes.getValue("template"));
|
final String template = ZLNetworkUtil.url(myBaseURL, attributes.getValue("template"));
|
||||||
final int indexOffset = parseInt(attributes.getValue("indexOffset"));
|
final int indexOffset = parseInt(attributes.getValue("indexOffset"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue