KurtBestor / Hitomi-Downloader

:cake: Desktop utility to download images/videos/music/text from various websites, and more.
20.96k stars 1.96k forks source link

Number of retries #6939

Open rickmiron opened 4 months ago

rickmiron commented 4 months ago

When a file fails to download, how can I set the number of retries and timeout? since 23 times I see it excessive

KurtBestor commented 4 months ago

Isn't 23 retries enough? Are there cases where more retries are needed?

rickmiron commented 4 months ago

I don't want to increase it, I want to decrease it to 5

KurtBestor commented 4 months ago

When would you need such a feature?

rickmiron commented 4 months ago

When this happens:

KurtBestor commented 3 months ago

You can specify the maximum number of retries like this:

class Video(utils.File):
    type = 'youtube'
    max_try = 5

Alternatively, you can use legacy methods:

class Video:
    max_try = 5
    def __init__(self, referer, url):
        self.url = utils.LazyUrl(referer, lambda _: url, self)

Try this: https://github.com/KurtBestor/Hitomi-Downloader/releases/tag/Technical-Preview