ugetdm / uget-integrator

Native messaging host to integrate uGet Download Manager with web browsers
GNU General Public License v3.0
339 stars 38 forks source link

Download file duplicated #51

Open garywill opened 5 years ago

garywill commented 5 years ago

(Everytime I download, firefox asks me to save or open, I choose save. Firefox save dialog appears, I click save. Firefox download icon blinks. 2 sec later uget dialog appears, I choose location again and click save.) The problem is: when I download source code from github, I always get 2 downloaded files

xxx.zip
xxx.1.zip

or

xxx.tar.gz
xxx.tar.1

It seems file is downloaded twice. If my download is big file, one is not completed.

I didn't install uget-integrator on system. I put com.ugetdm.firefox.json into firefox profile folder. Put the python file uget-integrator on disk. ( I changed the path, not /usr/bin) Firefox 60, uget integrator extension 2.1.3 , on Linux 64bit

yaxunema95 commented 4 years ago

I'm having the same issue with Firefox 76.0.1 and uGet 2.2.3 on Arch Linux with uget-integrator and uget-integrator-firefox installed from the AUR.

What happens is Firefox finishes downloading the file before uGet Integrator interrupts it.

I used this page to test downloads of files of different sizes. The larger files will be successfully interrupted, but the smaller ones will be downloaded by both Firefox and uGet. What makes it worse is it looks like Firefox starts the download before you can even choose between "Open with..." or "Save File", so even larger files may be done downloading in Firefox before uGet starts them.

The issue with uGet Integrator is it isn't aggressive enough at interrupting downloads. Some of the other download manager integration extensions for Firefox seem to do it better.

On that note, if you install Persepolis Download Manager Integration but don't have Persepolis, it will interrupt downloads without fail, but since Persepolis isn't there, the download gets "passed" to uGet Integrator. So basically, uGet Integrator is piggybacking on Persepolis Download Manager Integration's interruption methods. The same thing happens with Aria2 Download Manager Integration.

Of course the above isn't a proper solution, but it shows that there should be a better way to interrupt downloads in uGet Integrator. Perhaps the code for Persepolis Download Manager Integration or Aria2 Download Manager Integration should be looked at.

ghost commented 3 years ago

@yaxunema95 I'm having the same issue. A second file with a .0 name is downloaded by Firefox. The only solution I see is when Firefox asks you to download with the download box make it always save the file with checking the box. Next Time it will not ask you and transfer it to uget.