33 this._originalURI =
null;
40 return this._originalURI;
46 this._originalURI =
value;
50 function(aFile, aMediaList, aReplace, aPlaylistFormatType)
52 var nextFileMetadata = {};
57 var re =
new RegExp(
"^" +
TOKEN_EXTINF +
"([^,]*),?(.*)?$");
67 var a = aLine.match(re);
70 if (!isNaN(duration) && duration >= 0)
71 nextFileMetadata.duration =
duration;
73 nextFileMetadata.title = a[2];
81 if (aPlaylistFormatType && aPlaylistFormatType.pathSeparator) {
83 aLine = aLine.replace(aPlaylistFormatType.pathSeparator,
"/",
"g");
90 var item = {
uri: newUri, properties: {}};
91 if (nextFileMetadata.title)
92 item.properties[SBProperties.trackName] = nextFileMetadata.title;
93 if (nextFileMetadata.duration)
94 item.properties[SBProperties.duration] = nextFileMetadata.duration * 1000000;
97 nextFileMetadata = {};
115 return "Songbird M3U Reader";
121 return "Loads M3U playlists from remote and local locations.";
127 var mimeTypes = [
"audio/mpegurl",
"audio/x-mpegurl"];
128 aMIMECount.value = mimeTypes.length;
135 var exts = [
"m3u",
"m3u8"];
136 aExtCount.value = exts.length;
143 if (!iid.equals(
Ci.sbIPlaylistReader) &&
144 !iid.equals(
Ci.nsISupports))
145 throw Cr.NS_ERROR_NO_INTERFACE;
function SB_DetectCharsetAndProcessFile(aFile, aCallback, aThis)
Detect the charset of the file aFile, convert the file encode to the detected one, and process the file line by line with the callback function aCallback.
function sbM3UPlaylistHandler()
function SB_AddItems(aItems, aMediaList, aAddDistinctOnly)
function SB_ResolveURI(aStringURL, aBaseURI)