48 if (typeof(
Cc) ==
"undefined")
49 var
Cc = Components.classes;
50 if (typeof(
Ci) ==
"undefined")
51 var
Ci = Components.interfaces;
52 if (typeof(
Cr) ==
"undefined")
53 var
Cr = Components.results;
54 if (typeof(
Cu) ==
"undefined")
55 var
Cu = Components.utils;
58 Cu.import(
"resource://app/jsmodules/ArrayConverter.jsm");
59 Cu.import(
"resource://app/jsmodules/SBJobUtils.jsm");
60 Cu.import(
"resource://app/jsmodules/sbProperties.jsm");
92 writeMetadata:
function sbMetadataUtils_writeMetadata
97 aSuppressProgressDialog) {
99 var library = aMediaItemList[0].library;
103 if ((library.getProperty(SBProperties.dontWriteMetadata) ==
"1") ||
105 (aMediaList.getProperty(SBProperties.dontWriteMetadata) ==
"1"))) {
110 var mediaItemArray = Cc[
"@songbirdnest.com/moz/xpcom/threadsafe-array;1"]
111 .createInstance(Ci.nsIMutableArray);
112 for (var
i = 0;
i < aMediaItemList.length;
i++) {
113 mediaItemArray.appendElement(aMediaItemList[
i],
false);
117 var propertyArray = ArrayConverter.stringEnumerator(aPropertyList);
121 var metadataService = Cc[
"@songbirdnest.com/Songbird/FileMetadataService;1"]
122 .getService(Ci.sbIFileMetadataService);
123 var job = metadataService.write(mediaItemArray, propertyArray);
126 if (!aSuppressProgressDialog) {
127 SBJobUtils.showProgressDialog(job, aParentWindow);
_getSelectedPageStyle s i