According to the MSN documentation, nsiDownloadManager was deprecated a while ago. Indeed when I try to se it, I'm getting some rather strange errors.
However the replacement 'Downloads.jsm' seems to also have problems. For instance, if I attempt to download a large file with Downloads.fetch(), I'll either get an error ("[Exception... "Component is not available" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: resource://gre/modules/DownloadCore.jsm :: this.DownloadError :: line 1498" data: no]") or the returned promise will never succeed (despite the download manager screen saying the download has completed), and leaving me with a lot of truncated (usually zero length) files. If the file is small enough, it appears to succeed normally (eventually)
Which download interface should we use
Moderators: FranklinDM, Lootyhoof
-
- Lunatic
- Posts: 395
- Joined: 2014-05-10, 18:19
- Location: UK
Re: Which download interface should we use
I think the only way to find the answer is to dig into the browser's sources and look how this is currently done there.
-
- Lunatic
- Posts: 395
- Joined: 2014-05-10, 18:19
- Location: UK
Re: Which download interface should we use
urg. Well judging by there being something in the tests called this:
and when I run similar, I get 'true', I'd guess nsiDownloadManager is dead (and in that case probably a lot of stuff can be removed)
In which case the new one doesn't behave awfully well on very large files.
Code: Select all
function oldDownloadManagerDisabled()
{
try {
// This method throws an exception if the old Download Manager is disabled.
Services.downloads.activeDownloadCount;
} catch (ex) {
return true;
}
return false;
}
In which case the new one doesn't behave awfully well on very large files.
-
- Lunatic
- Posts: 395
- Joined: 2014-05-10, 18:19
- Location: UK
Re: Which download interface should we use
But this file always fails:
http://www.podtrac.com/pts/redirect.mp3 ... it0618.mp3
though I can drop that link into the browser and get the expected mp3 playing
http://www.podtrac.com/pts/redirect.mp3 ... it0618.mp3
though I can drop that link into the browser and get the expected mp3 playing
Re: Which download interface should we use
nsIDownloadManager has been disabled because there were issues hooking the front-end up to the platform code. JS downloads is the only download interface available at the moment.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
-
- Lunatic
- Posts: 395
- Joined: 2014-05-10, 18:19
- Location: UK
Re: Which download interface should we use
Thanks - converting to the new one then