mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
fix opml export not showing head and title
This commit is contained in:
@@ -27,7 +27,7 @@ public class OPMLExporter {
|
||||
@SuppressWarnings("unchecked")
|
||||
public Opml export(User user) {
|
||||
Opml opml = new Opml();
|
||||
opml.setFeedType("opml_1.0");
|
||||
opml.setFeedType("opml_1.1");
|
||||
opml.setTitle(String.format("%s subscriptions in CommaFeed",
|
||||
user.getName()));
|
||||
opml.setCreated(Calendar.getInstance().getTime());
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.commafeed.backend.rome;
|
||||
|
||||
import org.jdom.Element;
|
||||
|
||||
import com.sun.syndication.feed.opml.Opml;
|
||||
|
||||
public class OPML11Generator extends
|
||||
com.sun.syndication.io.impl.OPML10Generator {
|
||||
|
||||
public OPML11Generator() {
|
||||
super("opml_1.1");
|
||||
}
|
||||
|
||||
protected Element generateHead(Opml opml) {
|
||||
Element head = new Element("head");
|
||||
addNotNullSimpleElement(head, "title", opml.getTitle());
|
||||
return head;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user