Comments (7)
There's a setting in the Advanced options called "Allow only one instance of the program to run". Is that checked?
As long as it's reading from the same settings file and that setting is checked, then it should only use one instance.
from httpdownloader.
Yes, I checked that option.
If a single script calls HTTP_Downloader many times, HTTP_Downloader is called in sequence and not in parallel.
However, if multiple scripts call HTTP_Downloader many times, the instances can be parallel.
If this happens, multiple instances will open the configuration file in parallel, and some instances will fail to load it.
from httpdownloader.
Attach or paste the script to this post so I can see how it's running it.
from httpdownloader.
Here's a beta version you can try out. I reworked the code that handles single instances. Apparently a race condition can occur when using OpenMutex.
HTTP_Downloader_32_1.0.5.1_Beta_2.zip
HTTP_Downloader_64_1.0.5.1_Beta_2.zip
from httpdownloader.
My script needs to be called from a custom scheme, which requires editing the registry.
So I modified that script to be simple.
Please place this script in the same folder as HTTP_Downloader.exe.
You can reproduce this by hitting Enter repeatedly to launch the script.
I also tried the Beta version, but unfortunately the problem reproduced itself.
from httpdownloader.
The settings file was failing to open because of a sharing violation and so the single instance setting was defaulting to false. The program will now attempt to open the file (at least 5 times) until it's successful.
I'm not sure if your simplified script is similar to your original one, but I'd recommend adding multiple urls to the command line rather than using one at a time. For example: http_downloader.exe --url https://www.example.com/test1.txt --url https://www.example.com/test2.txt
That will cut down on the number of calls to shell.Run() and load things a lot faster.
Similarly, if you have a large list of URLs to add, you can have your script save them to a text file and then use the --url-list argument to load that file rather than including a bunch of --url arguments.
Here's a new version you can test.
HTTP_Downloader_32_1.0.5.1_Beta_3.zip
HTTP_Downloader_64_1.0.5.1_Beta_3.zip
Edit: Beta 4 uses file locks in addition to retrying. It should be sufficient enough to guard against spawning multiple instances.
HTTP_Downloader_32_1.0.5.1_Beta_4.zip
HTTP_Downloader_64_1.0.5.1_Beta_4.zip
from httpdownloader.
The beta4 worked fine.
I think the fix of locking the file is perfect.
I didn't know that feature could add multiple URLs.
I thought the multiple calls to shell.Run() were too slow.
It would be very useful to me.
In using custom scheme, the length is limited to 2KB.
So the hint that file can be used to add URLs may be useful in the future, but it may be difficult to use immediately.
Thank you for your response, tips and fixes.
I'm sorry if some of the sentences are not correct.
I'm using a translator.
from httpdownloader.
Related Issues (20)
- Filesize Dialog Incorrect Label Color for Dark Mode App HOT 1
- Feature: Show Percentage for when allocating files HOT 1
- Smart "Stuck Part" Detection HOT 1
- Which one should I choose? HOT 5
- [REQUEST] Upload it to Chrome Web Store HOT 1
- The app doesnt update the modified date HOT 2
- The saving issue in the Site Manager HOT 9
- Remove Completed Shortcut and maybe auto trigger? HOT 17
- It is recommended to windowize the pop-up window when right-clicking on the link. HOT 29
- Error on sending / download when using Extension & Add-on HOT 6
- Filename problem - Wrong file already exists message / Add remove double entrys from Add-on Extension URL window HOT 4
- winget link HOT 3
- filename changes with download and has no file extension HOT 1
- cant download from animepahe (HTTP 405) HOT 10
- Resizing of dialog for duplicate file needed (because of translation) HOT 1
- Hope for a Mac version HOT 2
- download says complete but the file is corrupted (chrome extension) HOT 2
- Support for PowerToys Windows Composition and Layout? HOT 3
- Autostart by Default HOT 3
- Http Downloader shows 403 error but download url is correct. HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from httpdownloader.