32 this._originalURI =
null;
39 return this._originalURI;
45 this._originalURI =
value;
49 function(aFile, aMediaList, aReplace)
51 var playlistItems = {};
55 var re =
new RegExp(
"^(File|Title|Length)(\\d+)=(.+)$");
60 var a = aLine.match(re);
63 var
num = parseInt(a[2], 10);
65 if (!isNaN(num) && value !=
"") {
67 var item = playlistItems[
num];
70 playlistItems[
num] = item;
84 var length = parseInt(value, 10);
85 if (!isNaN(length) && length >= 0)
98 for (var
i in playlistItems) {
99 itemList.push({ index:
i,
data: playlistItems[
i]});
103 itemList.sort(
function(a, b) { a.index - b.index });
106 itemList.forEach(
function(e) {
109 var item = { uri: data.uri, properties: {} };
112 item.properties[SBProperties.trackName] =
data.title;
114 item.properties[SBProperties.duration] =
data.length * 1000000;
130 return "Songbird PLS Reader";
136 return "Loads PLS playlists from remote and local locations.";
140 function(aMIMECount, aMIMETypes)
142 var mimeTypes = [
"audio/x-scpls"];
143 aMIMECount.value = mimeTypes.length;
148 function(aExtCount, aExts)
151 aExtCount.value = exts.length;
158 if (!iid.equals(
Ci.sbIPlaylistReader) &&
159 !iid.equals(
Ci.nsISupports))
160 throw Cr.NS_ERROR_NO_INTERFACE;
function sbPLSPlaylistHandler()
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 SB_AddItems(aItems, aMediaList, aAddDistinctOnly)
function SB_ResolveURI(aStringURL, aBaseURI)
_getSelectedPageStyle s i