Changeset 1102
- Timestamp:
- 2008-09-23 21:12:08 (2 months ago)
- Files:
-
- trunk/chrome/content/dta/manager/imex.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/chrome/content/dta/manager/imex.js
r1101 r1102 154 154 root.setAttribute('type', 'static'); 155 155 root.setAttribute('version', '3.0'); 156 root.setAttribute('generator', 'DownThemAll! ' + DTA. VERSION + ' <http://downthemall.net/>');156 root.setAttribute('generator', 'DownThemAll! ' + DTA.BASE_VERSION + ' <http://downthemall.net/>'); 157 157 root.setAttributeNS(NS_DTA, 'version', DTA.VERSION); 158 158 root.setAttribute('pubdate', new Date().toUTCString()); … … 160 160 root.appendChild(doc.createComment("metalink as exported by DownThemAll!\r\nmay contain DownThemAll! specific information in the DownThemAll! namespace: " + NS_DTA)); 161 161 162 let files = doc.createElement ('files');162 let files = doc.createElementNS(NS_METALINKER, 'files'); 163 163 for (let d in downloads) { 164 let f = doc.createElement ('file');164 let f = doc.createElementNS(NS_METALINKER, 'file'); 165 165 f.setAttribute('name', d.fileName); 166 166 f.setAttributeNS(NS_DTA, 'num', d.numIstance); … … 171 171 172 172 if (d.description) { 173 let n = doc.createElement ('description');173 let n = doc.createElementNS(NS_METALINKER, 'description'); 174 174 n.textContent = d.description; 175 175 f.appendChild(n); 176 176 } 177 let r = doc.createElement ('resources');177 let r = doc.createElementNS(NS_METALINKER, 'resources'); 178 178 for (let u in d.urlManager.all) { 179 let n = doc.createElement ('url');179 let n = doc.createElementNS(NS_METALINKER, 'url'); 180 180 let t = u.url.spec.match(/^(\w+):/); 181 181 n.setAttribute('type', t[1]); … … 187 187 } 188 188 if (d.hash) { 189 let v = doc.createElement ('verification');190 let h = doc.createElement ('hash');189 let v = doc.createElementNS(NS_METALINKER, 'verification'); 190 let h = doc.createElementNS(NS_METALINKER, 'hash'); 191 191 h.setAttribute('type', d.hash.type.toLowerCase()); 192 192 h.textContent = d.hash.sum.toLowerCase(); … … 197 197 198 198 if (d.totalSize > 0) { 199 let s = doc.createElement ('size');199 let s = doc.createElementNS(NS_METALINKER, 'size'); 200 200 s.textContent = d.totalSize; 201 201 f.appendChild(s);
