ltsdw / gofile-downloader

Download files from https://gofile.io
GNU General Public License v3.0
154 stars 38 forks source link

added timeouts and continue #15

Closed dmitrinove closed 1 year ago

dmitrinove commented 1 year ago

added timeouts to avoid download hang for minutes or more added continue getting partially downloaded files added user agent header to all connection added environment variable to specify user agent string added download info

removed tmp-dir directory

I eliminated the use of uuids for temporary files because it becomes difficult to manage temporary downloads. I also eliminated creating the tmp-dir directory, I hope I didn't eliminate something useful

ltsdw commented 1 year ago

@dmitrinove Hey, really great additions I didn't have time to test it thoroughly, but it seems fine to me from the little I tested 😃

But I would like to ask, if it isn't much of a trouble, to you create a separate commit to each additional/removal please. Thank you.

ltsdw commented 1 year ago

@dmitrinove Also, it looks like you removing tmp-dir/uuids parts broke the download of nested sub directories with files inside . You can have a look at #10 and #11 . If you can fix those I can merge it.

dmitrinove commented 1 year ago

As I wrote, I deleted it because the use of random uuids makes it impossible to recover an interrupted download. I could try to restore the use of tmp-dir but I need a sample gofile link for testing, the links in thread #10 are expired.

please create me a link with small files that recreates the recursion problem, if I find a permanent solution I will create a new commit.

then we can try to create incremental commits for each new feature

ltsdw commented 1 year ago

you can create this environment as a guest, it isn't necessary having an account.

Just go to gofile -> My Files, and there you can create some directories, sub directories and inside these you can put empty text file with different filenames, this way you can see if while downloading stuff were put on its correct directory.

Also I think the tmp-dir/uuid idea can be dropped altogether, you'll just need to create the directories before downloading the files to its respective directories, this way the idea of handling .part files will still work as intended :)

dmitrinove commented 1 year ago

with the latest changes it is possible to download directories and sub directories. I created a test repository here: https://gofile.io/d/0042s5 I copied the same file to two different directories and the program manages the download and resume of the two files correctly and with multi-threads.

ltsdw commented 1 year ago

Seems all right now, it would have been better to have split the first commit into small one, this way is easier to track regressions. But we'll work with that if any were introduced and not catch in my tests.

Again, thank you so much, really great additions :)