|
|
|
@ -336,17 +336,13 @@ public class Load_RSS_p {
|
|
|
|
|
|
|
|
|
|
final List<DigestURL> urlsToIndex = new ArrayList<DigestURL>();
|
|
|
|
|
loop: for (final Map.Entry<String, DigestURL> entry: hash2UrlMap.entrySet()) {
|
|
|
|
|
try {
|
|
|
|
|
final DigestURL messageUrl = entry.getValue();
|
|
|
|
|
HarvestProcess harvestProcess = sb.urlExists(ASCII.String(messageUrl.hash()));
|
|
|
|
|
HarvestProcess harvestProcess = sb.getHarvestProcess(ASCII.String(messageUrl.hash()));
|
|
|
|
|
if (harvestProcess != null) {
|
|
|
|
|
continue loop;
|
|
|
|
|
}
|
|
|
|
|
urlsToIndex.add(messageUrl);
|
|
|
|
|
RSSLoader.indexTriggered.insertIfAbsent(messageUrl.hash(), new Date());
|
|
|
|
|
} catch (final IOException e) {
|
|
|
|
|
ConcurrentLog.logException(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sb.addToIndex(urlsToIndex, null, null, collections, true);
|
|
|
|
@ -413,10 +409,8 @@ public class Load_RSS_p {
|
|
|
|
|
}
|
|
|
|
|
pubDate = item.getPubDate();
|
|
|
|
|
|
|
|
|
|
HarvestProcess harvestProcess;
|
|
|
|
|
try {
|
|
|
|
|
if(link != null && StringUtils.isNotEmpty(item.getGuid())) {
|
|
|
|
|
harvestProcess = sb.urlExists(ASCII.String(link.hash()));
|
|
|
|
|
HarvestProcess harvestProcess = sb.getHarvestProcess(ASCII.String(link.hash()));
|
|
|
|
|
|
|
|
|
|
prop.put("showitems_item_" + i + "_hasLink", true);
|
|
|
|
|
prop.putHTML("showitems_item_" + i + "_hasLink_link", link.toNormalform(true));
|
|
|
|
@ -437,13 +431,9 @@ public class Load_RSS_p {
|
|
|
|
|
prop.putHTML("showitems_item_" + i + "_language", item.getLanguage());
|
|
|
|
|
prop.putHTML("showitems_item_" + i + "_date", (pubDate == null) ? "" : DateFormat.getDateTimeInstance().format(pubDate));
|
|
|
|
|
i++;
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
ConcurrentLog.logException(e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
if(enclosure != null && enclosure != link && StringUtils.isNotEmpty(item.getGuid())) {
|
|
|
|
|
harvestProcess = sb.urlExists(ASCII.String(enclosure.hash()));
|
|
|
|
|
HarvestProcess harvestProcess = sb.getHarvestProcess(ASCII.String(enclosure.hash()));
|
|
|
|
|
|
|
|
|
|
prop.put("showitems_item_" + i + "_hasLink", true);
|
|
|
|
|
prop.putHTML("showitems_item_" + i + "_hasLink_link", enclosure.toNormalform(true));
|
|
|
|
@ -461,9 +451,6 @@ public class Load_RSS_p {
|
|
|
|
|
prop.putHTML("showitems_item_" + i + "_date", "");
|
|
|
|
|
i++;
|
|
|
|
|
}
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
ConcurrentLog.logException(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
prop.put("showitems_item", i);
|
|
|
|
|
prop.put("showitems_num", i);
|
|
|
|
|