31 this._originalURI =
null;
38 return this._originalURI;
44 this._originalURI =
value;
48 function(aFile, aMediaList, aReplace)
50 var
istream =
Cc[
"@mozilla.org/network/file-input-stream;1"]
51 .createInstance(
Ci.nsIFileInputStream);
54 var parser =
Cc[
"@mozilla.org/feed-processor;1"]
55 .createInstance(
Ci.nsIFeedProcessor);
57 var typeSniffer =
Cc[
"@songbirdnest.com/Songbird/Mediacore/TypeSniffer;1"]
58 .createInstance(
Ci.sbIMediacoreTypeSniffer);
61 handleResult:
function(result) {
63 var feed = result.doc.QueryInterface(
Ci.nsIFeed);
64 for (var
i = 0;
i < feed.items.length; ++
i) {
65 var
entry = feed.items.queryElementAt(
i,
Ci.nsIFeedEntry);
67 if (typeSniffer.isValidMediaURL(uri)) {
68 var item = { uri: entry.link, properties: {} };
70 item.properties[SBProperties.contentType] =
"podcast";
74 this.addEnclosure(entry);
79 addEnclosure:
function(aEntry)
81 var enclosureList = aEntry.fields.getPropertyAsInterface(
"enclosure",
Ci.nsIArray);
84 var enclosure = enclosureList.queryElementAt(0,
Ci.nsIPropertyBag2);
86 var
url = enclosure.getPropertyAsAString(
"url");
94 var type = enclosure.getPropertyAsAString(
"type");
96 if (!typeSniffer.isValidMediaURL(resolvedURI))
101 item.properties[SBProperties.contentType] =
"podcast";
108 parser.parseFromStream(istream, this._originalURI);
111 parser.listener =
null;
125 return "Songbird Atom/RSS Reader";
131 return "Loads Atom/RSS playlists from remote and local locations.";
137 var mimeTypes = [
"application/rss+xml",
"application/atom+xml"];
138 aMIMECount.value = mimeTypes.length;
145 var exts = [
"atom",
"rss"];
146 aExtCount.value = exts.length;
153 if (!iid.equals(
Ci.sbIPlaylistReader) &&
154 !iid.equals(
Ci.nsISupports))
155 throw Cr.NS_ERROR_NO_INTERFACE;
function sbFeedPlaylistHandler()
function SB_AddItems(aItems, aMediaList, aAddDistinctOnly)
function SB_ResolveURI(aStringURL, aBaseURI)
_getSelectedPageStyle s i